From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10743 invoked from network); 19 Oct 2020 22:41:07 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 19 Oct 2020 22:41:07 -0000 Received: (qmail 1513 invoked by uid 550); 19 Oct 2020 22:40:53 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 1279 invoked from network); 19 Oct 2020 22:40:51 -0000 IronPort-SDR: MbjD4gnUt+eZzFIuBhENiMiJ9EpyimzYNBfncryoncZYa4j0E8QZEOdpqA0yyhpVB4Zy7DlFlj lkDpHO8fQr+Q== X-IronPort-AV: E=McAfee;i="6000,8403,9779"; a="231313850" X-IronPort-AV: E=Sophos;i="5.77,395,1596524400"; d="scan'208";a="231313850" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False IronPort-SDR: uAGf1lWe1GcGvToNsMx9vvGWjNY8PfgoIu2TD5mEoW6Gg9KzGtCWjWFgETyCluLNvzqkKLGbDK Gz1jqZSCWvyg== X-IronPort-AV: E=Sophos;i="5.77,395,1596524400"; d="scan'208";a="465692040" From: Joao Moreira To: musl@lists.openwall.com Date: Mon, 19 Oct 2020 15:43:39 -0700 Message-Id: <20201019224342.53303-2-joao.moreira@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201019224342.53303-1-joao.moreira@intel.com> References: <20201019224342.53303-1-joao.moreira@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [musl] [PATCH 1/4] Support ASFLAGS in configure and Makefile Currently MUSL does not support setting ASFLAGS (assembler flags) through configure. Thus, add support to ASFLAGS, which are passed similarly as CFLAGS. Signed-off-by: Joao Moreira --- Makefile | 4 ++-- configure | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e8cc4436..f75a946d 100644 --- a/Makefile +++ b/Makefile @@ -135,9 +135,9 @@ CC_CMD = $(CC) $(CFLAGS_ALL) -c -o $@ $< # Choose invocation of assembler to be used ifeq ($(ADD_CFI),yes) - AS_CMD = LC_ALL=C awk -f $(srcdir)/tools/add-cfi.common.awk -f $(srcdir)/tools/add-cfi.$(ARCH).awk $< | $(CC) $(CFLAGS_ALL) -x assembler -c -o $@ - + AS_CMD = LC_ALL=C awk -f $(srcdir)/tools/add-cfi.common.awk -f $(srcdir)/tools/add-cfi.$(ARCH).awk $< | $(CC) $(CFLAGS_ALL) $(ASFLAGS) -x assembler -c -o $@ - else - AS_CMD = $(CC_CMD) + AS_CMD = $(CC_CMD) $(ASFLAGS) endif obj/%.o: $(srcdir)/%.s diff --git a/configure b/configure index 947adf41..4ad78b27 100755 --- a/configure +++ b/configure @@ -41,6 +41,7 @@ Optional packages: Some influential environment variables: CC C compiler command [detected] CFLAGS C compiler flags [-Os -pipe ...] + ASFLAGS Assembler flags [none] CROSS_COMPILE prefix for cross compiler and tools [none] LIBCC compiler runtime library [detected] @@ -181,6 +182,7 @@ AR=*) AR=${arg#*=} ;; RANLIB=*) RANLIB=${arg#*=} ;; CC=*) CC=${arg#*=} ;; CFLAGS=*) CFLAGS=${arg#*=} ;; +ASFLAGS=*) ASFLAGS=${arg#*=} ;; CPPFLAGS=*) CPPFLAGS=${arg#*=} ;; LDFLAGS=*) LDFLAGS=${arg#*=} ;; CROSS_COMPILE=*) CROSS_COMPILE=${arg#*=} ;; @@ -787,6 +789,7 @@ includedir = $includedir syslibdir = $syslibdir CC = $CC CFLAGS = $CFLAGS +ASFLAGS = $ASFLAGS CFLAGS_AUTO = $CFLAGS_AUTO CFLAGS_C99FSE = $CFLAGS_C99FSE CFLAGS_MEMOPS = $CFLAGS_MEMOPS -- 2.27.0