File tree Expand file tree Collapse file tree 3 files changed +36
-2
lines changed Expand file tree Collapse file tree 3 files changed +36
-2
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ LLVM_SRCDIR := @with_llvm_src@
16
16
DEJAGNU_SRCDIR := @with_dejagnu_src@
17
17
DEBUG_INFO := @debug_info@
18
18
DEJAGNU_SRCDIR := @with_dejagnu_src@
19
+ GCC_INSTALL_TARGET := @gcc_install_target@
19
20
20
21
SIM ?= @WITH_SIM@
21
22
@@ -515,7 +516,7 @@ stamps/build-gcc-linux-stage2: $(GCC_SRCDIR) $(GCC_SRC_GIT) $(addprefix stamps/b
515
516
CFLAGS_FOR_TARGET="-O2 $(CFLAGS_FOR_TARGET)" \
516
517
CXXFLAGS_FOR_TARGET="-O2 $(CXXFLAGS_FOR_TARGET)"
517
518
$(MAKE) -C $(notdir $@)
518
- $(MAKE) -C $(notdir $@) install
519
+ $(MAKE) -C $(notdir $@) $(GCC_INSTALL_TARGET)
519
520
cp -a $(INSTALL_DIR)/$(LINUX_TUPLE)/lib* $(SYSROOT)
520
521
mkdir -p $(dir $@) && touch $@
521
522
@@ -569,7 +570,7 @@ stamps/build-gcc-linux-native: $(GCC_SRCDIR) $(GCC_SRC_GIT) stamps/build-gcc-lin
569
570
$(WITH_ISA_SPEC ) \
570
571
$(GCC_EXTRA_CONFIGURE_FLAGS )
571
572
$(MAKE) -C $(notdir $@)
572
- $(MAKE) -C $(notdir $@) install
573
+ $(MAKE) -C $(notdir $@) $(GCC_INSTALL_TARGET)
573
574
cp -a $(INSTALL_DIR)/$(LINUX_TUPLE)/lib* $(SYSROOT)
574
575
mkdir -p $(dir $@) && touch $@
575
576
Original file line number Diff line number Diff line change @@ -598,6 +598,7 @@ with_glibc_src
598
598
with_newlib_src
599
599
with_binutils_src
600
600
with_gcc_src
601
+ gcc_install_target
601
602
enable_host_gcc
602
603
enable_llvm
603
604
enable_gdb
@@ -699,6 +700,7 @@ with_guile
699
700
enable_gdb
700
701
enable_llvm
701
702
enable_host_gcc
703
+ enable_strip
702
704
with_gcc_src
703
705
with_binutils_src
704
706
with_newlib_src
@@ -1343,6 +1345,7 @@ Optional Features:
1343
1345
--disable-gdb Don't build GDB, as it's not upstream
1344
1346
--enable-llvm Build LLVM (clang)
1345
1347
--enable-host-gcc Build host GCC to build cross toolchain
1348
+ --disable-strip Do not strip debug symbols at install time
1346
1349
--enable-libsanitizer Build libsanitizer, which only supports rv64
1347
1350
--enable-qemu-system Build qemu with system-mode emulation
1348
1351
@@ -3640,6 +3643,26 @@ else
3640
3643
3641
3644
fi
3642
3645
3646
+ # Check whether --enable-strip was given.
3647
+ if test ${enable_strip+y}
3648
+ then :
3649
+ enableval=$enable_strip ;
3650
+ else case e in # (
3651
+ e) strip_debug=yes ;;
3652
+ esac
3653
+ fi
3654
+
3655
+
3656
+ if test " x$strip_debug " ! = xyes
3657
+ then :
3658
+ gcc_install_target=install
3659
+
3660
+ else case e in # (
3661
+ e) gcc_install_target=install-strip
3662
+ ;;
3663
+ esac
3664
+ fi
3665
+
3643
3666
3644
3667
3645
3668
{
Original file line number Diff line number Diff line change @@ -269,6 +269,16 @@ AS_IF([test "x$enable_host_gcc" != xyes],
269
269
[ AC_SUBST ( enable_host_gcc , -- disable-host-gcc ) ] ,
270
270
[ AC_SUBST ( enable_host_gcc , -- enable-host-gcc ) ] )
271
271
272
+ AC_ARG_ENABLE ( strip ,
273
+ [ AS_HELP_STRING ( [ --disable-strip] ,
274
+ [ Do not strip debug symbols at install time] ) ] ,
275
+ [ ] ,
276
+ [ strip_debug=yes] )
277
+
278
+ AS_IF ( [ test "x$strip_debug" != xyes] ,
279
+ [ AC_SUBST ( gcc_install_target , install ) ] ,
280
+ [ AC_SUBST ( gcc_install_target , install-strip ) ] )
281
+
272
282
AC_DEFUN ( [ AX_ARG_WITH_SRC] ,
273
283
[ {m4_pushdef ( [ opt_name] , with_$1 _src )
274
284
AC_ARG_WITH ( $1 - src ,
You can’t perform that action at this time.
0 commit comments