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 @@ -17,6 +17,7 @@ LLVM_SRCDIR := @with_llvm_src@
17
17
DEJAGNU_SRCDIR := @with_dejagnu_src@
18
18
DEBUG_INFO := @debug_info@
19
19
ENABLE_DEFAULT_PIE := @enable_default_pie@
20
+ GCC_INSTALL_TARGET := @gcc_install_target@
20
21
21
22
SIM ?= @WITH_SIM@
22
23
@@ -536,7 +537,7 @@ stamps/build-gcc-linux-stage2: $(GCC_SRCDIR) $(GCC_SRC_GIT) $(addprefix stamps/b
536
537
CFLAGS_FOR_TARGET="-O2 $(CFLAGS_FOR_TARGET)" \
537
538
CXXFLAGS_FOR_TARGET="-O2 $(CXXFLAGS_FOR_TARGET)"
538
539
$(MAKE) -C $(notdir $@)
539
- $(MAKE) -C $(notdir $@) install
540
+ $(MAKE) -C $(notdir $@) $(GCC_INSTALL_TARGET)
540
541
cp -a $(INSTALL_DIR)/$(LINUX_TUPLE)/lib* $(SYSROOT)
541
542
mkdir -p $(dir $@) && touch $@
542
543
@@ -592,7 +593,7 @@ stamps/build-gcc-linux-native: $(GCC_SRCDIR) $(GCC_SRC_GIT) stamps/build-gcc-lin
592
593
$(WITH_ISA_SPEC ) \
593
594
$(GCC_EXTRA_CONFIGURE_FLAGS )
594
595
$(MAKE) -C $(notdir $@)
595
- $(MAKE) -C $(notdir $@) install
596
+ $(MAKE) -C $(notdir $@) $(GCC_INSTALL_TARGET)
596
597
cp -a $(INSTALL_DIR)/$(LINUX_TUPLE)/lib* $(SYSROOT)
597
598
mkdir -p $(dir $@) && touch $@
598
599
Original file line number Diff line number Diff line change @@ -630,6 +630,7 @@ with_glibc_src
630
630
with_newlib_src
631
631
with_binutils_src
632
632
with_gcc_src
633
+ gcc_install_target
633
634
enable_host_gcc
634
635
enable_llvm
635
636
enable_gdb
@@ -736,6 +737,7 @@ with_guile
736
737
enable_gdb
737
738
enable_llvm
738
739
enable_host_gcc
740
+ enable_strip
739
741
with_gcc_src
740
742
with_binutils_src
741
743
with_newlib_src
@@ -1392,6 +1394,7 @@ Optional Features:
1392
1394
--disable-gdb Don't build GDB, as it's not upstream
1393
1395
--enable-llvm Build LLVM (clang)
1394
1396
--enable-host-gcc Build host GCC to build cross toolchain
1397
+ --disable-strip Do not strip debug symbols at install time
1395
1398
--enable-libsanitizer Build libsanitizer, which only supports rv64
1396
1399
--enable-qemu-system Build qemu with system-mode emulation
1397
1400
@@ -4341,6 +4344,26 @@ else $as_nop
4341
4344
4342
4345
fi
4343
4346
4347
+ # Check whether --enable-strip was given.
4348
+ if test ${enable_strip+y}
4349
+ then :
4350
+ enableval=$enable_strip ;
4351
+ else case e in # (
4352
+ e) strip_debug=yes ;;
4353
+ esac
4354
+ fi
4355
+
4356
+
4357
+ if test " x$strip_debug " ! = xyes
4358
+ then :
4359
+ gcc_install_target=install
4360
+
4361
+ else case e in # (
4362
+ e) gcc_install_target=install-strip
4363
+ ;;
4364
+ esac
4365
+ fi
4366
+
4344
4367
4345
4368
4346
4369
{
Original file line number Diff line number Diff line change @@ -287,6 +287,16 @@ AS_IF([test "x$enable_host_gcc" != xyes],
287
287
[ AC_SUBST ( enable_host_gcc , -- disable-host-gcc ) ] ,
288
288
[ AC_SUBST ( enable_host_gcc , -- enable-host-gcc ) ] )
289
289
290
+ AC_ARG_ENABLE ( strip ,
291
+ [ AS_HELP_STRING ( [ --disable-strip] ,
292
+ [ Do not strip debug symbols at install time] ) ] ,
293
+ [ ] ,
294
+ [ strip_debug=yes] )
295
+
296
+ AS_IF ( [ test "x$strip_debug" != xyes] ,
297
+ [ AC_SUBST ( gcc_install_target , install ) ] ,
298
+ [ AC_SUBST ( gcc_install_target , install-strip ) ] )
299
+
290
300
AC_DEFUN ( [ AX_ARG_WITH_SRC] ,
291
301
[ {m4_pushdef ( [ opt_name] , with_$1 _src )
292
302
AC_ARG_WITH ( $1 - src ,
You can’t perform that action at this time.
0 commit comments