summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-05-21 22:00:52 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-05-21 22:00:52 (GMT)
commit9d2e7e0b704e4f905c5872fbc7613182e10c180e (patch)
tree5c419d2a89126bffe093bf810c78890836f7ab96 /scripts
parent6bf2896c4efac56bbe36c3f011704d3c5bc1e2be (diff)
Introduce target-specific LDFLAGS, the same way we have CFLAGS for the target.
It seems to be helping gcc somewhat into telling the correct endianness to ld that sticks with little endian even when the target is big (eg armeb-unknown-linux-uclibcgnueabi). There's still work to do, especially finish the gcc part that is not in this commit. /trunk/scripts/functions | 9 7 2 0 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/functions9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/functions b/scripts/functions
index e4f6107..09625ac 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -508,10 +508,12 @@ CT_DoBuildTargetTuple() {
y,) target_endian_eb=eb
target_endian_el=
CT_ARCH_ENDIAN_CFLAG="-mbig-endian"
+ CT_ARCH_ENDIAN_LDFLAG="-EB"
;;
,y) target_endian_eb=
target_endian_el=el
CT_ARCH_ENDIAN_CFLAG="-mlittle-endian"
+ CT_ARCH_ENDIAN_LDFLAG="-EL"
;;
esac
@@ -545,13 +547,16 @@ CT_DoBuildTargetTuple() {
CT_TARGET=$(CT_DoConfigSub "${CT_TARGET_ARCH}-${CT_TARGET_VENDOR:-unknown}-${CT_TARGET_KERNEL}-${CT_TARGET_SYS}")
# Prepare the target CFLAGS
- CT_ARCH_TARGET_CFLAGS="${CT_ARCH_ARCH_CFLAG}"
+ CT_ARCH_TARGET_CFLAGS="${CT_ARCH_ENDIAN_CFLAG}"
+ CT_ARCH_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_ARCH_ARCH_CFLAG}"
CT_ARCH_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_ARCH_ABI_CFLAG}"
CT_ARCH_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_ARCH_CPU_CFLAG}"
CT_ARCH_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_ARCH_TUNE_CFLAG}"
CT_ARCH_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_ARCH_FPU_CFLAG}"
CT_ARCH_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_ARCH_FLOAT_CFLAG}"
- CT_ARCH_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_ARCH_ENDIAN_CFLAG}"
+
+ # Now on for the target LDFLAGS
+ CT_ARCH_TARGET_LDFLAGS="${CT_ARCH_ENDIAN_LDFLAG}"
}
# This function does pause the build until the user strikes "Return"