From patchwork Wed Dec 18 10:58:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 103339 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6338C3858CDB for ; Wed, 18 Dec 2024 10:59:33 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-il1-x12a.google.com (mail-il1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) by sourceware.org (Postfix) with ESMTPS id 98B71385841C for ; Wed, 18 Dec 2024 10:59:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 98B71385841C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 98B71385841C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::12a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734519549; cv=none; b=SCYADyBuGjuUwzQKaIksMFAQm85AlBvaquCWiHl/wnJebB/04P0Ef51vxu7FrUFvURIkp4fYUadGzplLIbtDSaHbMiOh4qYHFrjZSgJfo/YAcKBZfNZCaZVWAZd9Z5MpONYLK4IMuWsql6Ssi1VxG2x/oH++F2i7/XJkOBJz0Tw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734519549; c=relaxed/simple; bh=NuMmSQFbRxhwAmr9n8l10qZDTuuSYdL+Kws/I9EKCh4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=vnw51ZYZLrfixuyrN4nmEqugs06tYUga02JBDGDIr6h6/dvVMwLpXLm3K6IwN7CTo63l/4oMpiwymqlSuTmS+Wgkptq84HhI7C8SjKxn8tfbP7MUPW2nt2uQydl41wX+d+NjClnuAtPwys4Qd8dVOABObin2rMW4hqWf7mk/e70= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-il1-x12a.google.com with SMTP id e9e14a558f8ab-3a8146a8ddaso20052255ab.1 for ; Wed, 18 Dec 2024 02:59:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734519519; x=1735124319; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=qeU2H/IDGGrE/jst+X0rooYtAhu0yvoyjd9KTlEerWk=; b=WLtGqaj0RmguZrUDtf93nzmmE6Uf6h0eksvXavKUSvLU9R+sBW/IKda9VVTbMS+YkA y+IRQsWvoMKx3MmB9qxVvT9wxFpTskuGkc3MB4bflwolq0nb0KH6/yGxbWXIqmttTDmh Ux1paXfkwC4sVnA+e4Dy7+C/VSvfm7uRhWB/WNYZRBet/807dEEqYzDEnSXeSkOz9jgc 9sGVTPS00fgbyJhhDYUIZY/nqhGTCPNlNboq3fMGwf1F7ou3MHNva0tZDZALe4I/d1nd UltOE40r2FYJvatKSHIXlYLIGjo2KSbap/5G0Po7JpINgXtIx0L5XVdKM4KE3v/QZ2QE o+YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734519519; x=1735124319; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qeU2H/IDGGrE/jst+X0rooYtAhu0yvoyjd9KTlEerWk=; b=gXbNiW+SVW+WCM+ebpzYso9xkb6dRqLXfCgl/rwOZIexDrpou/YWzsVJSD1ug+cPIH ThvDKYirIZVjhc4Ffd6S9XjhjoJxM8yqks5MIq3/SX8YwyFh+UkENSv3oNIiHgcIMuVb 92XGt48SKH1jk6MuWb7wvfVDw5B7YTlIqEmUuRSnIHAlNnaux9sD14KKq+GCoh0iDbiU azHVFS4eDe8J+QNMjOM8x1GzWbaB5KhEzKoe/5d6GRTRBkuPWxL4PwdUy9msVqcqIoB5 ixYwPmPT067tYCnhAlltNWsYXkpNl4btaBfqYCrI6266XhOM2qz/kpQjtTpR4IY3xXWK xbmA== X-Gm-Message-State: AOJu0YwMfQG+Sh2Cvki/GLvTA1Q98nJiUH9UVyu/IxvkIp2tiqtH8Pys g2S0Wf2at9UpfUVsrhbDaQWaOVGR5NAPFyQDKGHX6JvymsLxEnXlOQP4+tau0+7Ll4kcgpU= X-Gm-Gg: ASbGncsVus8OoVv05Y4QaRWzpqy8P4A/NXpS+3U1Cypy0LYo/O3tDRbqWm8ec+VgtVf qPLP28Yj9s+3AfFzjlZgBwmhsFUwkwUuFpmgxde61xP0VkM+oxs51zHAQcoml3G9yBiwhqioOte EQcIWbB6l/775QQURB7NJiuLLXEbIRwZTo/A1KdbWQuhjJBVu0Cw9QuILWtINC8eDeSoPebW0Xz jsOBSrB4ZYDgExa26e9QZ+sbLgYJZaVIyKOngQ6You5yjgIZHxFdItU7GJsiu8mhUBaZnZjIQU6 ftHbep0WOz3H6soQvvsXfJufxjo1sMKYI7Pbe+Kb9vfTSg== X-Google-Smtp-Source: AGHT+IHyVXewbln4F5hwJ1GavNvruFO0/0ny0bloytV7INr5J0ChQAP0VM9e1zck3hJXpPuIU4IdmQ== X-Received: by 2002:a05:6e02:12e9:b0:3a7:e286:a560 with SMTP id e9e14a558f8ab-3bdc003eca2mr17237415ab.2.1734519518697; Wed, 18 Dec 2024 02:58:38 -0800 (PST) Received: from gnu-tgl-3.localdomain ([172.58.139.125]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4e5e378b773sm2166758173.129.2024.12.18.02.58.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2024 02:58:38 -0800 (PST) Received: from gnu-tgl-3.. (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id A9ADCC0043; Wed, 18 Dec 2024 18:58:34 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org Subject: [PATCH] Don't use glibc when testing with Clang Date: Wed, 18 Dec 2024 18:58:34 +0800 Message-ID: <20241218105834.563923-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 X-Spam-Status: No, score=-3019.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org Clang has its own and doesn't use from glibc. Pass "-I." to compiler only if $($( --- Makeconfig | 3 ++- include/tgmath.h | 8 +++++++- math/Makefile | 24 ++++++++++++++++++------ 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/Makeconfig b/Makeconfig index 04c43e80f7..f47ebb5499 100644 --- a/Makeconfig +++ b/Makeconfig @@ -1036,7 +1036,8 @@ endif # current directory. +includes = -I$(..)include $(if $(subdir),$(objpfx:%/=-I%)) \ $(+sysdep-includes) $(includes) \ - $(patsubst %/,-I%,$(..)) $(libio-include) -I. $(sysincludes) + $(patsubst %/,-I%,$(..)) $(libio-include) \ + $(if $($( +/* NB: Clang has its own and doesn't use from + glibc. */ +#if defined _ISOMAC && defined __clang__ +# include_next +#else +# include +#endif diff --git a/math/Makefile b/math/Makefile index 36fe5c2bd4..d262de8bee 100644 --- a/math/Makefile +++ b/math/Makefile @@ -510,7 +510,6 @@ tests = \ $(tests-static) \ bug-nextafter \ bug-nexttoward \ - bug-tgmath1 \ test-ceil-except-2 \ test-femode \ test-femode-traps \ @@ -548,15 +547,18 @@ tests = \ test-signgam-ullong \ test-signgam-ullong-init \ test-snan \ - test-tgmath \ - test-tgmath-int \ - test-tgmath-ret \ - test-tgmath2 \ test-trunc-except-2 \ tst-CMPLX \ tst-CMPLX2 \ tst-definitions \ # tests +tests-tgmath = \ + bug-tgmath1 \ + test-tgmath \ + test-tgmath-int \ + test-tgmath-ret \ + test-tgmath2 \ + # tests-tgmath ifneq ($(config-cflags-signaling-nans),) tests += \ test-fe-snans-always-signal \ @@ -1026,7 +1028,9 @@ tgmath3-macros = \ ufromfpx \ # tgmath3-macros tgmath3-macro-tests = $(addprefix test-tgmath3-,$(tgmath3-macros)) -tests += $(tgmath3-macro-tests) +tests-tgmath += $(tgmath3-macro-tests) +tests += $(tests-tgmath) + generated += $(addsuffix .c,$(tgmath3-macro-tests)) $(tgmath3-macro-tests:%=$(objpfx)%.o): CFLAGS += -fno-builtin @@ -1043,6 +1047,14 @@ $(objpfx)test-tgmath3-macro-list.out: gen-tgmath-tests.py $(PYTHON) $< check-list $(tgmath3-macros) > $@; \ $(evaluate-test) +ifeq ($(have-test-clang),yes) +# NB: Clang has its own and doesn't use from glibc. +define no-include +$(1).c-no-include-dot = yes +endef +$(foreach m,$(tests-tgmath),$(eval $(call no-include,$(m)))) +endif + libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \ -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas