mirror of
git://sourceware.org/git/glibc.git
synced 2025-02-17 13:00:43 +08:00
elf: Fix not compiling ifunc tests that need gcc ifunc support
This commit is contained in:
parent
14beab5321
commit
16b597807d
2
configure
vendored
2
configure
vendored
@ -6736,6 +6736,8 @@ if test x"$libc_cv_gcc_indirect_function" = xyes; then
|
|||||||
$as_echo "#define HAVE_GCC_IFUNC 1" >>confdefs.h
|
$as_echo "#define HAVE_GCC_IFUNC 1" >>confdefs.h
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
config_vars="$config_vars
|
||||||
|
have-gcc-ifunc = $libc_cv_gcc_indirect_function"
|
||||||
|
|
||||||
# This is far from the AC_ARG_ENABLE that sets it so that a sysdeps
|
# This is far from the AC_ARG_ENABLE that sets it so that a sysdeps
|
||||||
# configure fragment can override the value to prevent this AC_DEFINE.
|
# configure fragment can override the value to prevent this AC_DEFINE.
|
||||||
|
@ -1770,6 +1770,7 @@ LIBC_CONFIG_VAR([have-ifunc], [$libc_cv_ld_gnu_indirect_function])
|
|||||||
if test x"$libc_cv_gcc_indirect_function" = xyes; then
|
if test x"$libc_cv_gcc_indirect_function" = xyes; then
|
||||||
AC_DEFINE(HAVE_GCC_IFUNC)
|
AC_DEFINE(HAVE_GCC_IFUNC)
|
||||||
fi
|
fi
|
||||||
|
LIBC_CONFIG_VAR([have-gcc-ifunc], [$libc_cv_gcc_indirect_function])
|
||||||
|
|
||||||
# This is far from the AC_ARG_ENABLE that sets it so that a sysdeps
|
# This is far from the AC_ARG_ENABLE that sets it so that a sysdeps
|
||||||
# configure fragment can override the value to prevent this AC_DEFINE.
|
# configure fragment can override the value to prevent this AC_DEFINE.
|
||||||
|
17
elf/Makefile
17
elf/Makefile
@ -395,8 +395,10 @@ tests-ifuncstatic := ifuncmain1static ifuncmain1picstatic \
|
|||||||
ifuncmain2static ifuncmain2picstatic \
|
ifuncmain2static ifuncmain2picstatic \
|
||||||
ifuncmain4static ifuncmain4picstatic \
|
ifuncmain4static ifuncmain4picstatic \
|
||||||
ifuncmain5static ifuncmain5picstatic \
|
ifuncmain5static ifuncmain5picstatic \
|
||||||
ifuncmain7static ifuncmain7picstatic \
|
ifuncmain7static ifuncmain7picstatic
|
||||||
ifuncmain9static ifuncmain9picstatic
|
ifeq (yes,$(have-gcc-ifunc))
|
||||||
|
tests-ifuncstatic += ifuncmain9static ifuncmain9picstatic
|
||||||
|
endif
|
||||||
tests-static += $(tests-ifuncstatic)
|
tests-static += $(tests-ifuncstatic)
|
||||||
tests-internal += $(tests-ifuncstatic)
|
tests-internal += $(tests-ifuncstatic)
|
||||||
ifeq (yes,$(build-shared))
|
ifeq (yes,$(build-shared))
|
||||||
@ -407,15 +409,20 @@ tests-internal += \
|
|||||||
ifuncmain1staticpic \
|
ifuncmain1staticpic \
|
||||||
ifuncmain2 ifuncmain2pic ifuncmain3 ifuncmain4 \
|
ifuncmain2 ifuncmain2pic ifuncmain3 ifuncmain4 \
|
||||||
ifuncmain5 ifuncmain5pic ifuncmain5staticpic \
|
ifuncmain5 ifuncmain5pic ifuncmain5staticpic \
|
||||||
ifuncmain7 ifuncmain7pic \
|
ifuncmain7 ifuncmain7pic
|
||||||
ifuncmain9 ifuncmain9pic
|
ifeq (yes,$(have-gcc-ifunc))
|
||||||
|
tests-internal += ifuncmain9 ifuncmain9pic
|
||||||
|
endif
|
||||||
ifunc-test-modules = ifuncdep1 ifuncdep1pic ifuncdep2 ifuncdep2pic \
|
ifunc-test-modules = ifuncdep1 ifuncdep1pic ifuncdep2 ifuncdep2pic \
|
||||||
ifuncdep5 ifuncdep5pic
|
ifuncdep5 ifuncdep5pic
|
||||||
extra-test-objs += $(ifunc-test-modules:=.o)
|
extra-test-objs += $(ifunc-test-modules:=.o)
|
||||||
test-internal-extras += $(ifunc-test-modules)
|
test-internal-extras += $(ifunc-test-modules)
|
||||||
ifeq (yes,$(have-fpie))
|
ifeq (yes,$(have-fpie))
|
||||||
ifunc-pie-tests = ifuncmain1pie ifuncmain1vispie ifuncmain1staticpie \
|
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))
|
ifeq (yes,$(have-textrel_ifunc))
|
||||||
ifunc-pie-tests += tst-ifunc-textrel
|
ifunc-pie-tests += tst-ifunc-textrel
|
||||||
endif
|
endif
|
||||||
|
@ -20,8 +20,6 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#ifdef HAVE_GCC_IFUNC
|
|
||||||
|
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
|
|
||||||
@ -92,17 +90,3 @@ main (void)
|
|||||||
|
|
||||||
return errors;
|
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
|
|
||||||
|
@ -16,6 +16,7 @@ tests-static += tst-get-cpu-features-static \
|
|||||||
tst-cpu-features-cpuinfo-static \
|
tst-cpu-features-cpuinfo-static \
|
||||||
tst-cpu-features-supports-static
|
tst-cpu-features-supports-static
|
||||||
ifeq (yes,$(have-ifunc))
|
ifeq (yes,$(have-ifunc))
|
||||||
|
ifeq (yes,$(have-gcc-ifunc))
|
||||||
tests += \
|
tests += \
|
||||||
tst-ifunc-isa-1 \
|
tst-ifunc-isa-1 \
|
||||||
tst-ifunc-isa-1-static \
|
tst-ifunc-isa-1-static \
|
||||||
@ -25,6 +26,7 @@ tests-static += \
|
|||||||
tst-ifunc-isa-1-static \
|
tst-ifunc-isa-1-static \
|
||||||
tst-ifunc-isa-2-static
|
tst-ifunc-isa-2-static
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
ifeq (yes,$(enable-x86-isa-level))
|
ifeq (yes,$(enable-x86-isa-level))
|
||||||
tests += tst-isa-level-1
|
tests += tst-isa-level-1
|
||||||
modules-names += tst-isa-level-mod-1-baseline \
|
modules-names += tst-isa-level-mod-1-baseline \
|
||||||
|
Loading…
Reference in New Issue
Block a user