Consider CC_MARCH to find lx_hybrid crtn, fix #82

Patch by Christian Prochaska. This patch fixes problems with building
the 32-bit variant of 'fb_sdl' on a 64-bit host system.
This commit is contained in:
Norman Feske 2012-01-13 19:29:30 +01:00
parent aa4fa69987
commit 90e36f23af

View File

@ -7,7 +7,7 @@ include $(call select_from_repositories,lib/import/import-syscall.mk)
# Manually supply all library search paths of the host compiler to our tool # Manually supply all library search paths of the host compiler to our tool
# chain. # chain.
# #
HOST_LIB_SEARCH_DIRS := $(shell cc -print-search-dirs | grep libraries |\ HOST_LIB_SEARCH_DIRS = $(shell cc $(CC_MARCH) -print-search-dirs | grep libraries |\
sed "s/.*=//" | sed "s/:/ /g" |\ sed "s/.*=//" | sed "s/:/ /g" |\
sed "s/\/ / /g" | sed "s/\/\$$//") sed "s/\/ / /g" | sed "s/\/\$$//")
# #
@ -77,11 +77,11 @@ endif
# #
# Use the host's startup codes, linker script, and dynamic linker # Use the host's startup codes, linker script, and dynamic linker
# #
EXT_OBJECTS += $(shell cc -print-file-name=crt1.o) EXT_OBJECTS += $(shell cc $(CC_MARCH) -print-file-name=crt1.o)
EXT_OBJECTS += $(shell cc -print-file-name=crti.o) EXT_OBJECTS += $(shell cc $(CC_MARCH) -print-file-name=crti.o)
EXT_OBJECTS += $(shell cc -print-file-name=crtbegin.o) EXT_OBJECTS += $(shell cc $(CC_MARCH) -print-file-name=crtbegin.o)
EXT_OBJECTS += $(shell cc -print-file-name=crtend.o) EXT_OBJECTS += $(shell cc $(CC_MARCH) -print-file-name=crtend.o)
EXT_OBJECTS += $(shell cc -print-file-name=crtn.o) EXT_OBJECTS += $(shell cc $(CC_MARCH) -print-file-name=crtn.o)
EXT_OBJECTS += -lgcc -lgcc_s -lsupc++ -lc EXT_OBJECTS += -lgcc -lgcc_s -lsupc++ -lc
EXT_OBJECTS += -lpthread EXT_OBJECTS += -lpthread