diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2021-03-24 01:10:38 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2021-03-24 01:52:46 +0100 |
commit | 16b597807d6c383c6a4730fe27e143271e952edb (patch) | |
tree | b87911cdcc17322f47e7ebcc1b63b512c3b2ccc1 /elf | |
parent | 14beab53219bf0751f37805060d83860abe89bdc (diff) | |
download | glibc-16b597807d6c383c6a4730fe27e143271e952edb.tar.gz glibc-16b597807d6c383c6a4730fe27e143271e952edb.tar.xz glibc-16b597807d6c383c6a4730fe27e143271e952edb.zip |
elf: Fix not compiling ifunc tests that need gcc ifunc support
Diffstat (limited to 'elf')
-rw-r--r-- | elf/Makefile | 17 | ||||
-rw-r--r-- | elf/ifuncmain9.c | 16 |
2 files changed, 12 insertions, 21 deletions
diff --git a/elf/Makefile b/elf/Makefile index 3b8e13e066..0bef49e53d 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -395,8 +395,10 @@ tests-ifuncstatic := ifuncmain1static ifuncmain1picstatic \ ifuncmain2static ifuncmain2picstatic \ ifuncmain4static ifuncmain4picstatic \ ifuncmain5static ifuncmain5picstatic \ - ifuncmain7static ifuncmain7picstatic \ - ifuncmain9static ifuncmain9picstatic + ifuncmain7static ifuncmain7picstatic +ifeq (yes,$(have-gcc-ifunc)) +tests-ifuncstatic += ifuncmain9static ifuncmain9picstatic +endif tests-static += $(tests-ifuncstatic) tests-internal += $(tests-ifuncstatic) ifeq (yes,$(build-shared)) @@ -407,15 +409,20 @@ tests-internal += \ ifuncmain1staticpic \ ifuncmain2 ifuncmain2pic ifuncmain3 ifuncmain4 \ ifuncmain5 ifuncmain5pic ifuncmain5staticpic \ - ifuncmain7 ifuncmain7pic \ - ifuncmain9 ifuncmain9pic + ifuncmain7 ifuncmain7pic +ifeq (yes,$(have-gcc-ifunc)) +tests-internal += ifuncmain9 ifuncmain9pic +endif ifunc-test-modules = ifuncdep1 ifuncdep1pic ifuncdep2 ifuncdep2pic \ ifuncdep5 ifuncdep5pic extra-test-objs += $(ifunc-test-modules:=.o) test-internal-extras += $(ifunc-test-modules) ifeq (yes,$(have-fpie)) ifunc-pie-tests = ifuncmain1pie ifuncmain1vispie ifuncmain1staticpie \ - ifuncmain5pie ifuncmain6pie ifuncmain7pie ifuncmain9pie + ifuncmain5pie ifuncmain6pie ifuncmain7pie +ifeq (yes,$(have-gcc-ifunc)) +ifunc-pie-tests += ifuncmain9pie +endif ifeq (yes,$(have-textrel_ifunc)) ifunc-pie-tests += tst-ifunc-textrel endif diff --git a/elf/ifuncmain9.c b/elf/ifuncmain9.c index e775c5cfa9..15419a159a 100644 --- a/elf/ifuncmain9.c +++ b/elf/ifuncmain9.c @@ -20,8 +20,6 @@ #include <config.h> -#ifdef HAVE_GCC_IFUNC - # include <stdbool.h> # include <stdio.h> @@ -92,17 +90,3 @@ main (void) return errors; } - -#else /* !HAVE_GCC_IFUNC */ - -# include <support/check.h> - -static int -do_test (void) -{ - FAIL_UNSUPPORTED ("GCC does not support the ifunc attribute"); - return 1; /* Not reachable. */ -} - -# include <support/test-driver.c> -#endif |