From owner-freebsd-ppc@freebsd.org Tue Jan 22 02:24:48 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 97A4C14A7567 for ; Tue, 22 Jan 2019 02:24:48 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic311-15.consmr.mail.bf2.yahoo.com (sonic311-15.consmr.mail.bf2.yahoo.com [74.6.131.125]) (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 949776B91C for ; Tue, 22 Jan 2019 02:24:47 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: 5WVjcIIVM1n.FJupu8xcsH.zcLyMPqUq5t9_PLo2ZB2wypAizt2EW9DPHV8gndV duiL4HlmgszmWpx.xysT3RyN2SAbsyYnf7U4v57HSk0kjy2JoPJ61Ao0BF4U0_9V9qNKGXZYX62r wT54_YO_m0LQLSwaFnHjDV8804hkRoVDrrq2ZOsOS2ZD4Lmr3juu5MYk.goZfqm.LUxeYWbOnLuf laHLh27zg_zbHUG5yiC0i6CN_zorIOW6_QBzMLus8B6Mea_D2hXdFO1PQMgp8iLtGPB9Sw_jVCVg Tww6uea1DzpIVZlHxFkgpAlAzmWCrNsoxY5MPDI9Q6sYJ9blbh1OqDzDGdknHtFxQ4OgCfk99Uuh sAbzJmVKhF0HtCGTwS26kbT_9Ryh8s52L_mdzU0bcd9zucCqDkDaq1dzvZ5ujG.LWDYSyyrn_AwL OIN7PDo5_2VpAGHvLFwz6ZOUh0zmpcJBaafxEwxWvd0jjrbu3_9yBbmyCtiKpVdPqB9Wbe.y_uZS 041W_kSVuabQxKd2zIFj5eC02dDbxN_KRwdyvIK3neZ5qqqyhfszBD44nFJlNFB5GL.XpnSsW0SB 52oAyZkp_YILfPjc8c88Xj.ihoor0fQBU4DA6pBJgF74w65atSbo0b19rV.RGykacL9EMWT4v.WT OHCA8MVEW2M9Hpq.WzHPrYO2a7qINxHdxYEFyVv037WV_PqtkWjPBys4.kD_vC3pfI8l47i6VVCa U7tSXJxt1F7K4P5doKnr0vlTJRShwKB3bNqFerva88TJgBkJiW4b7qJn.MPKjm.kraqVmr_ckGcF OmlcjSvVA8f3_MYa.XZ75aHpoGBZgbM.k26kr8Fhu5nyQw7T7IddoQUwkjm.Oyf0OPU5ILhDfpv4 UDaPiloA1_WK7wKODuLNsIZ3M_V5ZstcETvIHdPGqDt9S6L.plGVYh5G7RpmVpA0lzaVo1npzAqa C1xgBah_3b3xg8QF2xbKFGOOz2RLk8FGhUorBeIDOzBMvnnrHzUfNR3sVj92VzVodXS2Jmk8Nq6t lVe.7oYQEgC2LnMuv8kQauVjrO1JHtxsQq5K1x2_WYanU7XSKErB9QF5R7n7kTGu44oA- Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.bf2.yahoo.com with HTTP; Tue, 22 Jan 2019 02:24:46 +0000 Received: from c-67-170-167-181.hsd1.or.comcast.net (EHLO [192.168.1.102]) ([67.170.167.181]) by smtp407.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 8b5caa7be216f400f830c9a24c3f17e0; Tue, 22 Jan 2019 02:24:42 +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: Date: Mon, 21 Jan 2019 18:24:40 -0800 Cc: "freebsd-ppc@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <19343397-859C-4629-A4A5-B0DCDE25957B@yahoo.com> References: To: John Baldwin X-Mailer: Apple Mail (2.3445.102.3) X-Rspamd-Queue-Id: 949776B91C X-Spamd-Bar: ++ X-Spamd-Result: default: False [2.04 / 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:26101, ipnet:74.6.128.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)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.97)[0.969,0]; NEURAL_HAM_LONG(-0.13)[-0.130,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(1.07)[ip: (2.82), ipnet: 74.6.128.0/21(1.46), asn: 26101(1.16), country: US(-0.08)]; NEURAL_SPAM_MEDIUM(0.64)[0.640,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[125.131.6.74.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 02:24:48 -0000 On 2019-Jan-21, at 12:58, John Baldwin wrote: > . . . >=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); > } Note: This is from my odd devel/pwoerpc64-xtoolchain-gcc based = buildworld based environment with cc being system clang: # 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 Absent makeinfo the make failed to complete. (I've no clue if there are more dependencies required.) # ./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 Stop. make[3]: stopped in /root/c_tests/ppc64_tls_git/bfd/doc *** 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 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)