public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] elf: Only build tst-unique{1, 2} if compiler supports gnu_unique_object
@ 2022-03-29 20:35 Adhemerval Zanella
  0 siblings, 0 replies; 10+ messages in thread
From: Adhemerval Zanella @ 2022-03-29 20:35 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1edc155ccc78d44bdcab88421e71c114e1cf234d

commit 1edc155ccc78d44bdcab88421e71c114e1cf234d
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Mar 28 21:20:01 2022 +0000

    elf: Only build tst-unique{1,2} if compiler supports gnu_unique_object

Diff:
---
 configure    | 23 +++++++++++++++++++++++
 configure.ac | 17 +++++++++++++++++
 elf/Makefile | 20 ++++++++++++++------
 3 files changed, 54 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index 6abcd4f479..7c5bf74237 100755
--- a/configure
+++ b/configure
@@ -6804,6 +6804,29 @@ $as_echo "$libc_cv_cc_charset_ascii" >&6; }
 config_vars="$config_vars
 config-cflags-charset-ascii = $libc_cv_cc_charset_ascii"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports gnu_unique_object" >&5
+$as_echo_n "checking if $CC supports gnu_unique_object... " >&6; }
+if ${libc_cv_cc_gnu_unique_object+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.S <<EOF
+.type foo, %gnu_unique_object;
+.globl foo;
+foo:
+EOF
+libc_cv_cc_gnu_unique_object=no
+if ${CC-cc} $CFLAGS $CPPFLAGS -c conftest.S 1>&5 2>&5;
+then
+  LC_ALL=C $READELF -s conftest.o | grep -q 'UNIQUE' && { libc_cv_cc_gnu_unique_object=yes
+  }
+fi
+rm -rf conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_gnu_unique_object" >&5
+$as_echo "$libc_cv_cc_gnu_unique_object" >&6; }
+config_vars="$config_vars
+config-gnu-unique-object = $libc_cv_cc_gnu_unique_object"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgd" >&5
 $as_echo_n "checking for libgd... " >&6; }
 if test "$with_gd" != "no"; then
diff --git a/configure.ac b/configure.ac
index 3024e72cb9..119fa4c300 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1751,6 +1751,23 @@ LIBC_TRY_CC_OPTION([-Werror -finput-charset=ascii],
 LIBC_CONFIG_VAR([config-cflags-charset-ascii],
 		[$libc_cv_cc_charset_ascii])
 
+dnl Check if compiler supports %gnu_unique_object
+AC_CACHE_CHECK([if $CC supports gnu_unique_object], libc_cv_cc_gnu_unique_object, [dnl
+cat > conftest.S <<EOF
+.type foo, %gnu_unique_object;
+.globl foo;
+foo:
+EOF
+libc_cv_cc_gnu_unique_object=no
+if ${CC-cc} $CFLAGS $CPPFLAGS -c conftest.S 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
+then
+  LC_ALL=C $READELF -s conftest.o | grep -q 'UNIQUE' && { libc_cv_cc_gnu_unique_object=yes
+  }
+fi
+rm -rf conftest*])
+LIBC_CONFIG_VAR([config-gnu-unique-object],
+		[$libc_cv_cc_gnu_unique_object])
+
 dnl Check whether we have the gd library available.
 AC_MSG_CHECKING(for libgd)
 if test "$with_gd" != "no"; then
diff --git a/elf/Makefile b/elf/Makefile
index 320d4c778a..724e35f0c4 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -457,8 +457,6 @@ tests += \
   tst-tls-ie \
   tst-tls-ie-dlmopen \
   tst-tls-manydynamic \
-  tst-unique1 \
-  tst-unique2 \
   tst-unwind-ctor \
   tst-unwind-main \
   unload3 \
@@ -469,6 +467,12 @@ tests += \
   unload8 \
   valgrind-test \
   # tests
+ifeq (yes,$(config-gnu-unique-object))
+tests += \
+  tst-unique1 \
+  tst-unique2 \
+  # tests
+endif
 tests-cxx = \
   tst-dlopen-nodelete-reloc \
   tst-nodelete \
@@ -822,10 +826,6 @@ modules-names = \
   tst-tlsmod7 \
   tst-tlsmod8 \
   tst-tlsmod9 \
-  tst-unique1mod1 \
-  tst-unique1mod2 \
-  tst-unique2mod1 \
-  tst-unique2mod2 \
   tst-unwind-ctor-lib \
   unload2dep \
   unload2mod \
@@ -851,6 +851,14 @@ modules-names = \
   vismod2 \
   vismod3 \
 # modules-names
+ifeq (yes,$(config-gnu-unique-object))
+modules-names += \
+  tst-unique1mod1 \
+  tst-unique1mod2 \
+  tst-unique2mod1 \
+  tst-unique2mod2 \
+# modules-names
+endif
 
 modules-names-cxx = \
   tst-dlopen-nodelete-reloc-mod1 \


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [glibc/azanella/clang] elf: Only build tst-unique{1, 2} if compiler supports gnu_unique_object
@ 2022-06-09 21:24 Adhemerval Zanella
  0 siblings, 0 replies; 10+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 21:24 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=caa636c51c43490c42f37681553eaf1bde05165a

commit caa636c51c43490c42f37681553eaf1bde05165a
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Mar 28 21:20:01 2022 +0000

    elf: Only build tst-unique{1,2} if compiler supports gnu_unique_object

Diff:
---
 configure    | 23 +++++++++++++++++++++++
 configure.ac | 17 +++++++++++++++++
 elf/Makefile | 20 ++++++++++++++------
 3 files changed, 54 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index a651196339..47f423cd02 100755
--- a/configure
+++ b/configure
@@ -6649,6 +6649,29 @@ $as_echo "$libc_cv_cc_charset_ascii" >&6; }
 config_vars="$config_vars
 config-cflags-charset-ascii = $libc_cv_cc_charset_ascii"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports gnu_unique_object" >&5
+$as_echo_n "checking if $CC supports gnu_unique_object... " >&6; }
+if ${libc_cv_cc_gnu_unique_object+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.S <<EOF
+.type foo, %gnu_unique_object;
+.globl foo;
+foo:
+EOF
+libc_cv_cc_gnu_unique_object=no
+if ${CC-cc} $CFLAGS $CPPFLAGS -c conftest.S 1>&5 2>&5;
+then
+  LC_ALL=C $READELF -s conftest.o | grep -q 'UNIQUE' && { libc_cv_cc_gnu_unique_object=yes
+  }
+fi
+rm -rf conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_gnu_unique_object" >&5
+$as_echo "$libc_cv_cc_gnu_unique_object" >&6; }
+config_vars="$config_vars
+config-gnu-unique-object = $libc_cv_cc_gnu_unique_object"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgd" >&5
 $as_echo_n "checking for libgd... " >&6; }
 if test "$with_gd" != "no"; then
diff --git a/configure.ac b/configure.ac
index f002e928a6..716a800d78 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1619,6 +1619,23 @@ LIBC_TRY_CC_OPTION([-Werror -finput-charset=ascii],
 LIBC_CONFIG_VAR([config-cflags-charset-ascii],
 		[$libc_cv_cc_charset_ascii])
 
+dnl Check if compiler supports %gnu_unique_object
+AC_CACHE_CHECK([if $CC supports gnu_unique_object], libc_cv_cc_gnu_unique_object, [dnl
+cat > conftest.S <<EOF
+.type foo, %gnu_unique_object;
+.globl foo;
+foo:
+EOF
+libc_cv_cc_gnu_unique_object=no
+if ${CC-cc} $CFLAGS $CPPFLAGS -c conftest.S 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
+then
+  LC_ALL=C $READELF -s conftest.o | grep -q 'UNIQUE' && { libc_cv_cc_gnu_unique_object=yes
+  }
+fi
+rm -rf conftest*])
+LIBC_CONFIG_VAR([config-gnu-unique-object],
+		[$libc_cv_cc_gnu_unique_object])
+
 dnl Check whether we have the gd library available.
 AC_MSG_CHECKING(for libgd)
 if test "$with_gd" != "no"; then
diff --git a/elf/Makefile b/elf/Makefile
index a1d2b3b518..197143c384 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -463,8 +463,6 @@ tests += \
   tst-tls-ie \
   tst-tls-ie-dlmopen \
   tst-tls-manydynamic \
-  tst-unique1 \
-  tst-unique2 \
   tst-unwind-ctor \
   tst-unwind-main \
   unload3 \
@@ -475,6 +473,12 @@ tests += \
   unload8 \
   valgrind-test \
   # tests
+ifeq (yes,$(config-gnu-unique-object))
+tests += \
+  tst-unique1 \
+  tst-unique2 \
+  # tests
+endif
 tests-cxx = \
   tst-dlopen-nodelete-reloc \
   tst-nodelete \
@@ -910,10 +914,6 @@ modules-names += \
   tst-tlsmod7 \
   tst-tlsmod8 \
   tst-tlsmod9 \
-  tst-unique1mod1 \
-  tst-unique1mod2 \
-  tst-unique2mod1 \
-  tst-unique2mod2 \
   tst-unwind-ctor-lib \
   unload2dep \
   unload2mod \
@@ -939,6 +939,14 @@ modules-names += \
   vismod2 \
   vismod3 \
 # modules-names
+ifeq (yes,$(config-gnu-unique-object))
+modules-names += \
+  tst-unique1mod1 \
+  tst-unique1mod2 \
+  tst-unique2mod1 \
+  tst-unique2mod2 \
+# modules-names
+endif
 
 modules-names-cxx = \
   tst-dlopen-nodelete-reloc-mod1 \


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [glibc/azanella/clang] elf: Only build tst-unique{1, 2} if compiler supports gnu_unique_object
@ 2022-06-09 13:21 Adhemerval Zanella
  0 siblings, 0 replies; 10+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 13:21 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=caa636c51c43490c42f37681553eaf1bde05165a

commit caa636c51c43490c42f37681553eaf1bde05165a
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Mar 28 21:20:01 2022 +0000

    elf: Only build tst-unique{1,2} if compiler supports gnu_unique_object

Diff:
---
 configure    | 23 +++++++++++++++++++++++
 configure.ac | 17 +++++++++++++++++
 elf/Makefile | 20 ++++++++++++++------
 3 files changed, 54 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index a651196339..47f423cd02 100755
--- a/configure
+++ b/configure
@@ -6649,6 +6649,29 @@ $as_echo "$libc_cv_cc_charset_ascii" >&6; }
 config_vars="$config_vars
 config-cflags-charset-ascii = $libc_cv_cc_charset_ascii"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports gnu_unique_object" >&5
+$as_echo_n "checking if $CC supports gnu_unique_object... " >&6; }
+if ${libc_cv_cc_gnu_unique_object+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.S <<EOF
+.type foo, %gnu_unique_object;
+.globl foo;
+foo:
+EOF
+libc_cv_cc_gnu_unique_object=no
+if ${CC-cc} $CFLAGS $CPPFLAGS -c conftest.S 1>&5 2>&5;
+then
+  LC_ALL=C $READELF -s conftest.o | grep -q 'UNIQUE' && { libc_cv_cc_gnu_unique_object=yes
+  }
+fi
+rm -rf conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_gnu_unique_object" >&5
+$as_echo "$libc_cv_cc_gnu_unique_object" >&6; }
+config_vars="$config_vars
+config-gnu-unique-object = $libc_cv_cc_gnu_unique_object"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgd" >&5
 $as_echo_n "checking for libgd... " >&6; }
 if test "$with_gd" != "no"; then
diff --git a/configure.ac b/configure.ac
index f002e928a6..716a800d78 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1619,6 +1619,23 @@ LIBC_TRY_CC_OPTION([-Werror -finput-charset=ascii],
 LIBC_CONFIG_VAR([config-cflags-charset-ascii],
 		[$libc_cv_cc_charset_ascii])
 
+dnl Check if compiler supports %gnu_unique_object
+AC_CACHE_CHECK([if $CC supports gnu_unique_object], libc_cv_cc_gnu_unique_object, [dnl
+cat > conftest.S <<EOF
+.type foo, %gnu_unique_object;
+.globl foo;
+foo:
+EOF
+libc_cv_cc_gnu_unique_object=no
+if ${CC-cc} $CFLAGS $CPPFLAGS -c conftest.S 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
+then
+  LC_ALL=C $READELF -s conftest.o | grep -q 'UNIQUE' && { libc_cv_cc_gnu_unique_object=yes
+  }
+fi
+rm -rf conftest*])
+LIBC_CONFIG_VAR([config-gnu-unique-object],
+		[$libc_cv_cc_gnu_unique_object])
+
 dnl Check whether we have the gd library available.
 AC_MSG_CHECKING(for libgd)
 if test "$with_gd" != "no"; then
diff --git a/elf/Makefile b/elf/Makefile
index a1d2b3b518..197143c384 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -463,8 +463,6 @@ tests += \
   tst-tls-ie \
   tst-tls-ie-dlmopen \
   tst-tls-manydynamic \
-  tst-unique1 \
-  tst-unique2 \
   tst-unwind-ctor \
   tst-unwind-main \
   unload3 \
@@ -475,6 +473,12 @@ tests += \
   unload8 \
   valgrind-test \
   # tests
+ifeq (yes,$(config-gnu-unique-object))
+tests += \
+  tst-unique1 \
+  tst-unique2 \
+  # tests
+endif
 tests-cxx = \
   tst-dlopen-nodelete-reloc \
   tst-nodelete \
@@ -910,10 +914,6 @@ modules-names += \
   tst-tlsmod7 \
   tst-tlsmod8 \
   tst-tlsmod9 \
-  tst-unique1mod1 \
-  tst-unique1mod2 \
-  tst-unique2mod1 \
-  tst-unique2mod2 \
   tst-unwind-ctor-lib \
   unload2dep \
   unload2mod \
@@ -939,6 +939,14 @@ modules-names += \
   vismod2 \
   vismod3 \
 # modules-names
+ifeq (yes,$(config-gnu-unique-object))
+modules-names += \
+  tst-unique1mod1 \
+  tst-unique1mod2 \
+  tst-unique2mod1 \
+  tst-unique2mod2 \
+# modules-names
+endif
 
 modules-names-cxx = \
   tst-dlopen-nodelete-reloc-mod1 \


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [glibc/azanella/clang] elf: Only build tst-unique{1, 2} if compiler supports gnu_unique_object
@ 2022-06-03 14:10 Adhemerval Zanella
  0 siblings, 0 replies; 10+ messages in thread
From: Adhemerval Zanella @ 2022-06-03 14:10 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2becbbd95fb521156cb17bb019612b78fcf39ebb

commit 2becbbd95fb521156cb17bb019612b78fcf39ebb
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Mar 28 21:20:01 2022 +0000

    elf: Only build tst-unique{1,2} if compiler supports gnu_unique_object

Diff:
---
 configure    | 23 +++++++++++++++++++++++
 configure.ac | 17 +++++++++++++++++
 elf/Makefile | 20 ++++++++++++++------
 3 files changed, 54 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index a651196339..47f423cd02 100755
--- a/configure
+++ b/configure
@@ -6649,6 +6649,29 @@ $as_echo "$libc_cv_cc_charset_ascii" >&6; }
 config_vars="$config_vars
 config-cflags-charset-ascii = $libc_cv_cc_charset_ascii"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports gnu_unique_object" >&5
+$as_echo_n "checking if $CC supports gnu_unique_object... " >&6; }
+if ${libc_cv_cc_gnu_unique_object+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.S <<EOF
+.type foo, %gnu_unique_object;
+.globl foo;
+foo:
+EOF
+libc_cv_cc_gnu_unique_object=no
+if ${CC-cc} $CFLAGS $CPPFLAGS -c conftest.S 1>&5 2>&5;
+then
+  LC_ALL=C $READELF -s conftest.o | grep -q 'UNIQUE' && { libc_cv_cc_gnu_unique_object=yes
+  }
+fi
+rm -rf conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_gnu_unique_object" >&5
+$as_echo "$libc_cv_cc_gnu_unique_object" >&6; }
+config_vars="$config_vars
+config-gnu-unique-object = $libc_cv_cc_gnu_unique_object"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgd" >&5
 $as_echo_n "checking for libgd... " >&6; }
 if test "$with_gd" != "no"; then
diff --git a/configure.ac b/configure.ac
index f002e928a6..716a800d78 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1619,6 +1619,23 @@ LIBC_TRY_CC_OPTION([-Werror -finput-charset=ascii],
 LIBC_CONFIG_VAR([config-cflags-charset-ascii],
 		[$libc_cv_cc_charset_ascii])
 
+dnl Check if compiler supports %gnu_unique_object
+AC_CACHE_CHECK([if $CC supports gnu_unique_object], libc_cv_cc_gnu_unique_object, [dnl
+cat > conftest.S <<EOF
+.type foo, %gnu_unique_object;
+.globl foo;
+foo:
+EOF
+libc_cv_cc_gnu_unique_object=no
+if ${CC-cc} $CFLAGS $CPPFLAGS -c conftest.S 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
+then
+  LC_ALL=C $READELF -s conftest.o | grep -q 'UNIQUE' && { libc_cv_cc_gnu_unique_object=yes
+  }
+fi
+rm -rf conftest*])
+LIBC_CONFIG_VAR([config-gnu-unique-object],
+		[$libc_cv_cc_gnu_unique_object])
+
 dnl Check whether we have the gd library available.
 AC_MSG_CHECKING(for libgd)
 if test "$with_gd" != "no"; then
diff --git a/elf/Makefile b/elf/Makefile
index 7feedb6f6a..86110e9a42 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -463,8 +463,6 @@ tests += \
   tst-tls-ie \
   tst-tls-ie-dlmopen \
   tst-tls-manydynamic \
-  tst-unique1 \
-  tst-unique2 \
   tst-unwind-ctor \
   tst-unwind-main \
   unload3 \
@@ -475,6 +473,12 @@ tests += \
   unload8 \
   valgrind-test \
   # tests
+ifeq (yes,$(config-gnu-unique-object))
+tests += \
+  tst-unique1 \
+  tst-unique2 \
+  # tests
+endif
 tests-cxx = \
   tst-dlopen-nodelete-reloc \
   tst-nodelete \
@@ -910,10 +914,6 @@ modules-names += \
   tst-tlsmod7 \
   tst-tlsmod8 \
   tst-tlsmod9 \
-  tst-unique1mod1 \
-  tst-unique1mod2 \
-  tst-unique2mod1 \
-  tst-unique2mod2 \
   tst-unwind-ctor-lib \
   unload2dep \
   unload2mod \
@@ -939,6 +939,14 @@ modules-names += \
   vismod2 \
   vismod3 \
 # modules-names
+ifeq (yes,$(config-gnu-unique-object))
+modules-names += \
+  tst-unique1mod1 \
+  tst-unique1mod2 \
+  tst-unique2mod1 \
+  tst-unique2mod2 \
+# modules-names
+endif
 
 modules-names-cxx = \
   tst-dlopen-nodelete-reloc-mod1 \


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [glibc/azanella/clang] elf: Only build tst-unique{1, 2} if compiler supports gnu_unique_object
@ 2022-05-13 14:24 Adhemerval Zanella
  0 siblings, 0 replies; 10+ messages in thread
From: Adhemerval Zanella @ 2022-05-13 14:24 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2251ef8c3f4bc9dc575aeb17b42203770688f28f

commit 2251ef8c3f4bc9dc575aeb17b42203770688f28f
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Mar 28 21:20:01 2022 +0000

    elf: Only build tst-unique{1,2} if compiler supports gnu_unique_object

Diff:
---
 configure    | 23 +++++++++++++++++++++++
 configure.ac | 17 +++++++++++++++++
 elf/Makefile | 20 ++++++++++++++------
 3 files changed, 54 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index a651196339..47f423cd02 100755
--- a/configure
+++ b/configure
@@ -6649,6 +6649,29 @@ $as_echo "$libc_cv_cc_charset_ascii" >&6; }
 config_vars="$config_vars
 config-cflags-charset-ascii = $libc_cv_cc_charset_ascii"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports gnu_unique_object" >&5
+$as_echo_n "checking if $CC supports gnu_unique_object... " >&6; }
+if ${libc_cv_cc_gnu_unique_object+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.S <<EOF
+.type foo, %gnu_unique_object;
+.globl foo;
+foo:
+EOF
+libc_cv_cc_gnu_unique_object=no
+if ${CC-cc} $CFLAGS $CPPFLAGS -c conftest.S 1>&5 2>&5;
+then
+  LC_ALL=C $READELF -s conftest.o | grep -q 'UNIQUE' && { libc_cv_cc_gnu_unique_object=yes
+  }
+fi
+rm -rf conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_gnu_unique_object" >&5
+$as_echo "$libc_cv_cc_gnu_unique_object" >&6; }
+config_vars="$config_vars
+config-gnu-unique-object = $libc_cv_cc_gnu_unique_object"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgd" >&5
 $as_echo_n "checking for libgd... " >&6; }
 if test "$with_gd" != "no"; then
diff --git a/configure.ac b/configure.ac
index f002e928a6..716a800d78 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1619,6 +1619,23 @@ LIBC_TRY_CC_OPTION([-Werror -finput-charset=ascii],
 LIBC_CONFIG_VAR([config-cflags-charset-ascii],
 		[$libc_cv_cc_charset_ascii])
 
+dnl Check if compiler supports %gnu_unique_object
+AC_CACHE_CHECK([if $CC supports gnu_unique_object], libc_cv_cc_gnu_unique_object, [dnl
+cat > conftest.S <<EOF
+.type foo, %gnu_unique_object;
+.globl foo;
+foo:
+EOF
+libc_cv_cc_gnu_unique_object=no
+if ${CC-cc} $CFLAGS $CPPFLAGS -c conftest.S 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
+then
+  LC_ALL=C $READELF -s conftest.o | grep -q 'UNIQUE' && { libc_cv_cc_gnu_unique_object=yes
+  }
+fi
+rm -rf conftest*])
+LIBC_CONFIG_VAR([config-gnu-unique-object],
+		[$libc_cv_cc_gnu_unique_object])
+
 dnl Check whether we have the gd library available.
 AC_MSG_CHECKING(for libgd)
 if test "$with_gd" != "no"; then
diff --git a/elf/Makefile b/elf/Makefile
index 0aafe43056..36035acb9e 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -458,8 +458,6 @@ tests += \
   tst-tls-ie \
   tst-tls-ie-dlmopen \
   tst-tls-manydynamic \
-  tst-unique1 \
-  tst-unique2 \
   tst-unwind-ctor \
   tst-unwind-main \
   unload3 \
@@ -470,6 +468,12 @@ tests += \
   unload8 \
   valgrind-test \
   # tests
+ifeq (yes,$(config-gnu-unique-object))
+tests += \
+  tst-unique1 \
+  tst-unique2 \
+  # tests
+endif
 tests-cxx = \
   tst-dlopen-nodelete-reloc \
   tst-nodelete \
@@ -904,10 +908,6 @@ modules-names += \
   tst-tlsmod7 \
   tst-tlsmod8 \
   tst-tlsmod9 \
-  tst-unique1mod1 \
-  tst-unique1mod2 \
-  tst-unique2mod1 \
-  tst-unique2mod2 \
   tst-unwind-ctor-lib \
   unload2dep \
   unload2mod \
@@ -933,6 +933,14 @@ modules-names += \
   vismod2 \
   vismod3 \
 # modules-names
+ifeq (yes,$(config-gnu-unique-object))
+modules-names += \
+  tst-unique1mod1 \
+  tst-unique1mod2 \
+  tst-unique2mod1 \
+  tst-unique2mod2 \
+# modules-names
+endif
 
 modules-names-cxx = \
   tst-dlopen-nodelete-reloc-mod1 \


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [glibc/azanella/clang] elf: Only build tst-unique{1, 2} if compiler supports gnu_unique_object
@ 2022-05-12 19:38 Adhemerval Zanella
  0 siblings, 0 replies; 10+ messages in thread
From: Adhemerval Zanella @ 2022-05-12 19:38 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0a86de2e2c3473e01ee0d46304ef9cc15536ebab

commit 0a86de2e2c3473e01ee0d46304ef9cc15536ebab
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Mar 28 21:20:01 2022 +0000

    elf: Only build tst-unique{1,2} if compiler supports gnu_unique_object

Diff:
---
 configure    | 23 +++++++++++++++++++++++
 configure.ac | 17 +++++++++++++++++
 elf/Makefile | 20 ++++++++++++++------
 3 files changed, 54 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index a651196339..47f423cd02 100755
--- a/configure
+++ b/configure
@@ -6649,6 +6649,29 @@ $as_echo "$libc_cv_cc_charset_ascii" >&6; }
 config_vars="$config_vars
 config-cflags-charset-ascii = $libc_cv_cc_charset_ascii"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports gnu_unique_object" >&5
+$as_echo_n "checking if $CC supports gnu_unique_object... " >&6; }
+if ${libc_cv_cc_gnu_unique_object+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.S <<EOF
+.type foo, %gnu_unique_object;
+.globl foo;
+foo:
+EOF
+libc_cv_cc_gnu_unique_object=no
+if ${CC-cc} $CFLAGS $CPPFLAGS -c conftest.S 1>&5 2>&5;
+then
+  LC_ALL=C $READELF -s conftest.o | grep -q 'UNIQUE' && { libc_cv_cc_gnu_unique_object=yes
+  }
+fi
+rm -rf conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_gnu_unique_object" >&5
+$as_echo "$libc_cv_cc_gnu_unique_object" >&6; }
+config_vars="$config_vars
+config-gnu-unique-object = $libc_cv_cc_gnu_unique_object"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgd" >&5
 $as_echo_n "checking for libgd... " >&6; }
 if test "$with_gd" != "no"; then
diff --git a/configure.ac b/configure.ac
index f002e928a6..716a800d78 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1619,6 +1619,23 @@ LIBC_TRY_CC_OPTION([-Werror -finput-charset=ascii],
 LIBC_CONFIG_VAR([config-cflags-charset-ascii],
 		[$libc_cv_cc_charset_ascii])
 
+dnl Check if compiler supports %gnu_unique_object
+AC_CACHE_CHECK([if $CC supports gnu_unique_object], libc_cv_cc_gnu_unique_object, [dnl
+cat > conftest.S <<EOF
+.type foo, %gnu_unique_object;
+.globl foo;
+foo:
+EOF
+libc_cv_cc_gnu_unique_object=no
+if ${CC-cc} $CFLAGS $CPPFLAGS -c conftest.S 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
+then
+  LC_ALL=C $READELF -s conftest.o | grep -q 'UNIQUE' && { libc_cv_cc_gnu_unique_object=yes
+  }
+fi
+rm -rf conftest*])
+LIBC_CONFIG_VAR([config-gnu-unique-object],
+		[$libc_cv_cc_gnu_unique_object])
+
 dnl Check whether we have the gd library available.
 AC_MSG_CHECKING(for libgd)
 if test "$with_gd" != "no"; then
diff --git a/elf/Makefile b/elf/Makefile
index 0aafe43056..36035acb9e 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -458,8 +458,6 @@ tests += \
   tst-tls-ie \
   tst-tls-ie-dlmopen \
   tst-tls-manydynamic \
-  tst-unique1 \
-  tst-unique2 \
   tst-unwind-ctor \
   tst-unwind-main \
   unload3 \
@@ -470,6 +468,12 @@ tests += \
   unload8 \
   valgrind-test \
   # tests
+ifeq (yes,$(config-gnu-unique-object))
+tests += \
+  tst-unique1 \
+  tst-unique2 \
+  # tests
+endif
 tests-cxx = \
   tst-dlopen-nodelete-reloc \
   tst-nodelete \
@@ -904,10 +908,6 @@ modules-names += \
   tst-tlsmod7 \
   tst-tlsmod8 \
   tst-tlsmod9 \
-  tst-unique1mod1 \
-  tst-unique1mod2 \
-  tst-unique2mod1 \
-  tst-unique2mod2 \
   tst-unwind-ctor-lib \
   unload2dep \
   unload2mod \
@@ -933,6 +933,14 @@ modules-names += \
   vismod2 \
   vismod3 \
 # modules-names
+ifeq (yes,$(config-gnu-unique-object))
+modules-names += \
+  tst-unique1mod1 \
+  tst-unique1mod2 \
+  tst-unique2mod1 \
+  tst-unique2mod2 \
+# modules-names
+endif
 
 modules-names-cxx = \
   tst-dlopen-nodelete-reloc-mod1 \


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [glibc/azanella/clang] elf: Only build tst-unique{1, 2} if compiler supports gnu_unique_object
@ 2022-05-10 18:28 Adhemerval Zanella
  0 siblings, 0 replies; 10+ messages in thread
From: Adhemerval Zanella @ 2022-05-10 18:28 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f8b9a82a003d894d74849cdc44026e7fb50508fd

commit f8b9a82a003d894d74849cdc44026e7fb50508fd
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Mar 28 21:20:01 2022 +0000

    elf: Only build tst-unique{1,2} if compiler supports gnu_unique_object

Diff:
---
 configure    | 23 +++++++++++++++++++++++
 configure.ac | 17 +++++++++++++++++
 elf/Makefile | 20 ++++++++++++++------
 3 files changed, 54 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index a651196339..47f423cd02 100755
--- a/configure
+++ b/configure
@@ -6649,6 +6649,29 @@ $as_echo "$libc_cv_cc_charset_ascii" >&6; }
 config_vars="$config_vars
 config-cflags-charset-ascii = $libc_cv_cc_charset_ascii"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports gnu_unique_object" >&5
+$as_echo_n "checking if $CC supports gnu_unique_object... " >&6; }
+if ${libc_cv_cc_gnu_unique_object+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.S <<EOF
+.type foo, %gnu_unique_object;
+.globl foo;
+foo:
+EOF
+libc_cv_cc_gnu_unique_object=no
+if ${CC-cc} $CFLAGS $CPPFLAGS -c conftest.S 1>&5 2>&5;
+then
+  LC_ALL=C $READELF -s conftest.o | grep -q 'UNIQUE' && { libc_cv_cc_gnu_unique_object=yes
+  }
+fi
+rm -rf conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_gnu_unique_object" >&5
+$as_echo "$libc_cv_cc_gnu_unique_object" >&6; }
+config_vars="$config_vars
+config-gnu-unique-object = $libc_cv_cc_gnu_unique_object"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgd" >&5
 $as_echo_n "checking for libgd... " >&6; }
 if test "$with_gd" != "no"; then
diff --git a/configure.ac b/configure.ac
index f002e928a6..716a800d78 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1619,6 +1619,23 @@ LIBC_TRY_CC_OPTION([-Werror -finput-charset=ascii],
 LIBC_CONFIG_VAR([config-cflags-charset-ascii],
 		[$libc_cv_cc_charset_ascii])
 
+dnl Check if compiler supports %gnu_unique_object
+AC_CACHE_CHECK([if $CC supports gnu_unique_object], libc_cv_cc_gnu_unique_object, [dnl
+cat > conftest.S <<EOF
+.type foo, %gnu_unique_object;
+.globl foo;
+foo:
+EOF
+libc_cv_cc_gnu_unique_object=no
+if ${CC-cc} $CFLAGS $CPPFLAGS -c conftest.S 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
+then
+  LC_ALL=C $READELF -s conftest.o | grep -q 'UNIQUE' && { libc_cv_cc_gnu_unique_object=yes
+  }
+fi
+rm -rf conftest*])
+LIBC_CONFIG_VAR([config-gnu-unique-object],
+		[$libc_cv_cc_gnu_unique_object])
+
 dnl Check whether we have the gd library available.
 AC_MSG_CHECKING(for libgd)
 if test "$with_gd" != "no"; then
diff --git a/elf/Makefile b/elf/Makefile
index 0aafe43056..36035acb9e 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -458,8 +458,6 @@ tests += \
   tst-tls-ie \
   tst-tls-ie-dlmopen \
   tst-tls-manydynamic \
-  tst-unique1 \
-  tst-unique2 \
   tst-unwind-ctor \
   tst-unwind-main \
   unload3 \
@@ -470,6 +468,12 @@ tests += \
   unload8 \
   valgrind-test \
   # tests
+ifeq (yes,$(config-gnu-unique-object))
+tests += \
+  tst-unique1 \
+  tst-unique2 \
+  # tests
+endif
 tests-cxx = \
   tst-dlopen-nodelete-reloc \
   tst-nodelete \
@@ -904,10 +908,6 @@ modules-names += \
   tst-tlsmod7 \
   tst-tlsmod8 \
   tst-tlsmod9 \
-  tst-unique1mod1 \
-  tst-unique1mod2 \
-  tst-unique2mod1 \
-  tst-unique2mod2 \
   tst-unwind-ctor-lib \
   unload2dep \
   unload2mod \
@@ -933,6 +933,14 @@ modules-names += \
   vismod2 \
   vismod3 \
 # modules-names
+ifeq (yes,$(config-gnu-unique-object))
+modules-names += \
+  tst-unique1mod1 \
+  tst-unique1mod2 \
+  tst-unique2mod1 \
+  tst-unique2mod2 \
+# modules-names
+endif
 
 modules-names-cxx = \
   tst-dlopen-nodelete-reloc-mod1 \


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [glibc/azanella/clang] elf: Only build tst-unique{1, 2} if compiler supports gnu_unique_object
@ 2022-04-29 14:08 Adhemerval Zanella
  0 siblings, 0 replies; 10+ messages in thread
From: Adhemerval Zanella @ 2022-04-29 14:08 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=dd50f1940067877ca8046ea3e41d4d13c7493427

commit dd50f1940067877ca8046ea3e41d4d13c7493427
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Mar 28 21:20:01 2022 +0000

    elf: Only build tst-unique{1,2} if compiler supports gnu_unique_object

Diff:
---
 configure    | 23 +++++++++++++++++++++++
 configure.ac | 17 +++++++++++++++++
 elf/Makefile | 20 ++++++++++++++------
 3 files changed, 54 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index ba07a13369..9958f9401a 100755
--- a/configure
+++ b/configure
@@ -6677,6 +6677,29 @@ $as_echo "$libc_cv_cc_charset_ascii" >&6; }
 config_vars="$config_vars
 config-cflags-charset-ascii = $libc_cv_cc_charset_ascii"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports gnu_unique_object" >&5
+$as_echo_n "checking if $CC supports gnu_unique_object... " >&6; }
+if ${libc_cv_cc_gnu_unique_object+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.S <<EOF
+.type foo, %gnu_unique_object;
+.globl foo;
+foo:
+EOF
+libc_cv_cc_gnu_unique_object=no
+if ${CC-cc} $CFLAGS $CPPFLAGS -c conftest.S 1>&5 2>&5;
+then
+  LC_ALL=C $READELF -s conftest.o | grep -q 'UNIQUE' && { libc_cv_cc_gnu_unique_object=yes
+  }
+fi
+rm -rf conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_gnu_unique_object" >&5
+$as_echo "$libc_cv_cc_gnu_unique_object" >&6; }
+config_vars="$config_vars
+config-gnu-unique-object = $libc_cv_cc_gnu_unique_object"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgd" >&5
 $as_echo_n "checking for libgd... " >&6; }
 if test "$with_gd" != "no"; then
diff --git a/configure.ac b/configure.ac
index 1d6076b09e..fe3a515d33 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1635,6 +1635,23 @@ LIBC_TRY_CC_OPTION([-Werror -finput-charset=ascii],
 LIBC_CONFIG_VAR([config-cflags-charset-ascii],
 		[$libc_cv_cc_charset_ascii])
 
+dnl Check if compiler supports %gnu_unique_object
+AC_CACHE_CHECK([if $CC supports gnu_unique_object], libc_cv_cc_gnu_unique_object, [dnl
+cat > conftest.S <<EOF
+.type foo, %gnu_unique_object;
+.globl foo;
+foo:
+EOF
+libc_cv_cc_gnu_unique_object=no
+if ${CC-cc} $CFLAGS $CPPFLAGS -c conftest.S 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
+then
+  LC_ALL=C $READELF -s conftest.o | grep -q 'UNIQUE' && { libc_cv_cc_gnu_unique_object=yes
+  }
+fi
+rm -rf conftest*])
+LIBC_CONFIG_VAR([config-gnu-unique-object],
+		[$libc_cv_cc_gnu_unique_object])
+
 dnl Check whether we have the gd library available.
 AC_MSG_CHECKING(for libgd)
 if test "$with_gd" != "no"; then
diff --git a/elf/Makefile b/elf/Makefile
index 0aafe43056..36035acb9e 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -458,8 +458,6 @@ tests += \
   tst-tls-ie \
   tst-tls-ie-dlmopen \
   tst-tls-manydynamic \
-  tst-unique1 \
-  tst-unique2 \
   tst-unwind-ctor \
   tst-unwind-main \
   unload3 \
@@ -470,6 +468,12 @@ tests += \
   unload8 \
   valgrind-test \
   # tests
+ifeq (yes,$(config-gnu-unique-object))
+tests += \
+  tst-unique1 \
+  tst-unique2 \
+  # tests
+endif
 tests-cxx = \
   tst-dlopen-nodelete-reloc \
   tst-nodelete \
@@ -904,10 +908,6 @@ modules-names += \
   tst-tlsmod7 \
   tst-tlsmod8 \
   tst-tlsmod9 \
-  tst-unique1mod1 \
-  tst-unique1mod2 \
-  tst-unique2mod1 \
-  tst-unique2mod2 \
   tst-unwind-ctor-lib \
   unload2dep \
   unload2mod \
@@ -933,6 +933,14 @@ modules-names += \
   vismod2 \
   vismod3 \
 # modules-names
+ifeq (yes,$(config-gnu-unique-object))
+modules-names += \
+  tst-unique1mod1 \
+  tst-unique1mod2 \
+  tst-unique2mod1 \
+  tst-unique2mod2 \
+# modules-names
+endif
 
 modules-names-cxx = \
   tst-dlopen-nodelete-reloc-mod1 \


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [glibc/azanella/clang] elf: Only build tst-unique{1, 2} if compiler supports gnu_unique_object
@ 2022-04-04 12:58 Adhemerval Zanella
  0 siblings, 0 replies; 10+ messages in thread
From: Adhemerval Zanella @ 2022-04-04 12:58 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=41451cc4f948c673acd6040b927f3df90727a3e8

commit 41451cc4f948c673acd6040b927f3df90727a3e8
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Mar 28 21:20:01 2022 +0000

    elf: Only build tst-unique{1,2} if compiler supports gnu_unique_object

Diff:
---
 configure    | 23 +++++++++++++++++++++++
 configure.ac | 17 +++++++++++++++++
 elf/Makefile | 20 ++++++++++++++------
 3 files changed, 54 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index 6abcd4f479..7c5bf74237 100755
--- a/configure
+++ b/configure
@@ -6804,6 +6804,29 @@ $as_echo "$libc_cv_cc_charset_ascii" >&6; }
 config_vars="$config_vars
 config-cflags-charset-ascii = $libc_cv_cc_charset_ascii"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports gnu_unique_object" >&5
+$as_echo_n "checking if $CC supports gnu_unique_object... " >&6; }
+if ${libc_cv_cc_gnu_unique_object+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.S <<EOF
+.type foo, %gnu_unique_object;
+.globl foo;
+foo:
+EOF
+libc_cv_cc_gnu_unique_object=no
+if ${CC-cc} $CFLAGS $CPPFLAGS -c conftest.S 1>&5 2>&5;
+then
+  LC_ALL=C $READELF -s conftest.o | grep -q 'UNIQUE' && { libc_cv_cc_gnu_unique_object=yes
+  }
+fi
+rm -rf conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_gnu_unique_object" >&5
+$as_echo "$libc_cv_cc_gnu_unique_object" >&6; }
+config_vars="$config_vars
+config-gnu-unique-object = $libc_cv_cc_gnu_unique_object"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgd" >&5
 $as_echo_n "checking for libgd... " >&6; }
 if test "$with_gd" != "no"; then
diff --git a/configure.ac b/configure.ac
index 3024e72cb9..119fa4c300 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1751,6 +1751,23 @@ LIBC_TRY_CC_OPTION([-Werror -finput-charset=ascii],
 LIBC_CONFIG_VAR([config-cflags-charset-ascii],
 		[$libc_cv_cc_charset_ascii])
 
+dnl Check if compiler supports %gnu_unique_object
+AC_CACHE_CHECK([if $CC supports gnu_unique_object], libc_cv_cc_gnu_unique_object, [dnl
+cat > conftest.S <<EOF
+.type foo, %gnu_unique_object;
+.globl foo;
+foo:
+EOF
+libc_cv_cc_gnu_unique_object=no
+if ${CC-cc} $CFLAGS $CPPFLAGS -c conftest.S 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
+then
+  LC_ALL=C $READELF -s conftest.o | grep -q 'UNIQUE' && { libc_cv_cc_gnu_unique_object=yes
+  }
+fi
+rm -rf conftest*])
+LIBC_CONFIG_VAR([config-gnu-unique-object],
+		[$libc_cv_cc_gnu_unique_object])
+
 dnl Check whether we have the gd library available.
 AC_MSG_CHECKING(for libgd)
 if test "$with_gd" != "no"; then
diff --git a/elf/Makefile b/elf/Makefile
index 320d4c778a..724e35f0c4 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -457,8 +457,6 @@ tests += \
   tst-tls-ie \
   tst-tls-ie-dlmopen \
   tst-tls-manydynamic \
-  tst-unique1 \
-  tst-unique2 \
   tst-unwind-ctor \
   tst-unwind-main \
   unload3 \
@@ -469,6 +467,12 @@ tests += \
   unload8 \
   valgrind-test \
   # tests
+ifeq (yes,$(config-gnu-unique-object))
+tests += \
+  tst-unique1 \
+  tst-unique2 \
+  # tests
+endif
 tests-cxx = \
   tst-dlopen-nodelete-reloc \
   tst-nodelete \
@@ -822,10 +826,6 @@ modules-names = \
   tst-tlsmod7 \
   tst-tlsmod8 \
   tst-tlsmod9 \
-  tst-unique1mod1 \
-  tst-unique1mod2 \
-  tst-unique2mod1 \
-  tst-unique2mod2 \
   tst-unwind-ctor-lib \
   unload2dep \
   unload2mod \
@@ -851,6 +851,14 @@ modules-names = \
   vismod2 \
   vismod3 \
 # modules-names
+ifeq (yes,$(config-gnu-unique-object))
+modules-names += \
+  tst-unique1mod1 \
+  tst-unique1mod2 \
+  tst-unique2mod1 \
+  tst-unique2mod2 \
+# modules-names
+endif
 
 modules-names-cxx = \
   tst-dlopen-nodelete-reloc-mod1 \


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [glibc/azanella/clang] elf: Only build tst-unique{1, 2} if compiler supports gnu_unique_object
@ 2022-03-31 19:11 Adhemerval Zanella
  0 siblings, 0 replies; 10+ messages in thread
From: Adhemerval Zanella @ 2022-03-31 19:11 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d583f5e4e783dad230b7ba99e595ef9a4ac833a5

commit d583f5e4e783dad230b7ba99e595ef9a4ac833a5
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Mar 28 21:20:01 2022 +0000

    elf: Only build tst-unique{1,2} if compiler supports gnu_unique_object

Diff:
---
 configure    | 23 +++++++++++++++++++++++
 configure.ac | 17 +++++++++++++++++
 elf/Makefile | 20 ++++++++++++++------
 3 files changed, 54 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index 6abcd4f479..7c5bf74237 100755
--- a/configure
+++ b/configure
@@ -6804,6 +6804,29 @@ $as_echo "$libc_cv_cc_charset_ascii" >&6; }
 config_vars="$config_vars
 config-cflags-charset-ascii = $libc_cv_cc_charset_ascii"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports gnu_unique_object" >&5
+$as_echo_n "checking if $CC supports gnu_unique_object... " >&6; }
+if ${libc_cv_cc_gnu_unique_object+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.S <<EOF
+.type foo, %gnu_unique_object;
+.globl foo;
+foo:
+EOF
+libc_cv_cc_gnu_unique_object=no
+if ${CC-cc} $CFLAGS $CPPFLAGS -c conftest.S 1>&5 2>&5;
+then
+  LC_ALL=C $READELF -s conftest.o | grep -q 'UNIQUE' && { libc_cv_cc_gnu_unique_object=yes
+  }
+fi
+rm -rf conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_gnu_unique_object" >&5
+$as_echo "$libc_cv_cc_gnu_unique_object" >&6; }
+config_vars="$config_vars
+config-gnu-unique-object = $libc_cv_cc_gnu_unique_object"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgd" >&5
 $as_echo_n "checking for libgd... " >&6; }
 if test "$with_gd" != "no"; then
diff --git a/configure.ac b/configure.ac
index 3024e72cb9..119fa4c300 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1751,6 +1751,23 @@ LIBC_TRY_CC_OPTION([-Werror -finput-charset=ascii],
 LIBC_CONFIG_VAR([config-cflags-charset-ascii],
 		[$libc_cv_cc_charset_ascii])
 
+dnl Check if compiler supports %gnu_unique_object
+AC_CACHE_CHECK([if $CC supports gnu_unique_object], libc_cv_cc_gnu_unique_object, [dnl
+cat > conftest.S <<EOF
+.type foo, %gnu_unique_object;
+.globl foo;
+foo:
+EOF
+libc_cv_cc_gnu_unique_object=no
+if ${CC-cc} $CFLAGS $CPPFLAGS -c conftest.S 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
+then
+  LC_ALL=C $READELF -s conftest.o | grep -q 'UNIQUE' && { libc_cv_cc_gnu_unique_object=yes
+  }
+fi
+rm -rf conftest*])
+LIBC_CONFIG_VAR([config-gnu-unique-object],
+		[$libc_cv_cc_gnu_unique_object])
+
 dnl Check whether we have the gd library available.
 AC_MSG_CHECKING(for libgd)
 if test "$with_gd" != "no"; then
diff --git a/elf/Makefile b/elf/Makefile
index 320d4c778a..724e35f0c4 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -457,8 +457,6 @@ tests += \
   tst-tls-ie \
   tst-tls-ie-dlmopen \
   tst-tls-manydynamic \
-  tst-unique1 \
-  tst-unique2 \
   tst-unwind-ctor \
   tst-unwind-main \
   unload3 \
@@ -469,6 +467,12 @@ tests += \
   unload8 \
   valgrind-test \
   # tests
+ifeq (yes,$(config-gnu-unique-object))
+tests += \
+  tst-unique1 \
+  tst-unique2 \
+  # tests
+endif
 tests-cxx = \
   tst-dlopen-nodelete-reloc \
   tst-nodelete \
@@ -822,10 +826,6 @@ modules-names = \
   tst-tlsmod7 \
   tst-tlsmod8 \
   tst-tlsmod9 \
-  tst-unique1mod1 \
-  tst-unique1mod2 \
-  tst-unique2mod1 \
-  tst-unique2mod2 \
   tst-unwind-ctor-lib \
   unload2dep \
   unload2mod \
@@ -851,6 +851,14 @@ modules-names = \
   vismod2 \
   vismod3 \
 # modules-names
+ifeq (yes,$(config-gnu-unique-object))
+modules-names += \
+  tst-unique1mod1 \
+  tst-unique1mod2 \
+  tst-unique2mod1 \
+  tst-unique2mod2 \
+# modules-names
+endif
 
 modules-names-cxx = \
   tst-dlopen-nodelete-reloc-mod1 \


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-06-09 21:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-29 20:35 [glibc/azanella/clang] elf: Only build tst-unique{1, 2} if compiler supports gnu_unique_object Adhemerval Zanella
2022-03-31 19:11 Adhemerval Zanella
2022-04-04 12:58 Adhemerval Zanella
2022-04-29 14:08 Adhemerval Zanella
2022-05-10 18:28 Adhemerval Zanella
2022-05-12 19:38 Adhemerval Zanella
2022-05-13 14:24 Adhemerval Zanella
2022-06-03 14:10 Adhemerval Zanella
2022-06-09 13:21 Adhemerval Zanella
2022-06-09 21:24 Adhemerval Zanella

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).