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:
@@ -14,6 +14,32 @@ for architectureObject in [ MultiArchSubDirSetup ] {
|
|||||||
# we need to link against libgcc.a objects and make
|
# we need to link against libgcc.a objects and make
|
||||||
# it available to other applications as in BeOS
|
# 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 =
|
local librootObjects =
|
||||||
os_main.o
|
os_main.o
|
||||||
os_arch_$(TARGET_ARCH).o
|
os_arch_$(TARGET_ARCH).o
|
||||||
@@ -70,7 +96,7 @@ for architectureObject in [ MultiArchSubDirSetup ] {
|
|||||||
:
|
:
|
||||||
libroot_init.c
|
libroot_init.c
|
||||||
:
|
:
|
||||||
$(HAIKU_GCC_LIBGCC_OBJECTS_$(architecture))
|
$(librootLibgccObjects)
|
||||||
$(librootObjects)
|
$(librootObjects)
|
||||||
$(librootNoDebugObjects)
|
$(librootNoDebugObjects)
|
||||||
$(HAIKU_STATIC_LIBSUPC++_$(architecture))
|
$(HAIKU_STATIC_LIBSUPC++_$(architecture))
|
||||||
@@ -84,7 +110,7 @@ for architectureObject in [ MultiArchSubDirSetup ] {
|
|||||||
:
|
:
|
||||||
libroot_init.c
|
libroot_init.c
|
||||||
:
|
:
|
||||||
$(HAIKU_GCC_LIBGCC_OBJECTS_$(architecture))
|
$(librootLibgccObjects)
|
||||||
$(librootObjects)
|
$(librootObjects)
|
||||||
$(librootDebugObjects)
|
$(librootDebugObjects)
|
||||||
$(HAIKU_STATIC_LIBSUPC++_$(architecture))
|
$(HAIKU_STATIC_LIBSUPC++_$(architecture))
|
||||||
|
|||||||
Reference in New Issue
Block a user