Use "--build-id=none" as linker flags if build-id is supported.
That fixes a compilation failure. Signed-off-by: Marc Karasek <marc.karasek@sun.com> Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Joseph Smith <joe@smittys.pointclark.net> Acked-by: Myles Watson <myles@pel.cs.byu.edu> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3073 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
bb9c1aa54e
commit
14a3af111d
|
@ -8,7 +8,7 @@ makedefine LIBGCC_FILE_NAME := $(shell $(CC) -print-libgcc-file-name)
|
||||||
makedefine GCC_INC_DIR := $(shell LC_ALL=C $(CC) -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp")
|
makedefine GCC_INC_DIR := $(shell LC_ALL=C $(CC) -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp")
|
||||||
|
|
||||||
makedefine CPPFLAGS := -I$(TOP)/src/include -I$(TOP)/src/arch/$(ARCH)/include -I$(GCC_INC_DIR) $(CPUFLAGS)
|
makedefine CPPFLAGS := -I$(TOP)/src/include -I$(TOP)/src/arch/$(ARCH)/include -I$(GCC_INC_DIR) $(CPUFLAGS)
|
||||||
makedefine CFLAGS := $(CPU_OPT) $(CPPFLAGS) -Os -nostdinc -nostdlib -fno-builtin -Wall
|
makedefine CFLAGS := $(CPU_OPT) $(DISTRO_CFLAGS) $(CPPFLAGS) -Os -nostdinc -nostdlib -fno-builtin -Wall
|
||||||
|
|
||||||
makedefine HOSTCFLAGS:= -Os -Wall
|
makedefine HOSTCFLAGS:= -Os -Wall
|
||||||
|
|
||||||
|
@ -38,14 +38,15 @@ makerule coreboot.a
|
||||||
action "ar cr coreboot.a $(OBJECTS)"
|
action "ar cr coreboot.a $(OBJECTS)"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
makerule coreboot_ram.o
|
makerule coreboot_ram.o
|
||||||
depends "$(DRIVER) coreboot.a $(LIBGCC_FILE_NAME)"
|
depends "$(DRIVER) coreboot.a $(LIBGCC_FILE_NAME)"
|
||||||
action "$(CC) -nostdlib -r -o $@ c_start.o $(DRIVER) coreboot.a $(LIBGCC_FILE_NAME)"
|
action "$(CC) $(DISTRO_LFLAGS) -nostdlib -r -o $@ c_start.o $(DRIVER) coreboot.a $(LIBGCC_FILE_NAME)"
|
||||||
end
|
end
|
||||||
|
|
||||||
makerule coreboot_ram
|
makerule coreboot_ram
|
||||||
depends "coreboot_ram.o $(TOP)/src/config/coreboot_ram.ld ldoptions"
|
depends "coreboot_ram.o $(TOP)/src/config/coreboot_ram.ld ldoptions"
|
||||||
action "$(CC) -nostdlib -nostartfiles -static -o $@ -T $(TOP)/src/config/coreboot_ram.ld coreboot_ram.o"
|
action "$(CC) $(DISTRO_LFLAGS) -nostdlib -nostartfiles -static -o $@ -T $(TOP)/src/config/coreboot_ram.ld coreboot_ram.o"
|
||||||
action "$(CROSS_COMPILE)nm -n coreboot_ram | sort > coreboot_ram.map"
|
action "$(CROSS_COMPILE)nm -n coreboot_ram | sort > coreboot_ram.map"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -83,12 +84,12 @@ if CONFIG_AP_CODE_IN_CAR
|
||||||
|
|
||||||
makerule coreboot_apc.o
|
makerule coreboot_apc.o
|
||||||
depends "coreboot_apc.a c_start.o $(LIBGCC_FILE_NAME)"
|
depends "coreboot_apc.a c_start.o $(LIBGCC_FILE_NAME)"
|
||||||
action "$(CC) -nostdlib -r -o $@ c_start.o coreboot_apc.a $(LIBGCC_FILE_NAME)"
|
action "$(CC) $(DISTRO_LFLAGS) -nostdlib -r -o $@ c_start.o coreboot_apc.a $(LIBGCC_FILE_NAME)"
|
||||||
end
|
end
|
||||||
|
|
||||||
makerule coreboot_apc
|
makerule coreboot_apc
|
||||||
depends "coreboot_apc.o $(TOP)/src/config/coreboot_apc.ld ldoptions"
|
depends "coreboot_apc.o $(TOP)/src/config/coreboot_apc.ld ldoptions"
|
||||||
action "$(CC) -nostdlib -nostartfiles -static -o $@ -T $(TOP)/src/config/coreboot_apc.ld coreboot_apc.o"
|
action "$(CC) $(DISTRO_LFLAGS) -nostdlib -nostartfiles -static -o $@ -T $(TOP)/src/config/coreboot_apc.ld coreboot_apc.o"
|
||||||
action "$(CROSS_COMPILE)nm -n coreboot_apc | sort > coreboot_apc.map"
|
action "$(CROSS_COMPILE)nm -n coreboot_apc | sort > coreboot_apc.map"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -121,7 +122,7 @@ makedefine COREBOOT_RAM_ROM:=coreboot_ram.rom
|
||||||
|
|
||||||
makerule coreboot
|
makerule coreboot
|
||||||
depends "crt0.o $(INIT-OBJECTS) $(COREBOOT_APC) $(COREBOOT_RAM_ROM) ldscript.ld"
|
depends "crt0.o $(INIT-OBJECTS) $(COREBOOT_APC) $(COREBOOT_RAM_ROM) ldscript.ld"
|
||||||
action "$(CC) -nostdlib -nostartfiles -static -o $@ -T ldscript.ld crt0.o $(INIT-OBJECTS)"
|
action "$(CC) $(DISTRO_LFLAGS) -nostdlib -nostartfiles -static -o $@ -T ldscript.ld crt0.o $(INIT-OBJECTS)"
|
||||||
action "$(CROSS_COMPILE)nm -n coreboot | sort > coreboot.map"
|
action "$(CROSS_COMPILE)nm -n coreboot | sort > coreboot.map"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -69,9 +69,16 @@ fi
|
||||||
|
|
||||||
rm -rf .$$.tmp
|
rm -rf .$$.tmp
|
||||||
|
|
||||||
|
ld --help | awk '{for (i=1;i<=NF;i++) if ($i ~ /build-id/){n++} }; END {exit n}'
|
||||||
|
build_id=$?
|
||||||
|
if [ $build_id -ge 1 ] ; then
|
||||||
|
EXTRA_LFLAGS+=" -Wl,--build-id=none"
|
||||||
|
fi
|
||||||
|
|
||||||
for i in $build_dir/Makefile.settings $build_dir/*/Makefile.settings
|
for i in $build_dir/Makefile.settings $build_dir/*/Makefile.settings
|
||||||
do
|
do
|
||||||
echo CFLAGS+=$EXTRA_CFLAGS >>$i
|
echo DISTRO_CFLAGS+=$EXTRA_CFLAGS >>$i
|
||||||
|
echo DISTRO_LFLAGS+=$EXTRA_LFLAGS >>$i
|
||||||
done
|
done
|
||||||
|
|
||||||
exit $?
|
exit $?
|
||||||
|
|
Loading…
Reference in New Issue