Using special CFLAGS for a single file without writing the rule
Jeremie Le Hen
jeremie at le-hen.org
Thu Apr 24 16:06:44 UTC 2008
Hi Ruslan, hi all,
I don't know if you followed the thread on -arch@, but the outcome is
basically that SSP should be disabled for a couple of files:
lib/csu/*
gnu/lib/csu/* (reported by antoine@, but I couldn't verify this one)
lib/libc/sys/stack_protector.c
sys/kern/stack_protector.c
Antoine Brodin supplied a patch for the kernel part:
+kern/stack_protector.c standard \
+ compile-with "${NORMAL_C:N-fstack-protector*}"
As for lib/csu/*, this is straightforward, I just have to set
WITHOUT_SSP in the Makefile.
The hardest one is lib/libc/sys/stack_protector.c. I endeavored to find
a way to compile a single file with ${CFLAGS:N-fstack-protector*}, but I
found no recipe but writing the whole rule for this file. I would
really like to avoid this solution so as to not override bsd.lib.mk
settings.
Considering your big experience with the build infrastructure, I suspect
you would have a solution.
Thank you for your help.
Regards,
--
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >
More information about the freebsd-hackers
mailing list