Patch to allow compiling on 64 bit hosts as well as that oldy but goody, -fno-stack-protector.
Jordan
On Fri, Feb 08, 2008 at 02:37:19PM -0700, Jordan Crouse wrote:
[openvsa] Fix for 64 bit hosts, and add in our good friend -fno-stack-protector
Signed-off-by: Jordan Crouse jordan.crouse@amd.com
Acked-by: Peter Stuge peter@stuge.se
Index: openvsa/common.mk
--- openvsa.orig/common.mk 2008-02-08 13:25:27.000000000 -0700 +++ openvsa/common.mk 2008-02-08 14:17:27.000000000 -0700 @@ -19,11 +19,26 @@ # along with openvsa. If not, see http://www.gnu.org/licenses/. #
+# Borrowed from the kernel
+try-run= $(shell set -e; \
- TMP=".$$$$.tmp"; \
- if ($(1)) > /dev/null 2>&1; \
- then echo "$(2)"; \
- else echo "$(3)"; \
- fi; rm -rf "$$TMP")
+cc-option= $(call try-run, \
- $(CC) $(1) -S -xc /dev/null -o "$$TMP", $(1), $(2))
CC = gcc INCS = $(addprefix -I, ../inc ../sysmgr) ARCH = i586 -CFLAGS += -Wall -Werror -fno-strict-aliasing -march=$(ARCH) -Os $(INCS) +CFLAGS += -m32 -Wall -Werror -fno-strict-aliasing -march=$(ARCH) -Os $(INCS) +LDFLAGS += -melf_i386
+CFLAGS += $(call cc-option, -fno-stack-protector,) # --------------------------------------------------------------------------
SMMDC_TRANSLATE = ../smimac.pl < $< > tmp_$< Index: openvsa/sysmgr/Makefile =================================================================== --- openvsa.orig/sysmgr/Makefile 2008-02-08 13:32:50.000000000 -0700 +++ openvsa/sysmgr/Makefile 2008-02-08 13:43:46.000000000 -0700 @@ -38,7 +38,7 @@ EXTRA_CLEANS = $(INIT_ASM_OBJ)
vsainit.bin : $(INIT_ASM_OBJ) vsainit.lnk
- $(LD) --cref --oformat binary -Map vsainit.map \
- $(LD) $(LDFLAGS) --cref --oformat binary -Map vsainit.map \ -o $@ -T vsainit.lnk $(INIT_ASM_OBJ)
clean:: $(RM) vsainit.map @@ -58,7 +58,7 @@ # Note: gcc 4.1.1 barfs on chipset.c with '-Os' chipset.o : chipset.c @mkdir -p .deps
- $(CC) -march=$(ARCH) $(INCS) -MD -c -o $@ $<
- $(CC) -m32 -march=$(ARCH) $(INCS) -MD -c -o $@ $< @cp chipset.d .deps/chipset.P; \ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\$$//' \ -e '/^$$/ d' -e 's/$$/ :/' < chipset.d >> \
Index: openvsa/vsm.mk
--- openvsa.orig/vsm.mk 2008-02-08 13:32:08.000000000 -0700 +++ openvsa/vsm.mk 2008-02-08 13:32:23.000000000 -0700 @@ -25,7 +25,7 @@ all : $(VSM).vsm $(EXTRA_BIN)
$(VSM).vsm : $(ASM_OBJ) $(C_OBJ) ../vsm_lib/vsm.a $(VSM).lnk
- $(LD) --cref --oformat binary -Map $(VSM).map \
- $(LD) $(LDFLAGS) --cref --oformat binary -Map $(VSM).map \ -o $@ -T $(VSM).lnk $(ASM_OBJ) $(C_OBJ) ../vsm_lib/vsm.a
../vsm_lib/vsm.a:
On Sat, Feb 09, 2008 at 06:28:52PM +0100, Peter Stuge wrote:
Signed-off-by: Jordan Crouse jordan.crouse@amd.com
Acked-by: Peter Stuge peter@stuge.se
Committed in r4.
Uwe.
On Feb 8, 2008 1:37 PM, Jordan Crouse jordan.crouse@amd.com wrote:
tha t oldy but goody, -fno-stack-protector.
we need a patch for filo too, if anyone gets the time.
Wow, all these distros broke ALL standalone programs. I'm proud of them.
ron
ron minnich schrieb:
On Feb 8, 2008 1:37 PM, Jordan Crouse jordan.crouse@amd.com wrote:
tha t oldy but goody, -fno-stack-protector.
we need a patch for filo too, if anyone gets the time.
Wow, all these distros broke ALL standalone programs. I'm proud of them.
As can be seen with the various ld failures popping up again and again, standalone programs are not an official supported scenario for them (except for whatever kernel the system is using)
Regards, Patrick Georgi