Skip to contentSkip to conversation

stack-protect in conflict with CROSS_COMPILE

DISCUSSION Matthew Wilcox 2 participants 2 messages Aug 14, 2006

lore
Share & tools
lore
#0 lore raw

Hi Sam,

We've stumbled on a problem with -fno-stack-protector and CROSS_COMPILE:

CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common
# Force gcc to behave correct even for buggy distributions
CFLAGS += $(call cc-option, -fno-stack-protector)

round about line 310 of Makefile will cause CC to be called before we get a chance to set CROSS_COMPILE in arch/parisc/Makefile. For people who are compiling 64-bit parisc kernels, this means the wrong gcc gets called, and sometimes the compiler versions are out of sync.

We will have similar problems with:

CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,)

Should we include the arch Makefile earlier in the proceedings?

#1 lore raw
Quoted 14 lines · Matthew Wilcox

Hi Sam,

We've stumbled on a problem with -fno-stack-protector and CROSS_COMPILE:

CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common
# Force gcc to behave correct even for buggy distributions
CFLAGS += $(call cc-option, -fno-stack-protector)

round about line 310 of Makefile will cause CC to be called before we get a chance to set CROSS_COMPILE in arch/parisc/Makefile. For people who are compiling 64-bit parisc kernels, this means the wrong gcc gets called, and sometimes the compiler versions are out of sync.

Quoted 5 lines

We will have similar problems with:

CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,)

Should we include the arch Makefile earlier in the proceedings?

The -fno-stack-protector issue also affects MIPS.

Ralf