* [COMMITTED] testsuite: Fix weak_undefined handling on Darwin
@ 2023-03-28 8:39 Rainer Orth
0 siblings, 0 replies; only message in thread
From: Rainer Orth @ 2023-03-28 8:39 UTC (permalink / raw)
To: gcc-patches; +Cc: Alexandre Oliva
[-- Attachment #1: Type: text/plain, Size: 1315 bytes --]
The patch that introduced the weak_undefined effective-target keyword
and corresponding dg-add-options support
commit 378ec7b87a5265dbe2d489c245fac98ef37fa638
Author: Alexandre Oliva <oliva@adacore.com>
Date: Thu Mar 23 00:45:05 2023 -0300
[testsuite] test for weak_undefined support and add options
badly broke the affected tests on macOS like so:
ERROR: gcc.dg/addr_equal-1.c: unknown dg option: 89 for " dg-add-options 5 weak_undefined "
ERROR: gcc.dg/addr_equal-1.c: unknown dg option: 89 for " dg-add-options 5 weak_undefined "
add_options_for_weak_undefined tries to call an non-existant proc "89".
Even after fixing this by escaping the brackets, two tests still failed
to link since they lacked the corresponding calls do dg-add-options
weak_undefined.
Tested on x86_64-apple-darwin20.6.0 and i386-pc-solaris2.11.
Committed to trunk.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2023-03-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
gcc/testsuite:
* lib/target-supports.exp (add_options_for_weak_undefined): Escape
brackets.
* gcc.dg/visibility-22.c: Add weak_undefined options.
libgomp:
* testsuite/libgomp.oacc-c-c++-common/routine-nohost-2.c: Add
weak_undefined options.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: mtwu.patch --]
[-- Type: text/x-patch, Size: 1472 bytes --]
diff --git a/gcc/testsuite/gcc.dg/visibility-22.c b/gcc/testsuite/gcc.dg/visibility-22.c
--- a/gcc/testsuite/gcc.dg/visibility-22.c
+++ b/gcc/testsuite/gcc.dg/visibility-22.c
@@ -3,6 +3,7 @@
/* { dg-require-visibility "" } */
/* { dg-require-effective-target weak_undefined } */
/* { dg-options "-O2 -fPIC" { target fpic } } */
+/* { dg-add-options weak_undefined } */
extern void foo () __attribute__((weak,visibility("hidden")));
int
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -361,7 +361,7 @@ proc check_weak_available { } {
proc add_options_for_weak_undefined { flags } {
if { [istarget *-*-darwin*] } {
lappend flags "-Wl,-undefined,dynamic_lookup"
- if { [istarget *-*-darwin[89]*] } {
+ if { [istarget *-*-darwin\[89\]*] } {
lappend flags "-Wl,-flat_namespace"
}
}
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/routine-nohost-2.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/routine-nohost-2.c
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/routine-nohost-2.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/routine-nohost-2.c
@@ -8,6 +8,7 @@
/* { dg-additional-sources routine-nohost-2_2.c } */
/* { dg-additional-options "-fno-inline" } for stable results regarding OpenACC 'routine'. */
+/* { dg-add-options weak_undefined } */
#include <assert.h>
#include <openacc.h>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-28 8:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-28 8:39 [COMMITTED] testsuite: Fix weak_undefined handling on Darwin Rainer Orth
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).