Sanitized GCC will be built in ASan projects.
Change-Id: Id91425e2895f63ec92c8e83fb96f93aaade67728
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
STAGE2_CFLAGS += -fsanitize=address
STAGE3_CFLAGS += -fsanitize=address
-POSTSTAGE1_LDFLAGS += -fsanitize=address -static-libasan \
+POSTSTAGE1_LDFLAGS += -fsanitize=address \
-B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ \
-B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/asan/ \
-B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/asan/.libs
%global gcc_release `sed -e 's/^.*-//g' %{_builddir}/gcc-%{version}/gcc/LINARO-VERSION`
%build
+%{?asan:
+%gcc_unforce_options
+export ac_cv_search_dlopen="-ldl"
+}
rm -rf obj
mkdir obj
cd obj
%{!?cross: \
--enable-libcc1 \
--enable-libgfortran \
+ %{?asan:--enable-bootstrap --with-build-config=bootstrap-asan} \
%ifarch armv7l
--with-arch=armv7-a \
--with-tune=cortex-a8 \
--host=%{host_arch} \
--build=%{host_arch}
-
-
make BOOT_CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
%{?gcc_run_tests:
echo "Run testsuite"
%global gcc_release `sed -e 's/^.*-//g' %{_builddir}/gcc-%{version}/gcc/LINARO-VERSION`
%build
+%{?asan:
+%gcc_unforce_options
+export ac_cv_search_dlopen="-ldl"
+}
rm -rf obj
mkdir obj
cd obj
%{!?cross: \
--enable-libcc1 \
--enable-libgfortran \
+ %{?asan:--enable-bootstrap --with-build-config=bootstrap-asan} \
%ifarch armv7l
--with-arch=armv7-a \
--with-tune=cortex-a8 \
--host=%{host_arch} \
--build=%{host_arch}
-
-
make BOOT_CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
%{?gcc_run_tests:
echo "Run testsuite"
%global gcc_release `sed -e 's/^.*-//g' %{_builddir}/gcc-%{version}/gcc/LINARO-VERSION`
%build
+%{?asan:
+%gcc_unforce_options
+export ac_cv_search_dlopen="-ldl"
+}
rm -rf obj
mkdir obj
cd obj
%{!?cross: \
--enable-libcc1 \
--enable-libgfortran \
+ %{?asan:--enable-bootstrap --with-build-config=bootstrap-asan} \
%ifarch armv7l
--with-arch=armv7-a \
--with-tune=cortex-a8 \
--host=%{host_arch} \
--build=%{host_arch}
-
-
make BOOT_CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
%{?gcc_run_tests:
echo "Run testsuite"