libsanitizer: Add AM_CCASFLAGS to Makefile.am

commit 9069eb28d4
Author: Igor Tsimbalist <igor.v.tsimbalist@intel.com>
Date:   Fri Nov 17 22:34:50 2017 +0100

    Enable building libsanitizer with Intel CET

    libsanitizer/
            * acinclude.m4: Add enable.m4 and cet.m4.
            * Makefile.in: Regenerate.
            * asan/Makefile.am: Update AM_CXXFLAGS.
            * asan/Makefile.in: Regenerate.
            * configure: Likewise.
            * configure.ac: Set CET_FLAGS. Update EXTRA_CFLAGS,
            EXTRA_CXXFLAGS, EXTRA_ASFLAGS.
            * interception/Makefile.am: Update AM_CXXFLAGS.
            * interception/Makefile.in: Regenerate.
            * libbacktrace/Makefile.am: Update AM_CFLAGS, AM_CXXFLAGS.
            * libbacktrace/Makefile.in: Regenerate.
            * lsan/Makefile.am: Update AM_CXXFLAGS.
            * lsan/Makefile.in: Regenerate.
            * sanitizer_common/Makefile.am: Update AM_CXXFLAGS,
            AM_CCASFLAGS.
            * sanitizer_common/sanitizer_linux_x86_64.S: Include cet.h.
            Add _CET_ENDBR macro.
            * sanitizer_common/Makefile.in: Regenerate.
            * tsan/Makefile.am: Update AM_CXXFLAGS.
            * tsan/Makefile.in: Regenerate.
            * tsan/tsan_rtl_amd64.S Include cet.h. Add _CET_ENDBR macro.
            * ubsan/Makefile.am: Update AM_CXXFLAGS.
            * ubsan/Makefile.in: Regenerate.

failed to add EXTRA_ASFLAGS to AM_CCASFLAGS in all Makefile.am.  As
the result, CET aren't enabled in all assembly codes.

Add AM_CCASFLAGS to Makefile.am to compile assembly codes with $CET_FLAGS.

	PR sanitizer/102632
	* asan/Makefile.am (AM_CCASFLAGS): New.  Set to $(EXTRA_ASFLAGS).
	* hwasan/Makefile.am (AM_CCASFLAGS): Likewise.
	* interception/Makefile.am (AM_CCASFLAGS): Likewise.
	* lsan/Makefile.am (AM_CCASFLAGS): Likewise.
	* tsan/Makefile.am (AM_CCASFLAGS): Likewise.
	* ubsan/Makefile.am (AM_CCASFLAGS): Likewise.
	* asan/Makefile.in: Regenerate.
	* hwasan/Makefile.in: Likewise.
	* interception/Makefile.in: Likewise.
	* lsan/Makefile.in: Likewise.
	* tsan/Makefile.in: Likewise.
	* ubsan/Makefile.in: Likewise.
This commit is contained in:
H.J. Lu 2021-09-10 06:13:59 -07:00
parent 0ee3dc6052
commit a23653c6a6
12 changed files with 12 additions and 0 deletions

View File

@ -11,6 +11,7 @@ AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long
AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS)
AM_CXXFLAGS += -std=gnu++14
AM_CXXFLAGS += $(EXTRA_CXXFLAGS)
AM_CCASFLAGS = $(EXTRA_ASFLAGS)
ACLOCAL_AMFLAGS = -I $(top_srcdir) -I $(top_srcdir)/config
toolexeclib_LTLIBRARIES = libasan.la

View File

@ -421,6 +421,7 @@ AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic \
-fomit-frame-pointer -funwind-tables -fvisibility=hidden \
-Wno-variadic-macros -fno-ipa-icf \
$(LIBSTDCXX_RAW_CXX_CXXFLAGS) -std=gnu++14 $(EXTRA_CXXFLAGS)
AM_CCASFLAGS = $(EXTRA_ASFLAGS)
ACLOCAL_AMFLAGS = -I $(top_srcdir) -I $(top_srcdir)/config
toolexeclib_LTLIBRARIES = libasan.la
nodist_toolexeclib_HEADERS = libasan_preinit.o

View File

@ -8,6 +8,7 @@ AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long
AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS)
AM_CXXFLAGS += -std=gnu++14
AM_CXXFLAGS += $(EXTRA_CXXFLAGS)
AM_CCASFLAGS = $(EXTRA_ASFLAGS)
ACLOCAL_AMFLAGS = -I $(top_srcdir) -I $(top_srcdir)/config
toolexeclib_LTLIBRARIES = libhwasan.la

View File

@ -409,6 +409,7 @@ AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic \
-funwind-tables -fvisibility=hidden -Wno-variadic-macros \
-fno-ipa-icf $(LIBSTDCXX_RAW_CXX_CXXFLAGS) -std=gnu++14 \
$(EXTRA_CXXFLAGS)
AM_CCASFLAGS = $(EXTRA_ASFLAGS)
ACLOCAL_AMFLAGS = -I $(top_srcdir) -I $(top_srcdir)/config
toolexeclib_LTLIBRARIES = libhwasan.la
hwasan_files = \

View File

@ -8,6 +8,7 @@ AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long
AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS)
AM_CXXFLAGS += -std=gnu++14
AM_CXXFLAGS += $(EXTRA_CXXFLAGS)
AM_CCASFLAGS = $(EXTRA_ASFLAGS)
ACLOCAL_AMFLAGS = -I m4
noinst_LTLIBRARIES = libinterception.la

View File

@ -339,6 +339,7 @@ AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic \
-fomit-frame-pointer -funwind-tables -fvisibility=hidden \
-Wno-variadic-macros $(LIBSTDCXX_RAW_CXX_CXXFLAGS) \
-std=gnu++14 $(EXTRA_CXXFLAGS)
AM_CCASFLAGS = $(EXTRA_ASFLAGS)
ACLOCAL_AMFLAGS = -I m4
noinst_LTLIBRARIES = libinterception.la
interception_files = \

View File

@ -8,6 +8,7 @@ AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long
AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS)
AM_CXXFLAGS += -std=gnu++14
AM_CXXFLAGS += $(EXTRA_CXXFLAGS)
AM_CCASFLAGS = $(EXTRA_ASFLAGS)
ACLOCAL_AMFLAGS = -I m4
noinst_LTLIBRARIES = libsanitizer_lsan.la

View File

@ -384,6 +384,7 @@ AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic \
-fomit-frame-pointer -funwind-tables -fvisibility=hidden \
-Wno-variadic-macros $(LIBSTDCXX_RAW_CXX_CXXFLAGS) \
-std=gnu++14 $(EXTRA_CXXFLAGS)
AM_CCASFLAGS = $(EXTRA_ASFLAGS)
ACLOCAL_AMFLAGS = -I m4
noinst_LTLIBRARIES = libsanitizer_lsan.la
@LSAN_SUPPORTED_TRUE@toolexeclib_LTLIBRARIES = liblsan.la

View File

@ -8,6 +8,7 @@ AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long
AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS)
AM_CXXFLAGS += -std=gnu++14
AM_CXXFLAGS += $(EXTRA_CXXFLAGS)
AM_CCASFLAGS = $(EXTRA_ASFLAGS)
ACLOCAL_AMFLAGS = -I m4
toolexeclib_LTLIBRARIES = libtsan.la

View File

@ -413,6 +413,7 @@ AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic \
-fomit-frame-pointer -funwind-tables -fvisibility=hidden \
-Wno-variadic-macros $(LIBSTDCXX_RAW_CXX_CXXFLAGS) \
-std=gnu++14 $(EXTRA_CXXFLAGS)
AM_CCASFLAGS = $(EXTRA_ASFLAGS)
ACLOCAL_AMFLAGS = -I m4
toolexeclib_LTLIBRARIES = libtsan.la
nodist_toolexeclib_HEADERS = libtsan_preinit.o

View File

@ -8,6 +8,7 @@ AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long
AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS)
AM_CXXFLAGS += -std=gnu++14
AM_CXXFLAGS += $(EXTRA_CXXFLAGS)
AM_CCASFLAGS = $(EXTRA_ASFLAGS)
ACLOCAL_AMFLAGS = -I m4
toolexeclib_LTLIBRARIES = libubsan.la

View File

@ -378,6 +378,7 @@ AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic \
-fomit-frame-pointer -funwind-tables -fvisibility=hidden \
-Wno-variadic-macros $(LIBSTDCXX_RAW_CXX_CXXFLAGS) \
-std=gnu++14 $(EXTRA_CXXFLAGS)
AM_CCASFLAGS = $(EXTRA_ASFLAGS)
ACLOCAL_AMFLAGS = -I m4
toolexeclib_LTLIBRARIES = libubsan.la
ubsan_plugin_files = \