public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] Remove AS usage Date: Thu, 9 Jun 2022 21:27:13 +0000 (GMT) [thread overview] Message-ID: <20220609212713.20541386CE67@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5e99d673eb33a3676d0ecf9cc062080549afb177 commit 5e99d673eb33a3676d0ecf9cc062080549afb177 Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> Date: Thu Jun 9 10:42:24 2022 -0300 Remove AS usage There is no direct usage assembler usage, all uses are through compiler. Diff: --- aclocal.m4 | 6 ---- configure | 85 ------------------------------------------------ configure.ac | 5 --- sysdeps/x86/configure | 18 +++++----- sysdeps/x86/configure.ac | 12 +++---- 5 files changed, 15 insertions(+), 111 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 3b4df4a371..94c931b4f2 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -118,7 +118,6 @@ case "$CC" in *fuse-ld=lld*) LDNAME=ld.lld;; *) LDNAME=ld;; esac -AS=`$CC -print-prog-name=as` LD=`$CC -print-prog-name=$LDNAME` AR=`$CC -print-prog-name=ar` AC_SUBST(AR) @@ -130,11 +129,6 @@ GPROF=`$CC -print-prog-name=gprof` AC_SUBST(GPROF) # Determine whether we are using GNU binutils. -AC_CACHE_CHECK(whether $AS is GNU as, libc_cv_prog_as_gnu, -[LIBC_PROG_FOO_GNU($AS, libc_cv_prog_as_gnu=yes, libc_cv_prog_as_gnu=no)]) -rm -f a.out -gnu_as=$libc_cv_prog_as_gnu - AC_CACHE_CHECK(whether $LD is GNU ld, libc_cv_prog_ld_gnu, [LIBC_PROG_FOO_GNU($LD, libc_cv_prog_ld_gnu=yes, libc_cv_prog_ld_gnu=no)]) gnu_ld=$libc_cv_prog_ld_gnu diff --git a/configure b/configure index 47f423cd02..d7292d9c12 100755 --- a/configure +++ b/configure @@ -646,7 +646,6 @@ MAKEINFO MSGFMT MAKE LD -AS GPROF OBJCOPY OBJDUMP @@ -4576,7 +4575,6 @@ case "$CC" in *fuse-ld=lld*) LDNAME=ld.lld;; *) LDNAME=ld;; esac -AS=`$CC -print-prog-name=as` LD=`$CC -print-prog-name=$LDNAME` AR=`$CC -print-prog-name=ar` @@ -4588,25 +4586,6 @@ GPROF=`$CC -print-prog-name=gprof` # Determine whether we are using GNU binutils. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $AS is GNU as" >&5 -$as_echo_n "checking whether $AS is GNU as... " >&6; } -if ${libc_cv_prog_as_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Most GNU programs take a -v and spit out some text including -# the word 'GNU'. Some try to read stdin, so give them /dev/null. -if $AS -o conftest -v </dev/null 2>&1 | grep GNU > /dev/null 2>&1; then - libc_cv_prog_as_gnu=yes -else - libc_cv_prog_as_gnu=no -fi -rm -fr contest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_prog_as_gnu" >&5 -$as_echo "$libc_cv_prog_as_gnu" >&6; } -rm -f a.out -gnu_as=$libc_cv_prog_as_gnu - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $LD is GNU ld" >&5 $as_echo_n "checking whether $LD is GNU ld... " >&6; } if ${libc_cv_prog_ld_gnu+:} false; then : @@ -4627,70 +4606,6 @@ gnu_ld=$libc_cv_prog_ld_gnu # Accept binutils 2.25 or newer. -for ac_prog in $AS -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AS="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AS=$ac_cv_prog_AS -if test -n "$AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 -$as_echo "$AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AS" && break -done - -if test -z "$AS"; then - ac_verc_fail=yes -else - # Found it, now check the version. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $AS" >&5 -$as_echo_n "checking version of $AS... " >&6; } - ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 2.1[0-9][0-9]*|2.2[5-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5 -$as_echo "$ac_prog_version" >&6; } -fi -if test $ac_verc_fail = yes; then - AS=: critic_missing="$critic_missing as" -fi - - libc_cv_with_lld=no case $($LD --version) in "GNU gold"*) diff --git a/configure.ac b/configure.ac index 716a800d78..ebacf3192b 100644 --- a/configure.ac +++ b/configure.ac @@ -1003,11 +1003,6 @@ AC_PROG_LN_S LIBC_PROG_BINUTILS # Accept binutils 2.25 or newer. -AC_CHECK_PROG_VER(AS, $AS, --version, - [GNU assembler.* \([0-9]*\.[0-9.]*\)], - [2.1[0-9][0-9]*|2.2[5-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*], - AS=: critic_missing="$critic_missing as") - libc_cv_with_lld=no case $($LD --version) in "GNU gold"*) diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure index baa5e40926..a4a192a55d 100644 --- a/sysdeps/x86/configure +++ b/sysdeps/x86/configure @@ -33,12 +33,12 @@ $as_echo "$libc_cv_x86_cet_available" >&6; } fi if test $enable_cet != no; then # Check if assembler supports CET. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $AS supports CET" >&5 -$as_echo_n "checking whether $AS supports CET... " >&6; } -if ${libc_cv_x86_cet_as+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports CET" >&5 +$as_echo_n "checking whether $CC supports CET... " >&6; } +if ${libc_cv_x86_cet_cc+:} false; then : $as_echo_n "(cached) " >&6 else - cat > conftest.s <<EOF + cat > conftest.S <<EOF incsspd %ecx EOF if { ac_try='${CC-cc} -c $CFLAGS conftest.s -o conftest.o 1>&5' @@ -47,15 +47,15 @@ EOF ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then - libc_cv_x86_cet_as=yes + libc_cv_x86_cet_cc=yes else - libc_cv_x86_cet_as=no + libc_cv_x86_cet_cc=no fi rm -rf conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_x86_cet_as" >&5 -$as_echo "$libc_cv_x86_cet_as" >&6; } - if test $libc_cv_x86_cet_as = no; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_x86_cet_cc" >&5 +$as_echo "$libc_cv_x86_cet_cc" >&6; } + if test $libc_cv_x86_cet_cc = no; then as_fn_error $? "$AS doesn't support CET" "$LINENO" 5 fi fi diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac index 47311522ba..022ace0dd5 100644 --- a/sysdeps/x86/configure.ac +++ b/sysdeps/x86/configure.ac @@ -22,18 +22,18 @@ EOF fi if test $enable_cet != no; then # Check if assembler supports CET. - AC_CACHE_CHECK(whether $AS supports CET, - libc_cv_x86_cet_as, [dnl -cat > conftest.s <<EOF + AC_CACHE_CHECK(whether $CC supports CET, + libc_cv_x86_cet_cc, [dnl +cat > conftest.S <<EOF incsspd %ecx EOF if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s -o conftest.o 1>&AS_MESSAGE_LOG_FD); then - libc_cv_x86_cet_as=yes + libc_cv_x86_cet_cc=yes else - libc_cv_x86_cet_as=no + libc_cv_x86_cet_cc=no fi rm -rf conftest*]) - if test $libc_cv_x86_cet_as = no; then + if test $libc_cv_x86_cet_cc = no; then AC_MSG_ERROR([$AS doesn't support CET]) fi fi
next reply other threads:[~2022-06-09 21:27 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-09 21:27 Adhemerval Zanella [this message] 2022-10-04 13:00 Adhemerval Zanella 2022-10-28 17:42 Adhemerval Zanella
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220609212713.20541386CE67@sourceware.org \ --to=azanella@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).