ARM: work around too many libgcc objects when linking libroot

jam fails in execve() trying to run the command due to
a too large arguments list because of the many objects in libgcc.

We split them into two intermediate objects,
then we link them to libroot.
This commit is contained in:
François Revol
2013-09-30 00:37:06 +02:00
parent 4a3649a4ac
commit 5e0e2739c9
+28 -2
View File
@@ -14,6 +14,32 @@ for architectureObject in [ MultiArchSubDirSetup ] {
# we need to link against libgcc.a objects and make
# it available to other applications as in BeOS
# workaround for ARM having waaaaay too many objects in libgcc
# which fails execve() with too large argument list
# when linking them directly into libroot.
local libgccObjects1 =
$(HAIKU_GCC_LIBGCC_OBJECTS_$(architecture)[1-800]) ;
local libgccObjects2 =
$(HAIKU_GCC_LIBGCC_OBJECTS_$(architecture)[801-]) ;
local librootLibgccObjects =
<$(architecture)>libgcc_part1_$(TARGET_ARCH).o ;
MergeObject <$(architecture)>libgcc_part1_$(TARGET_ARCH).o :
:
$(libgccObjects1)
;
if $(libgccObjects2) {
librootLibgccObjects +=
<$(architecture)>libgcc_part2_$(TARGET_ARCH).o ;
MergeObject <$(architecture)>libgcc_part2_$(TARGET_ARCH).o :
:
$(libgccObjects2)
;
}
local librootObjects =
os_main.o
os_arch_$(TARGET_ARCH).o
@@ -70,7 +96,7 @@ for architectureObject in [ MultiArchSubDirSetup ] {
:
libroot_init.c
:
$(HAIKU_GCC_LIBGCC_OBJECTS_$(architecture))
$(librootLibgccObjects)
$(librootObjects)
$(librootNoDebugObjects)
$(HAIKU_STATIC_LIBSUPC++_$(architecture))
@@ -84,7 +110,7 @@ for architectureObject in [ MultiArchSubDirSetup ] {
:
libroot_init.c
:
$(HAIKU_GCC_LIBGCC_OBJECTS_$(architecture))
$(librootLibgccObjects)
$(librootObjects)
$(librootDebugObjects)
$(HAIKU_STATIC_LIBSUPC++_$(architecture))