From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 11B143882118 for ; Tue, 18 Jun 2024 08:56:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 11B143882118 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 11B143882118 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718700967; cv=none; b=gFo4uXGfhWS2qcug5tLwd3qrnspA16kUo9Cd+anfzqRYDdtazVBW2UIo2VtCRweCIC2FDSNLFmah68Evt9oLzeeqWk3sLbnOJEkq765dVix3gnXyipTEtIMkuCIzx+sFoAs3CCD61YKgB+jdol63kA67XJsWWuyMQDNTu67LeJA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718700967; c=relaxed/simple; bh=vabsxhdPKZW8rpwAUoZaSEPmSKbCqO4YtcdPuhfyiIE=; h=DKIM-Signature:Message-ID:Date:Subject:To:From:MIME-Version; b=gqM+YJL7sVUNSOv1huP4nKL2kvn2hqtMi8Oj5N1GGN5o9KWYO+cNt4XYboL5p7D0Xe0oh7YrMo+/yvKm3Ko6UA4nl9ri5ySafZJB/yI71oeadC22eOge21QyYqJOUiuY5yMV9WA2elZ3lEqF4GpT6DpjVOd7hmueJJBNWu2SsPI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45I8Ah8K021889 for ; Tue, 18 Jun 2024 08:56:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h= message-id:date:subject:to:references:from:in-reply-to :content-type:content-transfer-encoding:mime-version; s=pp1; bh= cHHoZ8xYepd4S9bFpiBIUSLT4oQeoX8klLIuGhUFwIs=; b=WZIeQl8DL42fS920 Dwfqq6jK+qWPwO71eyIdI8/Y5Zi0As0FmM32A+YpZv2Fg+k8ksGCWlFdW6Kf6RPl 9l/VCfaPu8mwwW0T3BHojkz0RirDe24sjGTpnr67kXXmx4wwvxyoEIH3U3VT7JR5 vrQmOHQY3PPIiKGIi+yTsfZSsFH+PuuJoFLJxKE5j74wJ5rOyqnkuf24iM8k+1jV EwuJG9xQPaGMzk0yyjH+lUArLqG7d2tfbXR9yCqKeVpscP34hPPqfhUuHDQOFuP4 SimihqdfhrZhRqqZRkInUZZsmKXBNsHqQfaqIE2cO8gFEfTGb4Y1XlqWOg9l23q8 1iHM7Q== Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yu5wx86rt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 18 Jun 2024 08:56:04 +0000 (GMT) Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 45I7Su1i011442 for ; Tue, 18 Jun 2024 08:56:03 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3yspsn17u9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 18 Jun 2024 08:56:03 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 45I8txMq31916422 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 18 Jun 2024 08:56:01 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B25E620043 for ; Tue, 18 Jun 2024 08:55:59 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 186D620040 for ; Tue, 18 Jun 2024 08:55:59 +0000 (GMT) Received: from [9.171.77.42] (unknown [9.171.77.42]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP for ; Tue, 18 Jun 2024 08:55:58 +0000 (GMT) Message-ID: Date: Tue, 18 Jun 2024 10:55:57 +0200 User-Agent: Mozilla Thunderbird Subject: Re: [RFC 0/9] Remove legacy platform bits and cleanups To: libc-alpha@sourceware.org References: <20240607114543.659306-1-stli@linux.ibm.com> <87msnv4rou.fsf@oldenburg.str.redhat.com> <8c9ab3f3-5404-4878-8d84-4bd7aef7d1a1@linux.ibm.com> Content-Language: en-US From: Stefan Liebler In-Reply-To: Content-Type: text/plain; charset=UTF-8 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: fRhse0qjdjWFslE1iPf6q_Br8wTyn5V4 X-Proofpoint-ORIG-GUID: fRhse0qjdjWFslE1iPf6q_Br8wTyn5V4 Content-Transfer-Encoding: quoted-printable X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-18_02,2024-06-17_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 malwarescore=0 phishscore=0 spamscore=0 mlxscore=0 impostorscore=0 priorityscore=1501 lowpriorityscore=0 clxscore=1015 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406180065 X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,KAM_ASCII_DIVIDERS,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 12.06.24 09:50, Stefan Liebler wrote: > On 11.06.24 14:13, Stefan Liebler wrote: >> On 10.06.24 15:36, Stefan Liebler wrote: >>> On 08.06.24 13:09, Florian Weimer wrote: >>>> * Stefan Liebler: >>>> >>>>> This patch series is the result of: >>>>> "Question regarding platform-bits in ld.so.cache" >>>>> https://sourceware.org/pipermail/libc-alpha/2024-May/156793.html >>>> >>>> This series fails to build on MIPS with: >>>> >>>> mips64-glibc-linux-gnu-gcc -mabi=3D32 ldconfig.c -c -std=3Dgnu11 -fgnu= 89-inline -g -O2 -Wall -Wwrite-strings -Wundef -Werror -fmerge-all-constan= ts -frounding-math -fno-stack-protector -fno-common -Wp,-U_FORTIFY_SOURCE -= Wstrict-prototypes -Wold-style-definition -fmath-errno -D_TIME_BITS=3D64 -D= _FILE_OFFSET_BITS=3D64 -fPIE -Wa,-execstack -D'SYSCONFDIR=3D"/etc"' -D= 'LIBDIR=3D"/usr/lib"' -D'SLIBDIR=3D"/lib"' -I../include -I/home/bmg/b= uild/glibcs/mips-linux-gnu/glibc/elf -I/home/bmg/build/glibcs/mips-linux-g= nu/glibc -I../sysdeps/unix/sysv/linux/mips/mips32/fpu -I../sysdeps/unix/s= ysv/linux/mips/mips32 -I../sysdeps/unix/sysv/linux/mips -I../sysdeps/mips= /nptl -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux -= I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu -I../sysdeps/unix= /inet -I../sysdeps/unix/sysv -I../sysdeps/unix/mips/mips32 -I../sysdeps/= unix/mips -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/mips/mips32/= fpu -I../sysdeps/mips/mips32 -I../sysdeps/mips/ieee754 -I../sysdeps/mips= /include -I../sysdeps/mips -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee7= 54/dbl-64 -I../sysdeps/wordsize-32 -I../sysdeps/mips/fpu -I../sysdeps/ie= ee754 -I../sysdeps/generic -I.. -I../libio -I. -D_LIBC_REENTRANT -inclu= de /home/bmg/build/glibcs/mips-linux-gnu/glibc/libc-modules.h -DMODULE_NAME= =3Dldconfig -include ../include/libc-symbols.h -DPIC -DTOP_NAMESPACE= =3Dglibc -o /home/bmg/build/glibcs/mips-linux-gnu/glibc/elf/ldconfig.o -MD = -MP -MF /home/bmg/build/glibcs/mips-linux-gnu/glibc/elf/ldconfig.o.dt -MT /= home/bmg/build/glibcs/mips-linux-gnu/glibc/elf/ldconfig.o >>>> In file included from ../sysdeps/generic/ldsodefs.h:643, >>>> from ../sysdeps/mips/ldsodefs.h:82, >>>> from ../sysdeps/gnu/ldsodefs.h:46, >>>> from ../sysdeps/unix/sysv/linux/ldsodefs.h:25, >>>> from ../sysdeps/unix/sysv/linux/mips/ldsodefs.h:22, >>>> from ../sysdeps/mips/dl-procinfo.h:22, >>>> from /home/bmg/build/glibcs/mips-linux-gnu/glibc/dl-t= unable-list.h:6, >>>> from ../elf/dl-tunables.h:48, >>>> from ./dl-hwcaps.h:25, >>>> from ldconfig.c:44: >>>> ../sysdeps/unix/sysv/linux/dl-vdso-setup.c:62:22: error: =E2=80=98_dl_= vdso_clock_getres=E2=80=99 defined but not used [-Werror=3Dunused-variable] >>>> 62 | PROCINFO_CLASS int (*_dl_vdso_clock_getres) (clockid_t, >>>> | ^~~~~~~~~~~~~~~~~~~~~ >>>> ../sysdeps/unix/sysv/linux/dl-vdso-setup.c:53:22: error: =E2=80=98_dl_= vdso_gettimeofday=E2=80=99 defined but not used [-Werror=3Dunused-variable] >>>> 53 | PROCINFO_CLASS int (*_dl_vdso_gettimeofday) (struct timeval *,= void *) RELRO; >>>> | ^~~~~~~~~~~~~~~~~~~~~ >>>> ../sysdeps/unix/sysv/linux/dl-vdso-setup.c:49:22: error: =E2=80=98_dl_= vdso_clock_gettime64=E2=80=99 defined but not used [-Werror=3Dunused-variab= le] >>>> 49 | PROCINFO_CLASS int (*_dl_vdso_clock_gettime64) (clockid_t, >>>> | ^~~~~~~~~~~~~~~~~~~~~~~~ >>>> ../sysdeps/unix/sysv/linux/dl-vdso-setup.c:45:22: error: =E2=80=98_dl_= vdso_clock_gettime=E2=80=99 defined but not used [-Werror=3Dunused-variable] >>>> 45 | PROCINFO_CLASS int (*_dl_vdso_clock_gettime) (clockid_t, >>>> | ^~~~~~~~~~~~~~~~~~~~~~ >>>> cc1: all warnings being treated as errors >>>> make[3]: *** [../o-iterator.mk:9: /home/bmg/build/glibcs/mips-linux-gn= u/glibc/elf/ldconfig.o] Error 1 >>>> make[3]: Leaving directory '/home/bmg/src/glibc/elf' >>>> make[3]: *** Waiting for unfinished jobs.... >>>> make[2]: *** [Makefile:484: elf/others] Error 2 >>>> make[1]: *** [Makefile:9: all] Error 2 >>>> >>>> Florian >>>> >>> Hi Florian, >>> >>> thanks for the info. I've take a look. Seems to be related to the >>> removed sysdeps/mips/dl-procinfo.c with those undefs at the end: >>> #undef PROCINFO_DECL >>> #undef PROCINFO_CLASS >>> >>> Bye, >>> Stefan >> >> Okay, we have this chain: >> - elf/ldconfig.c: >> #define PROCINFO_CLASS static >> #include >> -> elf/dl-hwcaps.h >> -> elf/dl-tunables.h >> -> /dl-tunable-list.h >> -> sysdeps/mips/dl-procinfo.h: >> -> sysdeps/unix/sysv/linux/mips/ldsodefs.h >> -> sysdeps/unix/sysv/linux/ldsodefs.h: >> -> sysdeps/gnu/ldsodefs.h >> -> sysdeps/mips/ldsodefs.h >> -> sysdeps/generic/ldsodefs.h: >> ... >> #include >> ... >> # define PROCINFO_DECL >> # ifndef PROCINFO_CLASS >> # define PROCINFO_CLASS EXTERN >> # endif >> # include >> ... >> >> Before my patch, sysdeps/mips/dl-procinfo.c contains those undefs at the >> end: >> #undef PROCINFO_DECL >> #undef PROCINFO_CLASS >> With my patch, the empty sysdeps/generic/dl-procinfo.c is used. >> >> Thus we end up in: >> static int (*_dl_vdso_...) (...) RELRO; >> vs before: >> extern int (*_dl_vdso_...) (...) RELRO; >> >> The latter builds fine, while the former produces the "defined but not >> used" warnings. >> >> >> Thus I will adjust my patch to keep sysdeps/mips/dl-procinfo.c with only >> something like this: >> /* Note: >> When compiling elf/ldconfig.c, PROCINFO_CLASS is defined to static. >> This dl-procinfo.c is included in sysdeps/generic/ldsodefs.h. >> Afterwards, if not yet defined, PROCINFO_CLASS is defined to EXTERN >> just before dl-vdso-setup.c is included. A "static" _dl_vdso_xyz >> function prototype would lead to gcc warnings/errors: defined but >> not used. */ >> #undef PROCINFO_DECL >> #undef PROCINFO_CLASS >> >> >> My patch also removes sysdeps/alpha/dl-procinfo.c and >> sysdeps/csky/dl-procinfo.c with those #undef's at the end. But alpha and >> csky do not define the vdso HAVE_XYZ_VSYSCALL macros and thus do not end >> up with those errors. >> (At the end of dl-vdso-setup.c, PROCINFO_DECL and PROCINFO_CLASS are >> also undefined) >> >> I run build-many-glibcs.py from scratch which lasts some time. >> Afterwards I'll send a V2 series. >> >> Thanks, >> Stefan >=20 > I've successfully run build-many-glibcs.py from scratch - all PASSed - > and I send a V2 with the MIPS-fix: > [V2] elf: Remove platform strings in dl-procinfo.c > https://sourceware.org/pipermail/libc-alpha/2024-June/157391.html >=20 > Adhemerval has already reviewed the remaining patches. As soon as this > V2 is also reviewed, I can push the series. >=20 > Thanks, > Stefan Adhemerval has also reviewed [V2] elf: Remove platform strings in dl-procinfo.c Thus I've committed the series. Thanks, Stefan