[parisc-linux] Compiler switches

Matthew Wilcox willy@debian.org
Sun, 2 Feb 2003 03:59:20 +0000


Just wondering how many of the compiler switches we really need these days.
Here's what we currently do:

cflags-y        := -D__linux__ -pipe -fno-strength-reduce

# These should be on for older toolchains or SOM toolchains that don't
# enable them by default.
cflags-y        += -mno-space-regs -mfast-indirect-calls

# No fixed-point multiply
cflags-y        += -mdisable-fpregs

# Without this, "ld -r" results in .text sections that are too big
# (> 0x40000) for branches to reach stubs.
cflags-y        += -ffunction-sections


-D__linux__ looks like it can go away.

-pipe I'm agnostic on.  Someone want to benchmark builds both with and
without it?

-fno-strength-reduce has been there since before we moved to ELF -- over 3
years.  Any bug this was working around has hopefully been long-squashed.
I think we should eliminate this and submit PRs if it finds new holes.

-mno-space-regs & -mfast-indirect-calls can also go away, I think.
I can't imagine that we ever didn't have them as default on a gcc
3.0-based compiler.

Do we still need -ffunction-sections?  I'm inclined to leave it anyway
to enable compilation with older toolchains.

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk