From patchwork Mon Nov 28 16:00:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zack Weinberg X-Patchwork-Id: 18001 Received: (qmail 66367 invoked by alias); 28 Nov 2016 16:00:28 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 66254 invoked by uid 89); 28 Nov 2016 16:00:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:166.84.1, H*r:sk:mailbac, H*m:panix, entirety X-HELO: mailbackend.panix.com From: Zack Weinberg To: libc-alpha@sourceware.org Subject: [PATCH 1/5] Make all of sysdeps/ia64/fpu/libm-symbols.h only visible to libc||libm; move #defines from makefile there. Date: Mon, 28 Nov 2016 11:00:03 -0500 Message-Id: <20161128160007.13994-2-zackw@panix.com> In-Reply-To: <20161128160007.13994-1-zackw@panix.com> References: <20161128160007.13994-1-zackw@panix.com> MIME-Version: 1.0 Found during many-glibcs testing. sysdeps/ia64/fpu/libm-symbols.h and sysdeps/ia64/fpu/Makefile define a bunch of macros that are only *relevant* to core math library code, but they leak into everything compiled by the top-level math directory, breaking certain tests. I propose to fix this by moving the -D switches from the Makefile into libm-symbols.h, and then making the entirety of that file conditional on IS_IN(libc) || IS_IN(libm). Joseph has also submitted a patch for the same problem, , and I don't care which one gets applied, just as long as the problem does get fixed soon. zw --- sysdeps/ia64/fpu/Makefile | 6 +----- sysdeps/ia64/fpu/libm-symbols.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/sysdeps/ia64/fpu/Makefile b/sysdeps/ia64/fpu/Makefile index 384fc83..450d712 100644 --- a/sysdeps/ia64/fpu/Makefile +++ b/sysdeps/ia64/fpu/Makefile @@ -26,9 +26,5 @@ libm-sysdep_routines += s_erfc s_erfcf s_erfcl \ sysdep_routines += libc_libm_error libm_frexp libm_frexpf libm_frexpl \ $(duplicated-routines) -sysdep-CPPFLAGS += -include libm-symbols.h \ - -D__POSIX__ -Dopensource \ - -D_LIB_VERSIONIMF=_LIB_VERSION \ - -DSIZE_INT_32 -DSIZE_LONG_INT_64 -DSIZE_LONG_LONG_INT_64 \ - -DSIZE_LONG_64 -DIA64 +sysdep-CPPFLAGS += -include libm-symbols.h endif diff --git a/sysdeps/ia64/fpu/libm-symbols.h b/sysdeps/ia64/fpu/libm-symbols.h index 3cbc6c4..62c9adb 100644 --- a/sysdeps/ia64/fpu/libm-symbols.h +++ b/sysdeps/ia64/fpu/libm-symbols.h @@ -1,3 +1,16 @@ +#if IS_IN (libc) || IS_IN (libm) + +/* The externally maintained code in this directory expects these + macros to be defined. */ +#define __POSIX__ 1 +#define opensource 1 +#define _LIB_VERSIONIMF _LIB_VERSION +#define SIZE_INT_32 1 +#define SIZE_LONG_INT_64 1 +#define SIZE_LONG_LONG_INT_64 1 +#define SIZE_LONG_64 1 +#define IA64 1 + #include #undef ret /* get rid of the stupid "ret" macro; it breaks br.ret */ @@ -56,3 +69,5 @@ #if defined ASSEMBLER && IS_IN (libc) # define __libm_error_support HIDDEN_JUMPTARGET(__libm_error_support) #endif + +#endif