From owner-freebsd-toolchain@FreeBSD.ORG Mon Mar 5 00:03:12 2012 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38B391065672; Mon, 5 Mar 2012 00:03:12 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id CD6EC8FC15; Mon, 5 Mar 2012 00:03:11 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1S4LOQ-0004k7-Pz>; Mon, 05 Mar 2012 01:03:10 +0100 Received: from e178032031.adsl.alicedsl.de ([85.178.32.31] helo=thor.walstatt.dyndns.org) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1S4LOQ-0003BE-Ja>; Mon, 05 Mar 2012 01:03:10 +0100 Message-ID: <4F5402B8.9030000@zedat.fu-berlin.de> Date: Mon, 05 Mar 2012 01:03:04 +0100 From: "O. Hartmann" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.2) Gecko/20120223 Thunderbird/10.0.2 MIME-Version: 1.0 To: Toolchain FreeBSD , freebsd-current@freebsd.org References: <4F536D41.1030302@zedat.fu-berlin.de> <201203041628.q24GS12l088270@pozo.com> <201203041751.02531.ken@mthelicon.com> <4F53D1D3.2010607@zedat.fu-berlin.de> <4F53E2C3.7090102@FreeBSD.org> <4F53FD57.303@zedat.fu-berlin.de> In-Reply-To: <4F53FD57.303@zedat.fu-berlin.de> X-Enigmail-Version: 1.3.5 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig98CF7CBF39D5A43E3DEBCE4C" X-Originating-IP: 85.178.32.31 Cc: Subject: undefined reference to `_ThreadRuneLocale': make buildkernel and make buildworld broken X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 00:03:12 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig98CF7CBF39D5A43E3DEBCE4C Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable This is what I get when trying to build a kernel from sources at revision 232526 and system at revision: 10.0-CURRENT #0 r232497: Sun Mar 4 16:35:35 CET 2012. It is impossible to do even a simple make installincludes this breaks with: =3D=3D=3D> kerberos5 (installincludes) =3D=3D=3D> kerberos5/doc (installincludes) =3D=3D=3D> kerberos5/lib (installincludes) =3D=3D=3D> kerberos5/lib/libasn1 (installincludes) cd /usr/src/kerberos5/lib/libasn1/../../tools/asn1_compile && make Warning: Object directory not changed from original /usr/src/kerberos5/tools/asn1_compile cd /usr/src/kerberos5/tools/asn1_compile/../make-print-version && make Warning: Object directory not changed from original /usr/src/kerberos5/tools/make-print-version cd /usr/src/kerberos5/tools/asn1_compile/../make-roken && make Warning: Object directory not changed from original /usr/src/kerberos5/tools/make-roken clang -O2 -pipe -pipe -O3 -fno-strict-aliasing -march=3Dnative -I/usr/src/kerberos5/tools/asn1_compile/../../../crypto/heimdal/lib/roken= -I/usr/src/kerberos5/tools/asn1_compile/../../../crypto/heimdal/lib/asn1= -I. -DHAVE_CONFIG_H -I/usr/src/kerberos5/tools/asn1_compile/../../include -std=3Dgnu99 -fstack-protector -o asn1_compile gen.o gen_copy.o gen_decode.o gen_encode.o gen_free.o gen_glue-fixed.o gen_length.o gen_seq.o hash.o ecalloc.o emalloc.o estrdup.o main.o symbol.o getarg.o warnerr.o lex.o parse.o print_version.o get_window_size.o strupr.o clang: warning: argument unused during compilation: '-std=3Dgnu99' hash.o: In function `hashcaseadd': /usr/src/kerberos5/tools/asn1_compile/../../../crypto/heimdal/lib/asn1/ha= sh.c:(.text+0x3bb): undefined reference to `_ThreadRuneLocale' lex.o: In function `yylex': lex.c:(.text+0xb94): undefined reference to `_ThreadRuneLocale' lex.c:(.text+0xcfa): undefined reference to `_ThreadRuneLocale' strupr.o: In function `strupr': /usr/src/kerberos5/tools/asn1_compile/../../../crypto/heimdal/lib/roken/s= trupr.c:(.text+0x1e): undefined reference to `_ThreadRuneLocale' clang: error: linker command failed with exit code 1 (use -v to see invocation) *** [asn1_compile] Error code 1 Stop in /usr/src/kerberos5/tools/asn1_compile. *** [../../tools/asn1_compile/asn1_compile] Error code 1 Stop in /usr/src/kerberos5/lib/libasn1. *** [installincludes] Error code 1 Stop in /usr/src/kerberos5/lib. *** [installincludes] Error code 1 Stop in /usr/src/kerberos5. *** [installincludes] Error code 1 Stop in /usr/src. *** [installincludes] Error code 1 A "make buildkernel" terminates with the below shown error message. It seems some CLANG/CC struggles inbetween terminated my system in a very bad way! So, what causes the error, what is `_ThreadRuneLocale' supposed to be? Regards, Oliver -------------------------------------------------------------- >>> stage 2.3: build tools -------------------------------------------------------------- cd /usr/obj/usr/src/sys/THOR; PATH=3D/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/u= sr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/sbin:/bin:/usr/sbin:/usr/bi= n MAKESRCPATH=3D/usr/src/sys/dev/aic7xxx/aicasm make SSP_CFLAGS=3D -DNO_CPU_CFLAGS -DNO_CTF -f /usr/src/sys/dev/aic7xxx/aicasm/Makefile Warning: Object directory not changed from original /usr/obj/usr/src/sys/THOR clang -O2 -pipe -pipe -O3 -fno-strict-aliasing -nostdinc -I/usr/include -I. -I/usr/src/sys/dev/aic7xxx/aicasm -std=3Dgnu99 -Wsystem-headers -Wal= l -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wno-pointer-sign -c /usr/src/sys/dev/aic7xxx/aicasm/aicasm.c clang -O2 -pipe -pipe -O3 -fno-strict-aliasing -nostdinc -I/usr/include -I. -I/usr/src/sys/dev/aic7xxx/aicasm -std=3Dgnu99 -Wsystem-headers -Wal= l -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wno-pointer-sign -c /usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c clang -O2 -pipe -pipe -O3 -fno-strict-aliasing -nostdinc -I/usr/include -I. -I/usr/src/sys/dev/aic7xxx/aicasm -std=3Dgnu99 -Wsystem-headers -Wal= l -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wno-pointer-sign -c aicasm_gram.c clang -O2 -pipe -pipe -O3 -fno-strict-aliasing -nostdinc -I/usr/include -I. -I/usr/src/sys/dev/aic7xxx/aicasm -std=3Dgnu99 -Wsystem-headers -Wal= l -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wno-pointer-sign -c aicasm_macro_gram.c clang -O2 -pipe -pipe -O3 -fno-strict-aliasing -nostdinc -I/usr/include -I. -I/usr/src/sys/dev/aic7xxx/aicasm -std=3Dgnu99 -Wsystem-headers -Wal= l -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wno-pointer-sign -c aicasm_scan.c clang -O2 -pipe -pipe -O3 -fno-strict-aliasing -nostdinc -I/usr/include -I. -I/usr/src/sys/dev/aic7xxx/aicasm -std=3Dgnu99 -Wsystem-headers -Wal= l -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wno-pointer-sign -c aicasm_macro_scan.c clang -O2 -pipe -pipe -O3 -fno-strict-aliasing -nostdinc -I/usr/include -I. -I/usr/src/sys/dev/aic7xxx/aicasm -std=3Dgnu99 -Wsystem-headers -Wal= l -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wno-pointer-sign -o aicasm aicasm.o aicasm_symbol.o aicasm_gram.o aicasm_macro_gram.o aicasm_scan.o aicasm_macro_scan.o -ll clang: warning: argument unused during compilation: '-nostdinc' clang: warning: argument unused during compilation: '-std=3Dgnu99' aicasm.o: In function `main': /usr/src/sys/dev/aic7xxx/aicasm/aicasm.c:(.text+0x91f): undefined reference to `_ThreadRuneLocale' aicasm_symbol.o: In function `symtable_dump': /usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:(.text+0x7c4): undefined reference to `_ThreadRuneLocale' clang: error: linker command failed with exit code 1 (use -v to see invocation) *** [aicasm] Error code 1 --------------enig98CF7CBF39D5A43E3DEBCE4C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iQEcBAEBAgAGBQJPVAK+AAoJEOgBcD7A/5N8OssH/jxzqEetOpC4OI9xQV/lQ2xk k0FMR9K7rS/jqqtwJv0QYpFJF+yw05ZWkOdVlwWSu8XmSMjIRjid3TWX6RxDGLS0 C2x66UFygSw1Ze5K5AfJMKUA7GHYvzs92pz/UxEGNdFYIvRaZXGLKg6IYaFAQ+aM oMWSMNY7EpC0PuERxEzKVqXnlE4KJfdkBLsaIXliK+oeyZ9E7ctejWYidfvNwxlX gKtQkHyruQUgcjUWdNhY/PTfEDUvnNi0JIM5zrsRVQmAlbAa9llb6MkJxHTbyJCJ MmDuZShVs9kEgqXDurFs7+Lcfvy1Es1KXN2tUw2AkQZFmFSfwgQpbjntbEILLho= =R0Q6 -----END PGP SIGNATURE----- --------------enig98CF7CBF39D5A43E3DEBCE4C-- From owner-freebsd-toolchain@FreeBSD.ORG Thu Mar 8 13:52:00 2012 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84FDD1065670 for ; Thu, 8 Mar 2012 13:52:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id D10728FC20 for ; Thu, 8 Mar 2012 13:51:59 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q28Dpeex021212; Thu, 8 Mar 2012 15:51:40 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q28DpdK9095367; Thu, 8 Mar 2012 15:51:39 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q28Dpb9q095366; Thu, 8 Mar 2012 15:51:37 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 8 Mar 2012 15:51:37 +0200 From: Konstantin Belousov To: freebsd-toolchain@freebsd.org Message-ID: <20120308135137.GP75778@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AFmbwsUflYm/9XUC" Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: flo@freebsd.org, mips@freebsd.org, kan@freebsd.org, ia64@freebsd.org, Andrew Turner , John Marino Subject: init arrays patch X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 13:52:00 -0000 --AFmbwsUflYm/9XUC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, The latest version of the patch to add support for init and fini arrays for FreeBSD is available at http://people.freebsd.org/~kib/misc/init_array.7.patch Apparently, some variant of ARM ABI mandates the use of arrays, so there is a demand for the change. Also, it is another step to bring us closer to modern ELF platform. I decided to change ABI by no longer calling _init/_fini functions from the crt1 for dynamic binaries. To keep the backward compatibility, a new ELF note is added for binaries that have modern crt1. The rtld now parses notes and calls _init/_fini itsef. This is done to easier the implementation of the proper order between preinit array, _init and init array. The patch passes make universe, was tested by me on i386 and amd64, a previous version of the patch was tested by Andrew on arm. The sparc64, ia64, mips and both powerpc are not tested. Please note that ia64 also has old kind of crt1, which calls _init and does not provide note. The cause is that crt1.S for ia64 is written in assembly, which I do not know, and have no access to machine. Good test for the patch is to boot new world with old ports, which were linked with old crt1. Also, there is a test suite at http://people.freebsd.org/~kib/misc/rtld-init_array_tests.tbz Use top-level script run_tests.sh to run the tests, possibly changing the CC variable to point to your preferred compiler. Normal run shall produce no output. Looking for feedback, test results, esp. on the listed architectures. --AFmbwsUflYm/9XUC Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk9YuWgACgkQC3+MBN1Mb4gkgACcCXELzfN2XuSb2m07z9QvTtMr Mw0An218HlUBfYe0U8so4aCtoGPJPm7j =uxxE -----END PGP SIGNATURE----- --AFmbwsUflYm/9XUC-- From owner-freebsd-toolchain@FreeBSD.ORG Fri Mar 9 20:41:28 2012 Return-Path: Delivered-To: freebsd-toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D5F5D106564A; Fri, 9 Mar 2012 20:41:28 +0000 (UTC) (envelope-from flo@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9E5F58FC1A; Fri, 9 Mar 2012 20:41:28 +0000 (UTC) Received: from nibbler-wlan.fritz.box (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q29KfPIM000696; Fri, 9 Mar 2012 20:41:26 GMT (envelope-from flo@FreeBSD.org) Message-ID: <4F5A6AF4.3080602@FreeBSD.org> Date: Fri, 09 Mar 2012 21:41:24 +0100 From: Florian Smeets User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko/20120308 Thunderbird/13.0a1 MIME-Version: 1.0 To: Konstantin Belousov References: <20120308135137.GP75778@deviant.kiev.zoral.com.ua> In-Reply-To: <20120308135137.GP75778@deviant.kiev.zoral.com.ua> X-Enigmail-Version: 1.4a1pre Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig152C4D4FC7728394891A3E0D" Cc: mips@FreeBSD.org, kan@FreeBSD.org, ia64@FreeBSD.org, Andrew Turner , freebsd-toolchain@FreeBSD.org, Nathan Whitehorn , John Marino Subject: Re: init arrays patch X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 20:41:28 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig152C4D4FC7728394891A3E0D Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 08.03.12 14:51, Konstantin Belousov wrote: > Hi, Hi, > The latest version of the patch to add support for init and fini arrays= > for FreeBSD is available at > http://people.freebsd.org/~kib/misc/init_array.7.patch >=20 > The patch passes make universe, was tested by me on i386 and amd64, a > previous version of the patch was tested by Andrew on arm. The sparc64,= > ia64, mips and both powerpc are not tested. Please note that ia64 also > has old kind of crt1, which calls _init and does not provide note. The > cause is that crt1.S for ia64 is written in assembly, which I do not > know, and have no access to machine. >=20 > Good test for the patch is to boot new world with old ports, which were= > linked with old crt1. Also, there is a test suite at i ran the patch on sparc64. With a new kernel and world i was still able to use the following previously compiled ports, bash, php5, perl5.12 and mysql55-server. > http://people.freebsd.org/~kib/misc/rtld-init_array_tests.tbz > Use top-level script run_tests.sh to run the tests, possibly changing > the CC variable to point to your preferred compiler. Normal run shall > produce no output. >=20 I also ran testsuite and it worked as expected. Florian --------------enig152C4D4FC7728394891A3E0D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAk9aavUACgkQapo8P8lCvwmgRwCgu2seRWzTPqdcHK192JL8Xg8h E4AAnjsKRdXQqG+N0dJR0cqDucs9gAnh =ZXyL -----END PGP SIGNATURE----- --------------enig152C4D4FC7728394891A3E0D--