File tree Expand file tree Collapse file tree 3 files changed +33
-4
lines changed Expand file tree Collapse file tree 3 files changed +33
-4
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ WITH_ABI ?= @WITH_ABI@
35
35
WITH_TUNE ?= @WITH_TUNE@
36
36
WITH_ISA_SPEC ?= @WITH_ISA_SPEC@
37
37
SYSROOT := $(INSTALL_DIR ) /sysroot
38
+ ENABLE_LIBSANITIZER ?= @enable_libsanitizer@
38
39
39
40
SHELL := /bin/sh
40
41
AWK := @GAWK@
@@ -410,9 +411,6 @@ stamps/build-gcc-linux-stage2: $(GCC_SRCDIR) $(GCC_SRC_GIT) $(addprefix stamps/b
410
411
stamps/build-glibc-linux-headers
411
412
rm -rf $@ $(notdir $@)
412
413
mkdir $(notdir $@)
413
- # libsanitizer not supported rv32,
414
- # but it will break the rv64 multi-lib build, so we disable that
415
- # temporally untill rv32 supported.
416
414
cd $(notdir $@) && $</configure \
417
415
--target=$(LINUX_TUPLE) \
418
416
$(CONFIGURE_HOST) \
@@ -426,7 +424,7 @@ stamps/build-gcc-linux-stage2: $(GCC_SRCDIR) $(GCC_SRC_GIT) $(addprefix stamps/b
426
424
--disable-libmudflap \
427
425
--disable-libssp \
428
426
--disable-libquadmath \
429
- --disable-libsanitizer \
427
+ $(ENABLE_LIBSANITIZER) \
430
428
--disable-nls \
431
429
--disable-bootstrap \
432
430
--src=$(gccsrcdir) \
Original file line number Diff line number Diff line change @@ -585,6 +585,7 @@ PACKAGE_URL=''
585
585
ac_subst_vars=' LTLIBOBJS
586
586
LIBOBJS
587
587
with_linux_headers_src
588
+ enable_libsanitizer
588
589
with_qemu_src
589
590
with_gdb_src
590
591
with_musl_src
@@ -692,6 +693,7 @@ with_musl_src
692
693
with_gdb_src
693
694
with_qemu_src
694
695
with_linux_headers_src
696
+ enable_libsanitizer
695
697
'
696
698
ac_precious_vars=' build_alias
697
699
host_alias
@@ -1329,6 +1331,7 @@ Optional Features:
1329
1331
slow, only enable it when developing gcc
1330
1332
[--disable-gcc-checking]
1331
1333
--disable-gdb Don't build GDB, as it's not upstream
1334
+ --enable-libsanitizer Build libsanitizer, which only supports rv64
1332
1335
1333
1336
Optional Packages:
1334
1337
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -3675,6 +3678,23 @@ else
3675
3678
fi
3676
3679
3677
3680
3681
+ # Check whether --enable-libsanitizer was given.
3682
+ if test " ${enable_libsanitizer+set} " = set ; then :
3683
+ enableval=$enable_libsanitizer ;
3684
+ else
3685
+ enable_libsanitizer=no
3686
+
3687
+ fi
3688
+
3689
+
3690
+ if test " x$enable_libsanitizer " ! = xno; then :
3691
+ enable_libsanitizer=--enable-libsanitizer
3692
+
3693
+ else
3694
+ enable_libsanitizer=--disable-libsanitizer
3695
+
3696
+ fi
3697
+
3678
3698
if test " x$with_linux_headers_src " ! = xdefault; then :
3679
3699
with_linux_headers_src=$with_linux_headers_src
3680
3700
Original file line number Diff line number Diff line change @@ -242,6 +242,17 @@ AC_ARG_WITH(linux-headers-src,
242
242
[ with_linux_headers_src=default]
243
243
)
244
244
245
+ AC_ARG_ENABLE ( libsanitizer ,
246
+ [ AS_HELP_STRING ( [ --enable-libsanitizer] ,
247
+ [ Build libsanitizer, which only supports rv64] ) ] ,
248
+ [ ] ,
249
+ [ enable_libsanitizer=no]
250
+ )
251
+
252
+ AS_IF ( [ test "x$enable_libsanitizer" != xno] ,
253
+ [ AC_SUBST ( enable_libsanitizer , -- enable-libsanitizer ) ] ,
254
+ [ AC_SUBST ( enable_libsanitizer , -- disable-libsanitizer ) ] )
255
+
245
256
AS_IF ( [ test "x$with_linux_headers_src" != xdefault] ,
246
257
[ AC_SUBST ( with_linux_headers_src ,$with_linux_headers_src ) ] ,
247
258
[ AC_SUBST ( with_linux_headers_src ,"\$ ( srcdir ) / linux-headers/include" ) ] )
You can’t perform that action at this time.
0 commit comments