From 65817569adf011b66d197c773df2d9337da5adb3 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 13 Dec 2024 05:22:47 +0800 Subject: [PATCH] ifuncmain9.c: Return EXIT_UNSUPPORTED for GCC 5.4 or older Since elf/ifuncmain9.c fails at run-time when compiled with GCC 5.4 or older (PR ipa/81128), return EXIT_UNSUPPORTED for GCC 5.4 or older. Signed-off-by: H.J. Lu Reviewed-by: Sam James --- elf/ifuncmain9.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/elf/ifuncmain9.c b/elf/ifuncmain9.c index 43011452b7..654beeadfe 100644 --- a/elf/ifuncmain9.c +++ b/elf/ifuncmain9.c @@ -20,9 +20,10 @@ #include -# include -# include +#include +#include +#if __GNUC_PREREQ (5, 5) /* Do not use the test framework, so that the process setup is not disturbed. */ @@ -90,3 +91,12 @@ main (void) return errors; } +#else +#include + +int +main (void) +{ + return EXIT_UNSUPPORTED; +} +#endif