Skip to content
This repository was archived by the owner on Feb 28, 2023. It is now read-only.

Commit d3bc80b

Browse files
committed
Revert "container-apps: pre_build_insn"
This reverts commit 1ee339b.
1 parent 1ee339b commit d3bc80b

File tree

1 file changed

+4
-39
lines changed

1 file changed

+4
-39
lines changed

scripts/container-apps-functions-source.sh

Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,8 @@ function build_gcc_first()
280280
CPPFLAGS="${XBB_CPPFLAGS}"
281281
# The gcc/emit_insn.c is huge (>62 MB), so give up on using -pipe
282282
# and multiple sections, in order to save memory.
283-
# CFLAGS="$(echo "${XBB_CFLAGS_NO_W}" | sed -e 's|-ffunction-sections||' | sed -e 's|-fdata-sections||' | sed -e 's|-pipe||')"
284-
# CXXFLAGS="$(echo "${XBB_CXXFLAGS_NO_W}" | sed -e 's|-ffunction-sections||' | sed -e 's|-fdata-sections||' | sed -e 's|-pipe||')"
285-
CFLAGS="${XBB_CFLAGS_NO_W}"
286-
CXXFLAGS="${XBB_CXXFLAGS_NO_W}"
283+
CFLAGS="$(echo "${XBB_CFLAGS_NO_W}" | sed -e 's|-ffunction-sections||' | sed -e 's|-fdata-sections||' | sed -e 's|-pipe||')"
284+
CXXFLAGS="$(echo "${XBB_CXXFLAGS_NO_W}" | sed -e 's|-ffunction-sections||' | sed -e 's|-fdata-sections||' | sed -e 's|-pipe||')"
287285
LDFLAGS="${XBB_LDFLAGS_APP}"
288286
if [ "${TARGET_PLATFORM}" == "linux" ]
289287
then
@@ -378,9 +376,6 @@ function build_gcc_first()
378376
echo
379377
echo "Running gcc first stage make..."
380378

381-
# Pre-cook the very large files.
382-
pre_build_insn
383-
384379
# Build.
385380
# No need to make 'all', 'all-gcc' is enough to compile the libraries.
386381
run_verbose make -j ${JOBS} all-gcc
@@ -399,31 +394,6 @@ function build_gcc_first()
399394
fi
400395
}
401396

402-
function pre_build_insn()
403-
{
404-
(
405-
cd gcc
406-
407-
# The gcc/emit_insn.c is huge (>62 MB), so give up on using -pipe
408-
# and multiple sections, in order to save memory.
409-
410-
cp Makefile Makefile-patched
411-
sed -i.bak \
412-
-e 's|-ffunction-sections||' \
413-
-e 's|-fdata-sections||' \
414-
-e 's|-pipe||' \
415-
Makefile-patched
416-
417-
for file_name in insn-*.c
418-
do
419-
target=$(echo ${file_name} | sed -e 's|\.c|\.o|')
420-
421-
# Build the huge files separately, without parallel build.
422-
run_verbose make -j 1 -f Makefile-patched ${target}
423-
done
424-
)
425-
}
426-
427397
# For the nano build, call it with "-nano".
428398
# $1="" or $1="-nano"
429399
function build_newlib()
@@ -789,10 +759,8 @@ function build_gcc_final()
789759

790760
# The gcc/emit_insn.c is huge (>62 MB), so give up on using -pipe
791761
# and multiple sections, in order to save memory.
792-
# CFLAGS="$(echo "${XBB_CFLAGS_NO_W}" | sed -e 's|-ffunction-sections||' | sed -e 's|-fdata-sections||' | sed -e 's|-pipe||')"
793-
# CXXFLAGS="$(echo "${XBB_CXXFLAGS_NO_W}" | sed -e 's|-ffunction-sections||' | sed -e 's|-fdata-sections||' | sed -e 's|-pipe||')"
794-
CFLAGS="${XBB_CFLAGS_NO_W}"
795-
CXXFLAGS="${XBB_CXXFLAGS_NO_W}"
762+
CFLAGS="$(echo "${XBB_CFLAGS_NO_W}" | sed -e 's|-ffunction-sections||' | sed -e 's|-fdata-sections||' | sed -e 's|-pipe||')"
763+
CXXFLAGS="$(echo "${XBB_CXXFLAGS_NO_W}" | sed -e 's|-ffunction-sections||' | sed -e 's|-fdata-sections||' | sed -e 's|-pipe||')"
796764

797765
# Attempts to use `-Wa,-mbig-obj` failed on Windows.
798766

@@ -964,9 +932,6 @@ function build_gcc_final()
964932
echo
965933
echo "Running gcc$1 final stage make..."
966934

967-
# Pre-cook the very large files.
968-
pre_build_insn
969-
970935
if [ "${TARGET_PLATFORM}" != "win32" ]
971936
then
972937

0 commit comments

Comments
 (0)