From owner-freebsd-ppc@freebsd.org Tue Jan 22 03:02:44 2019 Return-Path: Delivered-To: freebsd-ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF4C914A9806 for ; Tue, 22 Jan 2019 03:02:44 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic305-21.consmr.mail.gq1.yahoo.com (sonic305-21.consmr.mail.gq1.yahoo.com [98.137.64.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB3C86D6B7 for ; Tue, 22 Jan 2019 03:02:43 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: _XAtgO0VM1kMTHp3sB1RJfWNBn8jgvXxT_Xlsqo3R3eYUWPVniypVBsqabbWUrL Gq6zZWFpngeQ1aM6t5rZj.bxFx4d00PnZ8c6htuRlBOn2ca6Y4E8vg4G7tRDvfj.cHu7SSnXw.XZ v27qJ1Dwgbh.JOCN1UK_larqAteBfjkvqJvnc1WCg7Q6GOYIgJ8KUCECsCVkwWJDCj9.9bEVvYj2 5HJqKaM3tuq51LFpfv9fDSygVHHjqYRxAs._LigO8zSwnq4BKCa6Z55Hfg8zcUBnP5hgih6IOG.m 2fqIlhT80.lARkSDin6c.FZQIVrBzdFObyj.I3W6eBbHfrJOiIx1HaT_BSlv5HFN6s2yFVYi1iXL e53f.HWGq4Xce6g2S8d1lAxVluwjlBxaNDMj7eOJeN6KEoKNQe1YDogzIYXJIsqLbpQ1ZFqkPrsm Fzce_CryuvjYv9.WWwqt43sqwkffDF2kqBXKRTVxTOHtYIWzDv_BwfR6z7YjI4vgjMQKhAuLfG1O jjW3zRxGlvxWVZ0mglpMX.OKPHy5Cmi0.UqMGCZmkKTRgfYx.E4TbYhDpkqO08MKt35zzheziXeJ Pq3JnTgz4wFpVJ8TB0ggyxUbTwuA9azy9Fz4VAgrfYtUzkty3Ybnz27r6yROgkHkNwWq1q0TVFD5 MmyKQ0gmB75c.sXGxQJQcaI7_IpTIpdDwGY5bHxdliMRB2JXL9m9iceefw1K4TzYzVsCNU.pKq_y kBlVx8jpGLAVUVuwpeSzl_Qt0prYw0_XkqpoKpfPy3JrxyXKwDhD9d2nFMIzSKx7ylLdIRqHlEru QMJzctzyxjWkHmETJoxpJsFdhjZAZTvIKR9H_VqUy8p_nGQjniPI2TrpI.cjnhXz.jiPj69eBJGt 8Z2LC38cmCkK7oJYth6G_uwVyQVgwfC1Kjz8OMe8VQ8VKA.RbM4n9hWXBmtm1UWA2wAiP9pt83Ww y_l25.7yP_3LAJ7FUClnj.bwrsRXp2IEXLV.lgEMLtlZhFbPnrsIIJ57hcJlMJP0zUUeGB__EjWq a1tkqwmwseQXKFeMa5xbS.RWRMGbwTUKsrJhyP6buqLZpYvaGdm36Dr.oMUMe478- Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.gq1.yahoo.com with HTTP; Tue, 22 Jan 2019 03:02:42 +0000 Received: from c-67-170-167-181.hsd1.or.comcast.net (EHLO [192.168.1.102]) ([67.170.167.181]) by smtp402.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 0342033659f514a91bd07b5a1c1ccb7a; Tue, 22 Jan 2019 03:02:39 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: Re: GDB TLS testing From: Mark Millard In-Reply-To: <19343397-859C-4629-A4A5-B0DCDE25957B@yahoo.com> Date: Mon, 21 Jan 2019 19:02:38 -0800 Cc: "freebsd-ppc@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <19343397-859C-4629-A4A5-B0DCDE25957B@yahoo.com> To: John Baldwin X-Mailer: Apple Mail (2.3445.102.3) X-Rspamd-Queue-Id: AB3C86D6B7 X-Spamd-Bar: - X-Spamd-Result: default: False [-1.36 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MV_CASE(0.50)[]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_COUNT_THREE(0.00)[3]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.75)[-0.745,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.66)[0.660,0]; NEURAL_HAM_LONG(-1.00)[-0.996,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.23)[ipnet: 98.137.64.0/21(0.68), asn: 36647(0.55), country: US(-0.08)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[84.64.137.98.list.dnswl.org : 127.0.5.0] X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jan 2019 03:02:45 -0000 On 2019-Jan-21, at 18:24, Mark Millard wrote: > On 2019-Jan-21, at 12:58, John Baldwin wrote: >=20 >> . . . >>=20 >> Would someone with a working ppc system be willing to help test the = GDB bits >> for me? You can grab the 'fbsd_tls' branch from = github/bsdjhb/gdb.git to >> build a GDB. For testing purposes, just generating a core from the = test >> programs I'm using and looking at that core on a non-ppc host would = also >> work fine. For example, in my case where I have the ppc system = installed to >> /qemu/ppc64/rootfs, I would do 'set sysroot /qemu/ppc64/rootfs' at = the GDB >> prompt to point GDB at the ppc64 libraries, etc. Note that modern = GDB is >> written in C++11, so you can't build it with gcc4.2. >>=20 >> The first test program I am using is below and should generate a core = when >> run. To test the TLS functionality you would want to make sure 'p = id' >> reports the proper value (PID from the program's output), and also = that >> 'p &id' also reports an address matching the program's output: >>=20 >> #include >> #include >>=20 >> static __thread int id; >>=20 >> int >> main(int ac, char **av) >> { >>=20 >> printf("main: PID %d\n", getpid()); >> id =3D getpid(); >> printf("id =3D %d (%p)\n", id, &id); >> (void)getchar(); >> #if 1 >> #if defined(__powerpc__) >> *(char *)NULL =3D 1; >> #else >> __builtin_trap(); >> #endif >> #endif >> return (0); >> } >=20 > Note: This is from my odd devel/pwoerpc64-xtoolchain-gcc based = buildworld > based environment with cc being system clang: >=20 > # uname -apKU > FreeBSD FBSDG5L 13.0-CURRENT FreeBSD 13.0-CURRENT #5 r341836M: Tue Dec = 11 20:11:21 PST 2018 = markmi@FBSDFSSD:/usr/obj/powerpc64vtsc_xtoolchain-gcc/powerpc.powerpc64/us= r/src/powerpc.powerpc64/sys/GENERIC64vtsc-NODBG powerpc powerpc64 = 1300005 1300005 >=20 >=20 > Absent makeinfo the make failed to complete. (I've no clue if there = are > more dependencies required.) >=20 > # ./configure > checking build system type... powerpc64-unknown-freebsd13.0 > checking host system type... powerpc64-unknown-freebsd13.0 > checking target system type... powerpc64-unknown-freebsd13.0 > checking for a BSD-compatible install... /usr/bin/install -c > . . . > checking for makeinfo... no > /root/c_tests/ppc64_tls_git/missing: makeinfo: not found > checking for expect... no > . . . > # make > Configuring in ./libiberty > configure: creating cache ./config.cache > checking whether to enable maintainer-specific portions of = Makefiles... no > checking for makeinfo... /root/c_tests/ppc64_tls_git/missing makeinfo = --split-size=3D5000000 > configure: WARNING: > *** Makeinfo is missing. Info documentation will not be built. > checking for perl... perl > . . . > creating bfdver.texi > restore=3D: && backupdir=3D".am$$" && rm -rf $backupdir && mkdir = $backupdir && if (/root/c_tests/ppc64_tls_git/missing makeinfo = --split-size=3D5000000 --split-size=3D5000000 --version) >/dev/null = 2>&1; then for f in bfd.info bfd.info-[0-9] bfd.info-[0-9][0-9] = bfd.i[0-9] bfd.i[0-9][0-9]; do if test -f $f; then mv $f $backupdir; = restore=3Dmv; else :; fi; done; else :; fi && if = /root/c_tests/ppc64_tls_git/missing makeinfo --split-size=3D5000000 = --split-size=3D5000000 -I . -o bfd.info `test -f 'bfd.texi' || echo = './'`bfd.texi; then rc=3D0; else rc=3D$?; $restore $backupdir/* = `echo "./bfd.info" | sed 's|[^/]*$||'`; fi; rm -rf $backupdir; exit = $rc > /root/c_tests/ppc64_tls_git/missing: makeinfo: not found > WARNING: 'makeinfo' is missing on your system. > You should only need it if you modified a '.texi' file, or > any other file indirectly affecting the aspect of the manual. > You might want to install the Texinfo package: > > The spurious makeinfo call might also be the consequence of > using a buggy 'make' (AIX, DU, IRIX), in which case you might > want to install GNU make: > > *** Error code 127 >=20 > Stop. > make[3]: stopped in /root/c_tests/ppc64_tls_git/bfd/doc > *** Error code 1 >=20 > Stop. > make[2]: stopped in /root/c_tests/ppc64_tls_git/bfd > *** Error code 1 >=20 > Stop. > make[1]: stopped in /root/c_tests/ppc64_tls_git > *** Error code 1 >=20 > Stop. > make: stopped in /root/c_tests/ppc64_tls_git After installing print/texinfo to get makeinfo , the next problem for me is libintl.h not being found despite its existence in /usr/local/include/ : # make . . . libtool: compile: cc -DHAVE_CONFIG_H -I. -DBINDIR=3D\"/usr/local/bin\" = -I. -I. -I./../include -DHAVE_powerpc_elf64_fbsd_vec = -DHAVE_powerpc_elf64_vec -DHAVE_powerpc_elf32_vec = -DHAVE_powerpc_elf32_fbsd_vec -DHAVE_powerpc_elf32_le_vec = -DHAVE_rs6000_xcoff_vec -DHAVE_rs6000_xcoff64_vec = -DHAVE_rs6000_xcoff64_aix_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec = -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec -DHAVE_plugin_vec -W -Wall = -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -I./../zlib -g = -O2 -MT archive.lo -MD -MP -MF .deps/archive.Tpo -c archive.c -o = archive.o In file included from archive.c:134: ./sysdep.h:185:11: fatal error: 'libintl.h' file not found # include ^~~~~~~~~~~ 1 error generated. *** Error code 1 Stop. make[4]: stopped in /root/c_tests/ppc64_tls_git/bfd *** Error code 1 Stop. make[3]: stopped in /root/c_tests/ppc64_tls_git/bfd *** Error code 1 Stop. make[2]: stopped in /root/c_tests/ppc64_tls_git/bfd *** Error code 1 Stop. make[1]: stopped in /root/c_tests/ppc64_tls_git *** Error code 1 Stop. make: stopped in /root/c_tests/ppc64_tls_git # find /usr/local/include/ -name libintl.h -print /usr/local/include/libintl.h =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)