From owner-freebsd-ppc@freebsd.org Mon Jan 21 19:55:50 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 D1F8D14B5FF7 for ; Mon, 21 Jan 2019 19:55:50 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (mail-n.franken.de [193.175.24.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6DD6F75F67 for ; Mon, 21 Jan 2019 19:55:50 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from [IPv6:2003:cd:6f38:4a00:d055:9c33:c95a:528e] (p200300CD6F384A00D0559C33C95A528E.dip0.t-ipconnect.de [IPv6:2003:cd:6f38:4a00:d055:9c33:c95a:528e]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id 31B07721E2821 for ; Mon, 21 Jan 2019 20:55:48 +0100 (CET) From: Michael Tuexen Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: clang support Message-Id: Date: Mon, 21 Jan 2019 20:55:47 +0100 To: FreeBSD PowerPC ML X-Mailer: Apple Mail (2.3445.102.3) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-Rspamd-Queue-Id: 6DD6F75F67 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.99)[-0.985,0]; ASN(0.00)[asn:680, ipnet:193.174.0.0/15, country:DE]; NEURAL_HAM_LONG(-1.00)[-1.000,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: Mon, 21 Jan 2019 19:55:51 -0000 Dear all, what is the reason FreeBSD is not using clang on PPC, but still used gcc. Are there any plans to change it? Best regards Michael From owner-freebsd-ppc@freebsd.org Mon Jan 21 20:54:30 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 5822714B8141 for ; Mon, 21 Jan 2019 20:54:30 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic307-11.consmr.mail.ne1.yahoo.com (sonic307-11.consmr.mail.ne1.yahoo.com [66.163.190.34]) (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 1FDBF81B1E for ; Mon, 21 Jan 2019 20:54:29 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: WFyNAJkVM1mug0uRjB0T7uaXBZhPYMuNoqzpZLLpWtrcDrKzt_C36d3xvpDaiiW NdVMppvfQQ1XJ3ADcBJWvJdjbC3Y0Y2tf9_2eRJMXTcSiU54l9xy0h25b6kEGpu1ws88snz85KHL oVTKDIk8BPjBcmHF5IQ8.enIr8Sk8A9czB3bW18qRH7vwoX.uGw6c7p6O36_veHce5Mf_nQQ_EKH 4HWVsHhV.f.2no7ggDgOQ9n1SSkarY_KT.fU8YCBtEIvss7gh2PloZCxxwEDtmLdJtDszYI3u83R 5pQ8lfiHoMy3oH6X9URgdYjQKIFYmbuE6xCdHyCyojECiBqjN41Xh52WCYpkK_AG7MCGJMAReShk VnlZU2JVBRWzUsNONe9hqXWcCTWX8.YXjbSDUpZzQy378NPCx1EB9pqJuexxi3O0uHQSGmhn9ROp PqxytsTkBs6ZaajI7KsLnrXDvQezu0VijFamait2HjNcVQn84qzYmg2RQA2VqrITI6WrOoE5MtGV yrjN4Teg019tBBcNDgWxH1gOABLF9WN4Ph5RZ4jpw3aJyVBKxcqD7d_6m7rrSFbsk4hysktknqYn 9ro6pRm1WU06zs9aoDmwqldK9tKylLrgpSt_wdmjPur46TGWX0oTZRMn_FFvmQTusr8LDHVkvAVU ZNwX8W6Faj0zJFVtAs4.E7sIfP9pik.9L8NyD1wwva7h7fCLQjU1qEJz5ouUsmegsyDmqXPCvmBn 2Hv60a6UJqFYcnJBwR.rA6QYJMKwi2HEi0AVp_tEmjhKzaILXnu4orxKffRa4o20MDKJ37fQks0i Sdg7CWiixWmaPzTA.U7Sw9hFN6E1B8.9ha.f_GOF0D.8z36qEbGB1mplz8E452Ti7Z3d.keQHSDZ BxLHEKlE1.dP09PAIAs5BRCxK6t9hjEmojYMwmMy9TwyEtmKhX0Bnq40bz1QdNhBDDlF58edEw_y l8A7Rlt3C8d1Y6xxjabfju4_AQdIBRpDHNbdVl.wtk0dFJTN6IoWwKUXiAA3Fm90ND9vK92O4eMX LjFP1TOgmBdLyWvAPtxRwd5YkKfnPBpaJT.5_Nj3K.FmsDw4bS2WUiSxB_OF0HbZrEnVs Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Mon, 21 Jan 2019 20:54:22 +0000 Received: from c-67-170-167-181.hsd1.or.comcast.net (EHLO [192.168.1.102]) ([67.170.167.181]) by smtp407.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID d0a96b023c1d293d68d12b26b235d4fa; Mon, 21 Jan 2019 20:54:17 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: Re: clang support From: Mark Millard In-Reply-To: Date: Mon, 21 Jan 2019 12:54:16 -0800 Cc: FreeBSD PowerPC ML Content-Transfer-Encoding: quoted-printable Message-Id: <5CDCA7AB-395D-4AF0-9C2B-836F90DCDD17@yahoo.com> References: To: Michael Tuexen X-Mailer: Apple Mail (2.3445.102.3) X-Rspamd-Queue-Id: 1FDBF81B1E X-Spamd-Bar: + X-Spamd-Result: default: False [1.98 / 15.00]; RCVD_VIA_SMTP_AUTH(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]; TO_DN_ALL(0.00)[]; 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:36646, ipnet:66.163.184.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.54)[0.543,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(1.19)[ip: (4.03), ipnet: 66.163.184.0/21(1.10), asn: 36646(0.88), country: US(-0.08)]; NEURAL_SPAM_MEDIUM(0.67)[0.670,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.09)[0.088,0]; RCVD_IN_DNSWL_NONE(0.00)[34.190.163.66.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: Mon, 21 Jan 2019 20:54:30 -0000 On 2019-Jan-21, at 11:55, Michael Tuexen wrote: > Dear all, >=20 > what is the reason FreeBSD is not using clang on PPC, but still used = gcc. > Are there any plans to change it? lld? clang/clang++ mixed with the binutils ld? libunwind vs. libgcc_s unwindd facilities? The official FreeBSD clang7 or clang6 vintage vs. later in-developement materials? I sometimes experiment with what FreeBSD has in-tree for buildworld buildkernel and testing. Also with devel/powerpc64-xtoolchain-gcc related tooling. The overall answer for clang is that various things still do not work. I'll mostly ignore here freebsd bugs in libgcc_s handling of DW_CFA_remember_state and DW_CFA_restore_state that also apply to builds via gcc's after gcc 4.2.1 . (I run with a near- minimalist-text-change patch for this. =46rom other points of view it is suboptimal but I do nor care.) gcc 4.2.1 seems to mostly avoid those two for powerpc64 and powerpc and so seems to operate. I'll caution that the following are all "last I knew" as I've not repeated my experiments in a few months. Someone may know more recent status and there are folks working on versions after here FreeBSD is currently based. (I've not experimented with their materials.) clang does not correctly compile the libgcc_s unwind code, making thrown exceptions not work at all: the generated code crashes. __builtin_eh_return is parsed silently but ignored and so there is missing material in clang's output. (There could be more to it.) libunwind in FreeeBSD did not support targeting powerpc64 or powerpc for FreeBSD, even getting syntax errors in the assembler notation. So switching over is not yet an option. The kernel linkage handling and some of the clang-based kernel build's linkage generation were not matched, leading to dynamically loading kernel modules built by clang crashing. (I will not claim to know which side should change: I've never found a good reference for such areas for ABI requirements both are to meet.) I dealt with this by building-in what I wanted access to in order to do other experiments. lld just does not work yet for powerpc64 or powerpc. (I do not remember much detail here.) I do not try this as often, instead focusing on compiler output being correct for now.) It is possibly that I'll remember more later. I've had more success with devel/powerpc64-xtoolchain-gcc related tooling, although there is: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D232387 "head -r339076: system crash in vnet_epair_init during kern_jail_set in = a kyua test on powerpc64" so I've only been able to complete a: # kyua test -k /usr/tests/Kyuafile with a gcc 4.2.1 based kernel mixed with the more modern gcc based buildworld. (Something like my libgcc_s patch for DW_CFA_remember_state and DW_CFA_restore_state is required because kyua uses thrown C++ exceptions extensively to operate.) Bugzilla 232387 may be another linkage mismatch between what the kernel handles and what the compiler/linker generates, although I do not remember the details at the moment. I have also experimented with base/gcc and base/binutils but mostly devel/powerpc64-xtoolchain-gcc related tooling. So I do not otherwise comment on base/gcc and base/binutils here. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-ppc@freebsd.org Mon Jan 21 20:59:29 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 3CD5F14B83C9 for ; Mon, 21 Jan 2019 20:59:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D302281F96 for ; Mon, 21 Jan 2019 20:59:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 66F3531DA for ; Mon, 21 Jan 2019 20:59:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) To: freebsd-ppc@FreeBSD.org From: John Baldwin Subject: GDB TLS testing Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Mon, 21 Jan 2019 12:58:41 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D302281F96 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US] 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: Mon, 21 Jan 2019 20:59:29 -0000 First, I tried to boot FreeBSD under QEMU (but not using an ISO image to boot, building a disk image via makefs so I could modify it, etc.) following these instructions: - make buildworld TARGET_ARCH=powerpc64 CROSS_TOOLCHAIN=powerpc64-gcc - make buildkernel TARGET_ARCH=powerpc64 CROSS_TOOLCHAIN=powerpc64-gcc KERNCONF=GENERIC64 - make installkernel TARGET_ARCH=powerpc64 CROSS_TOOLCHAIN=powerpc64-gcc KERNCONF=GENERIC64 DESTDIR=/qemu/ppc64/rootfs/ - make installworld TARGET_ARCH=powerpc64 CROSS_TOOLCHAIN=powerpc64-gcc DESTDIR=/qemu/ppc64/rootfs/ - make distribution TARGET_ARCH=powerpc64 CROSS_TOOLCHAIN=powerpc64-gcc DESTDIR=/qemu/ppc64/rootfs/ - etcupdate extract -B -D /qemu/ppc64/rootfs -s /home/john/work/freebsd/head -M "TARGET_ARCH=powerpc64 CROSS_TOOLCHAIN=powerpc64-gcc" - makefs -M 32g -f 200000 -o version=2 -B big /qemu/ppc64/fs.img /qemu/ppc64/rootfs - mkimg -s mbr -p prepboot:=/qemu/ppc64/rootfs/boot/boot1.elf -p freebsd:=/qemu/ppc64/fs.img -a 1 -o /qemu/ppc64/disk.img - qemu-system-ppc64 -drive file=/qemu/ppc64/disk.img,format=raw -nographic -vga none -nic tap,ifname=tap2 This did let me boot into QEMU, but I had some weird issues with keyboard input not always working correctly. The network interface (llan0) also did not work at all. When it tried to DHCP, I saw no traffic on the tap2 interface on the host. I also tried using '-nic user' and that wasn't able to DHCP either. It seems like it if_llan(4) isn't actually transmitting packets. Anyway, the thing I am trying to test is support for thread-local-storage (TLS) variables under GDB. Since networking wasn't working, I tried to just copy my test programs (cross-built) and a GDB binary (also cross-built) into the disk image and booting that. However, my test program that used threads core dumped just trying to create a 3rd thread (so second call to pthread_create()), and when I tried to use GDB either live or against a core, it would just spin in userland forever (probably because C++ exceptions aren't working). Fixing C++ probably means moving to LLVM's libunwind instead of the ancient libgcc from gcc4.2 (though I know Mark Millard has a patch for the ancient libgcc that helped in his testing). 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. 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: #include #include static __thread int id; int main(int ac, char **av) { printf("main: PID %d\n", getpid()); id = getpid(); printf("id = %d (%p)\n", id, &id); (void)getchar(); #if 1 #if defined(__powerpc__) *(char *)NULL = 1; #else __builtin_trap(); #endif #endif return (0); } -- John Baldwin                                                                              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) 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) From owner-freebsd-ppc@freebsd.org Tue Jan 22 09:54:54 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 8DC2E14B6E03 for ; Tue, 22 Jan 2019 09:54:54 +0000 (UTC) (envelope-from unigaia@fastmail.jp) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0604584289; Tue, 22 Jan 2019 09:54:53 +0000 (UTC) (envelope-from unigaia@fastmail.jp) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id C0FD52108A; Tue, 22 Jan 2019 04:54:53 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 22 Jan 2019 04:54:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.jp; h= subject:to:references:from:cc:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=S YZU/3VAISax2xzorrqeE6p6aBAWSpDn2FNpHCWSNpA=; b=F8X+dbm1PHfuGLMI9 aEew/cyGsWWjUcbOvLMiv87of2BE+TisDI7V3D6UPBDrPSB5ReHGfjDkIn2gSihm HPf2U790qcsQD9BRga3MuUgJNdOBgq/xT3ck9OnpcReQWkRaPtL8AHdeaZCG/f9s 0sPNOkSaxu0hl9E1l5IXf1jOlKMvOkpE/uKpXJwZTuC+GOKtPD9akMcW7xeFtSvK 0JYDN2XyzvrW5wv33LzXrfaG7kY+ePfNQBXH8LIZtUaxDyzn1QIKjVFIzqKAHuJ4 fYN1FX52VyRAEFQvo4jS67ECCsxnxyDuJWTuD1E4l29S19u7d1wmSJ244OwD0R6K mU0lw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=SYZU/3VAISax2xzorrqeE6p6aBAWSpDn2FNpHCWSN pA=; b=jKM+6BlzZlBXeCxbneRuSOpMnD3XEJ+0Hy+FGr2jY3bKNu3ueyg6xPZQQ cWdlMKz/64RmljqL2t5dUdty4WmSfpp+wGyVBRq3+yh/+iKJulslFK8Xt01weaGK xmb1ZNwBzHUekEBWSq2tyk7b33ULou0tvUGqtFhLJF3V83SoFWsuqJIdC0bO6oU0 C+R0nUcMfdlvMSVGMj/OSaPFrrSIae0jFO3u8vv3UwqeG5+g/ly4uwgxpVMUE7BI jOk7XyJfmr73RxKMucjgzzYJ/da5cdfjkfpwmno2vpjCS67zWfjMgHcAX5Hk/q5m qY6gu8B1c8nC6+7iWSmXLvnWz8r6g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrheekgddtkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecufedt tdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepuffvfhfhkffffg ggjggtgfesthejredttdefjeenucfhrhhomhepfghnihcuifgrihgruceouhhnihhgrghi rgesfhgrshhtmhgrihhlrdhjpheqnecukfhppeeluddrledvrddutdelrdegfeenucfrrg hrrghmpehmrghilhhfrhhomhepuhhnihhgrghirgesfhgrshhtmhgrihhlrdhjphenucev lhhushhtvghrufhiiigvpedu X-ME-Proxy: Received: from [10.137.5.44] (unknown [91.92.109.43]) by mail.messagingengine.com (Postfix) with ESMTPA id 129AA100E4; Tue, 22 Jan 2019 04:54:51 -0500 (EST) Subject: Re: FreeBSD on the Talos II; OpenPOWER in general To: Nathan Whitehorn References: <63b1530f-bd2d-99b8-8aed-69cc753c75b8@freebsd.org> From: Uni Gaia Cc: freebsd-ppc@freebsd.org Message-ID: <3d857baf-eb4f-5da3-082c-1a2b84cc11b7@fastmail.jp> Date: Tue, 22 Jan 2019 09:54:47 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <63b1530f-bd2d-99b8-8aed-69cc753c75b8@freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 0604584289 X-Spamd-Bar: ------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=fastmail.jp header.s=fm2 header.b=F8X+dbm1; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=jKM+6Blz; dmarc=pass (policy=none) header.from=fastmail.jp; spf=pass (mx1.freebsd.org: domain of unigaia@fastmail.jp designates 66.111.4.29 as permitted sender) smtp.mailfrom=unigaia@fastmail.jp X-Spamd-Result: default: False [-7.57 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[fastmail.jp:s=fm2,messagingengine.com:s=fm1]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.29]; FREEMAIL_FROM(0.00)[fastmail.jp]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[4]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[fastmail.jp:+,messagingengine.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[fastmail.jp,none]; MX_GOOD(-0.01)[cached: in2-smtp.messagingengine.com]; IP_SCORE(-3.62)[ip: (-9.69), ipnet: 66.111.4.0/24(-4.67), asn: 11403(-3.68), country: US(-0.08)]; NEURAL_HAM_SHORT(-0.84)[-0.836,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[fastmail.jp]; ASN(0.00)[asn:11403, ipnet:66.111.4.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[29.4.111.66.list.dnswl.org : 127.0.5.1] 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 09:54:54 -0000 On 1/19/19 6:38 PM, Nathan Whitehorn wrote: > FreeBSD runs today, with or without graphics, on the Talos II and is the > subject of very active work by a number of developers, so the support is > rapidly improving. > -Nathan > Very cool. So people are actually using it as a desktop today? Any obvious things broken? Considering buying one - and want to run FreeBSD. From owner-freebsd-ppc@freebsd.org Tue Jan 22 17:51:18 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 C3A6214A9AB7 for ; Tue, 22 Jan 2019 17:51:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 285B29610A; Tue, 22 Jan 2019 17:51:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id AC6CDBC71; Tue, 22 Jan 2019 17:51:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: GDB TLS testing To: Mark Millard Cc: "freebsd-ppc@freebsd.org" References: <19343397-859C-4629-A4A5-B0DCDE25957B@yahoo.com> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Tue, 22 Jan 2019 09:50:20 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 285B29610A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.946,0]; NEURAL_HAM_LONG(-1.00)[-1.000,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 17:51:18 -0000 On 1/21/19 7:02 PM, Mark Millard wrote: > > > On 2019-Jan-21, at 18:24, Mark Millard wrote: > > > >> On 2019-Jan-21, at 12:58, John Baldwin wrote: >> >>> . . . >>> >>> 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. >>> >>> 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: >>> >>> #include >>> #include >>> >>> static __thread int id; >>> >>> int >>> main(int ac, char **av) >>> { >>> >>> printf("main: PID %d\n", getpid()); >>> id = getpid(); >>> printf("id = %d (%p)\n", id, &id); >>> (void)getchar(); >>> #if 1 >>> #if defined(__powerpc__) >>> *(char *)NULL = 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/usr/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=5000000 >> configure: WARNING: >> *** Makeinfo is missing. Info documentation will not be built. >> checking for perl... perl >> . . . >> creating bfdver.texi >> restore=: && backupdir=".am$$" && rm -rf $backupdir && mkdir $backupdir && if (/root/c_tests/ppc64_tls_git/missing makeinfo --split-size=5000000 --split-size=5000000 --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=mv; else :; fi; done; else :; fi && if /root/c_tests/ppc64_tls_git/missing makeinfo --split-size=5000000 --split-size=5000000 -I . -o bfd.info `test -f 'bfd.texi' || echo './'`bfd.texi; then rc=0; else rc=$?; $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 > > > 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=\"/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 This is an issue with GDB's configure that I haven't not been able to fix. I usually use a wrapper script, but it should be sufficient to set CFLAGS to "-I/usr/local/include" in the environment when invoking ./configure. Nevertheless, I was able to use a FAT filesystem image as a side car (as suggested by Justin) to examine the core dumps in a cross-debugger which was enough to test my current TLS patch: % ~/work/git/gdb/obj/gdb/gdb tls_single GNU gdb (GDB) 8.2.50.20190115-git ... Reading symbols from tls_single... Reading symbols from /usr/home/john/work/johnsvn/test/tls_single/ppc64/tls_single.debug... (gdb) set sysroot /qemu/ppc64/rootfs/ (gdb) core-file tls_single.core [New LWP 100058] Core was generated by `./tls_single'. Program terminated with signal SIGSEGV, Segmentation fault. Python Exception 'module' object has no attribute 'objfiles': #0 0x00000000100006bc in main (ac= , av=) at tls_single. c:16 16 *(char *)NULL = 1; (gdb) p id $1 = 688 (gdb) info proc process 688 cmdline = './tls_single' cwd = '/root' exe = '/root/tls_single' Hopefully this will land in GDB 8.3 when it is released. (Still need to get C++ exceptions working to have a functional native GDB for powerpc64 though.) -- John Baldwin                                                                              From owner-freebsd-ppc@freebsd.org Tue Jan 22 22:56:41 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 06AED14B2780 for ; Tue, 22 Jan 2019 22:56:41 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic310-15.consmr.mail.bf2.yahoo.com (sonic310-15.consmr.mail.bf2.yahoo.com [74.6.135.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 D27D0750E6 for ; Tue, 22 Jan 2019 22:56:39 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: pnXlDbkVM1lCzsyBN4LP7xTi_K3glbE9w5eBjZLzjHJ1.0FAOmubmcbrohQaTLH PRxLJgg.GOCGjzLKxzwSNqOEPZe50rn7IiwL3uH9XzQTA1aE16PTIWyHqv03NYUQBoBVSRrxmywI VVwr4RRO5UeCvq2koBYnnWseafAi_3mgOU7ltJkaZ3NSNo8KlKe4mZkitZ8e81L9aKAYqWsQvQdO lRd0i6UdytQsrMxF385QCsG3vRPn4X9qbs9e9QRL3JWwCLzBQuAIRRu6zJssIj6Cfsyu1GuA4BEc 2IB1cNSAsFacLwsUYwv1QvR5XYoDt0ysu7NRblP7d.iJ88FEqNgK6fATqNviERs9YbqCYwwp53gI ntAtT_TywSh7121alCNjt3u3ZKJmJSNnJ2QlCmYQ_1bOuo6HwyKZn6x9EiABhVlu8t8hMd4V3EZH rRx4X4nY.2fztSLZyJQZzbB935VJnAOlu7tmGS.VvKML_6btEb0pNjKLHSZqgjQAsIcw6pYU5UsY fIYmGsBMvISgG6p16DYGT43njql6yYyqsWysLsejboig7Ol0REhvgfgsjlTvhJITew1qpz5Zcs73 5zK1dXeQcqQ0w1Fqt1HXPqOI4Kv0vX8kM3oAT_GSEzBatvmawSmdkmNWXTUnuAON7uMQcDohAI34 dJRYtXd17fBWKLryuu36EFqGTDqB1LaYE4XcMgt8N0JRx_pZD5dPMOgpTokX1kKdCzHJjLR.eNsO YyIKNE3iNuc5SRf2V_QSFAbhHABKOONzCBl9Wrrf9zqE_mZ902fe1SXI1xwpoxe7JL34gJroBQrl 6Fc_hUGh4tcsdBq3cb.SynPH.5jJpKIr3EyOV8jUf1nDpfIOl1VzxdYfmC9EZiIlFgcuxZYVxG5E 9R2AoVujhZNhxH15uTLYfSnK5oj4bLicGMrtRCKiDUvzorVWmYCrANmzAWt.r40.TVItCZpnRzW0 1WDnSeDRQbW0PPI1Twsub7AEZ4jDEEEjdm.ftHL1TMtRhHy8b08QrHrWlHbONEyU.nIr_gcYs4LQ _D5KFySIyzN9rOu.eta41FFzR5ynv5mJlte8KIaTXV06iT66GQaf13oB82ZAlgkUleZE- Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.bf2.yahoo.com with HTTP; Tue, 22 Jan 2019 22:56:32 +0000 Received: from c-67-170-167-181.hsd1.or.comcast.net (EHLO [192.168.1.102]) ([67.170.167.181]) by smtp426.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 5c4fe88977dd63335aadb9bfe43064c6; Tue, 22 Jan 2019 22:56:30 +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: Tue, 22 Jan 2019 14:56:28 -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: D27D0750E6 X-Spamd-Bar: / X-Spamd-Result: default: False [-0.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]; DKIM_TRACE(0.00)[yahoo.com:+]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; 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)[]; NEURAL_HAM_MEDIUM(-0.25)[-0.247,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.60)[0.602,0]; NEURAL_HAM_LONG(-0.71)[-0.715,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.82)[ip: (1.58), ipnet: 74.6.128.0/21(1.45), asn: 26101(1.16), country: US(-0.08)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[125.135.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 22:56:41 -0000 On 2019-Jan-22, at 09:50, John Baldwin wrote: > On 1/21/19 7:02 PM, Mark Millard wrote: >>=20 >>=20 >> On 2019-Jan-21, at 18:24, Mark Millard wrote: >>=20 >>=20 >>=20 >>> 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 >>=20 >>=20 >> 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/ : >>=20 >> # 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 >>=20 >> Stop. >> make[4]: stopped in /root/c_tests/ppc64_tls_git/bfd >> *** Error code 1 >>=20 >> Stop. >> make[3]: stopped in /root/c_tests/ppc64_tls_git/bfd >> *** 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 >>=20 >>=20 >>=20 >> # find /usr/local/include/ -name libintl.h -print >> /usr/local/include/libintl.h >=20 > This is an issue with GDB's configure that I haven't not been able to = fix. > I usually use a wrapper script, but it should be sufficient to set = CFLAGS > to "-I/usr/local/include" in the environment when invoking = ./configure. I did that without forcing a clean-out first to see what it would report in the make attempt: # make Configuring in ./libiberty configure: loading cache ./config.cache configure: error: `CFLAGS' has changed since the previous run: configure: former value: `-g -O2' configure: current value: `-I/usr/local/include' configure: error: in `/root/c_tests/ppc64_tls_git/libiberty': configure: error: changes in the environment can compromise the build configure: error: run `make distclean' and/or `rm ./config.cache' and = start over *** 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 So I'm trying: # env CFLAGS=3D"-g -O2 -I/usr/local/include" ./configure . . . # rm */config.cache # make . . . That did not make everything work for the make: mv -f .deps/aarch64.Tpo .deps/aarch64.Po cc -g -O2 -I/usr/local/include -Wno-import -c flat_bl.m -o flat_bl.o flat_bl.m:2:2: error: expected identifier or '(' % the percentage of the total running time of the ^ 1 error generated. *** Error code 1 Stop. make[4]: stopped in /root/c_tests/ppc64_tls_git/gprof *** Error code 1 Stop. make[3]: stopped in /root/c_tests/ppc64_tls_git/gprof *** Error code 1 Stop. make[2]: stopped in /root/c_tests/ppc64_tls_git/gprof *** 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 . -name "flat_bl.m" -print | more ./gprof/flat_bl.m # less gprof/flat_bl.m % the percentage of the total running time of the time program used by this function. cumulative a running sum of the number of seconds accounted seconds for by this function and those listed above it. self the number of seconds accounted for by this seconds function alone. This is the major sort for this listing. calls the number of times this function was invoked, if this function is profiled, else blank. self the average number of milliseconds spent in this ms/call function per call, if this function is profiled, else blank. total the average number of milliseconds spent in this ms/call function and its descendents per call, if this function is profiled, else blank. name the name of the function. This is the minor sort for this listing. The index shows the location of the function in the gprof listing. If the index is in parenthesis it shows where it would appear in the gprof listing if it were to be printed. ^L Copyright (C) 2012-2019 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. > Nevertheless, I was able to use a FAT filesystem image as a side car = (as > suggested by Justin) to examine the core dumps in a cross-debugger = which was > enough to test my current TLS patch: >=20 > % ~/work/git/gdb/obj/gdb/gdb tls_single > GNU gdb (GDB) 8.2.50.20190115-git > ... > Reading symbols from tls_single... > Reading symbols from = /usr/home/john/work/johnsvn/test/tls_single/ppc64/tls_single.debug... > (gdb) set sysroot /qemu/ppc64/rootfs/ > (gdb) core-file tls_single.core=20 > [New LWP 100058] > Core was generated by `./tls_single'. > Program terminated with signal SIGSEGV, Segmentation fault. > Python Exception 'module' object = has no attribute 'objfiles':=20 > #0 0x00000000100006bc in main (ac=3D > , av=3D) at tls_single. > c:16 > 16 *(char *)NULL =3D 1; > (gdb) p id > $1 =3D 688 > (gdb) info proc > process 688 > cmdline =3D './tls_single' > cwd =3D '/root' > exe =3D '/root/tls_single' >=20 > Hopefully this will land in GDB 8.3 when it is released. (Still need = to get > C++ exceptions working to have a functional native GDB for powerpc64 = though.) >=20 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-ppc@freebsd.org Tue Jan 22 23:08:52 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 0748D14B2A3A for ; Tue, 22 Jan 2019 23:08:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7476D755A0; Tue, 22 Jan 2019 23:08:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id F2CDCDF33; Tue, 22 Jan 2019 23:08:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: GDB TLS testing To: Mark Millard Cc: "freebsd-ppc@freebsd.org" References: <19343397-859C-4629-A4A5-B0DCDE25957B@yahoo.com> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Tue, 22 Jan 2019 15:07:52 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7476D755A0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.99)[-0.993,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,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 23:08:52 -0000 On 1/22/19 2:56 PM, Mark Millard wrote: > > > On 2019-Jan-22, at 09:50, John Baldwin wrote: > >> On 1/21/19 7:02 PM, Mark Millard wrote: >>> >>> >>> On 2019-Jan-21, at 18:24, Mark Millard wrote: >>> >>> >>> >>>> On 2019-Jan-21, at 12:58, John Baldwin wrote: >>>> >>>>> . . . >>>>> >>>>> 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. >>>>> >>>>> 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: >>>>> >>>>> #include >>>>> #include >>>>> >>>>> static __thread int id; >>>>> >>>>> int >>>>> main(int ac, char **av) >>>>> { >>>>> >>>>> printf("main: PID %d\n", getpid()); >>>>> id = getpid(); >>>>> printf("id = %d (%p)\n", id, &id); >>>>> (void)getchar(); >>>>> #if 1 >>>>> #if defined(__powerpc__) >>>>> *(char *)NULL = 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/usr/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=5000000 >>>> configure: WARNING: >>>> *** Makeinfo is missing. Info documentation will not be built. >>>> checking for perl... perl >>>> . . . >>>> creating bfdver.texi >>>> restore=: && backupdir=".am$$" && rm -rf $backupdir && mkdir $backupdir && if (/root/c_tests/ppc64_tls_git/missing makeinfo --split-size=5000000 --split-size=5000000 --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=mv; else :; fi; done; else :; fi && if /root/c_tests/ppc64_tls_git/missing makeinfo --split-size=5000000 --split-size=5000000 -I . -o bfd.info `test -f 'bfd.texi' || echo './'`bfd.texi; then rc=0; else rc=$?; $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 >>> >>> >>> 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=\"/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 >> >> This is an issue with GDB's configure that I haven't not been able to fix. >> I usually use a wrapper script, but it should be sufficient to set CFLAGS >> to "-I/usr/local/include" in the environment when invoking ./configure. > > I did that without forcing a clean-out first to see what it would report > in the make attempt: > > # make > Configuring in ./libiberty > configure: loading cache ./config.cache > configure: error: `CFLAGS' has changed since the previous run: > configure: former value: `-g -O2' > configure: current value: `-I/usr/local/include' > configure: error: in `/root/c_tests/ppc64_tls_git/libiberty': > configure: error: changes in the environment can compromise the build > configure: error: run `make distclean' and/or `rm ./config.cache' and start over > *** 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 > > So I'm trying: > > # env CFLAGS="-g -O2 -I/usr/local/include" ./configure > . . . > # rm */config.cache > # make Eh, try gmake instead of make. I'm pretty sure the GDB repository requires GNU make. -- John Baldwin                                                                              From owner-freebsd-ppc@freebsd.org Tue Jan 22 23:52:45 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 CEA3514B3881 for ; Tue, 22 Jan 2019 23:52:44 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic302-22.consmr.mail.gq1.yahoo.com (sonic302-22.consmr.mail.gq1.yahoo.com [98.137.68.148]) (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 04AC476D83 for ; Tue, 22 Jan 2019 23:52:42 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: ILaSNJ0VM1ktM0t80JOv8m2_YaMqLGbNrPjXfDfdwsSzlwMkAnJdTcqme3V843B AXw2sBn18ywY2733.GaTzly3Zf6rFTHF.P8j65Tcvw_izptB77il_rjLZi_1ZXgo_n8D4qKjhpxm Xivck0OnhRMM_aB5APw1p70KV_fvdFPH_vlAGr_myE_1LaewAPaRLkUZ.dvZoXY3albrwE9r9Jfr 4JolrGy2FwLUcdkqplyEsycmPQYQdgpGh_E9FCkAgHKng7KikiYafCx9GqmxpTM4mwrfCR5ThTaa UBLJUCon6fVuHa7by999XLpNKF.IB5K0R9Oh9N3cP_Cqu7ZjIbGiWaqab66cjEyEZgg4bvrcE6O3 EZccIkvJrA41nPiKp9JCxufSyzfY0m.pCuQYZyNB157DlohPN2sisIs.56JQ8SaiMZgdwSLjiFzM XPoDsWVp9BhaBMGD_csTNWiwqnCtW6INRRPnOyakff5eC4BK8tXmSKMx7Wm6AGC6ZfS62BvDMtQk c5X76fccEBaTkX1r3uBCbf6ZvE57KcEhlPaPs06fIt6JXAE.oVShoRCLPgUm7EmLFuTOKL7fHb.k 41nhDTIxTtmAck4Lq3LiTrAD7zSsXkuEUReUCIbLc9krZtL3oT3sypwfF4AnYEJjCqW1jEo7mkR8 vdlYjHZsQAuYho6W.X80wcq6ruhkkhi.3nMSdpiCk1z64O5pHNRuOLnEQVg0IYSx6mTsLsVrHPXd H7gL6h5KgARfJHKbArFtiUB0T1ZReRFDf2yEiugnu6LZxc.C7DVSnEl5HaPK_6osYrA590SwcQDR yKjlicxYfbY85aZAiquAlV78dujO0KCKVSayfohr1Nfthg7vSZtzK1Qh3_JyM6XZzET0R0yHlOSt pQk2rpT7XptVIjuaDICkaSTov5BDIUdzMwZxYL1QazLIrRSjSg1SK..5It4MDFzfmD6KEL388Vnn TDLsVc4zRlqYzTcDoE2NGiwhkhOlCQKRwv1lpVA9SR0Kz721q1TfamSZ0To_zD4G331GPLWPtay4 tFR5lJMmQoFCLUwGFWa.6pZWQAiXT8nw6YY3vf0dsKhgzv0wVAggFhbLXvHqP7MNUD0PJow-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.gq1.yahoo.com with HTTP; Tue, 22 Jan 2019 23:52:36 +0000 Received: from c-67-170-167-181.hsd1.or.comcast.net (EHLO [192.168.1.102]) ([67.170.167.181]) by smtp410.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID d4d2ca8ae27cd7cb1d4f0028e6d48fc1; Tue, 22 Jan 2019 23:52:34 +0000 (UTC) From: Mark Millard Message-Id: <5AA68ED2-2615-438B-A6AE-406CBD8E49F7@yahoo.com> Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: Re: GDB TLS testing Date: Tue, 22 Jan 2019 15:52:33 -0800 In-Reply-To: Cc: "freebsd-ppc@freebsd.org" To: John Baldwin References: <19343397-859C-4629-A4A5-B0DCDE25957B@yahoo.com> X-Mailer: Apple Mail (2.3445.102.3) X-Rspamd-Queue-Id: 04AC476D83 X-Spamd-Bar: / X-Spamd-Result: default: False [0.28 / 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]; URI_COUNT_ODD(1.00)[5]; 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:+,1:+]; 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.55)[-0.553,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.57)[0.568,0]; NEURAL_HAM_LONG(-0.83)[-0.831,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; IP_SCORE(0.61)[ip: (1.87), ipnet: 98.137.64.0/21(0.69), asn: 36647(0.55), country: US(-0.08)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[148.68.137.98.list.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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 23:52:45 -0000 On 2019-Jan-22, at 15:07, John Baldwin wrote: > On 1/22/19 2:56 PM, Mark Millard wrote: >>=20 >> . . . >>=20 >> So I'm trying: >>=20 >> # env CFLAGS=3D"-g -O2 -I/usr/local/include" ./configure >> . . . >> # rm */config.cache >> # make >=20 > Eh, try gmake instead of make. I'm pretty sure the GDB repository = requires > GNU make. Well, I started over from scratch (empty tree other than .git) and using = gmake got to a use of ATTRIBUTE_UNUSED that failed for lack of such a macro definition: cc -c -g -O2 -I/usr/local/include -DDEFAULT_INLINE=3DPSIM_INLINE_LOCALS = -DWITH_HOST_BYTE_ORDER=3DBIG_ENDIAN -DWITH_SMP=3D5 = -DHAVE_TERMIOS_STRUCTURE -DHAVE_DEVZERO -I. -I. -I./../../include = -I../../bfd -I./../../bfd -I../../gdb -I./../../gdb = -I./../../gdb/config -DHAVE_COMMON_FPU -I../common -I./../common = hw_htab.c In file included from hw_htab.c:27: /usr/local/include/bfd.h:1665:38: error: expected ')' bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, ^ /usr/local/include/bfd.h:1665:26: note: to match this '(' bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, ^ /usr/local/include/bfd.h:1668:3: error: use of undeclared identifier = 'ptr' ptr->userdata =3D val; ^ /usr/local/include/bfd.h:1668:19: error: use of undeclared identifier = 'val' ptr->userdata =3D val; ^ /usr/local/include/bfd.h:1673:33: error: expected ')' bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, = bfd_vma val) ^ /usr/local/include/bfd.h:1673:21: note: to match this '(' bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, = bfd_vma val) ^ /usr/local/include/bfd.h:1675:3: error: use of undeclared identifier = 'ptr' ptr->vma =3D ptr->lma =3D val; ^ /usr/local/include/bfd.h:1675:14: error: use of undeclared identifier = 'ptr' ptr->vma =3D ptr->lma =3D val; ^ /usr/local/include/bfd.h:1675:25: error: use of undeclared identifier = 'val' ptr->vma =3D ptr->lma =3D val; ^ /usr/local/include/bfd.h:1676:3: error: use of undeclared identifier = 'ptr' ptr->user_set_vma =3D TRUE; ^ /usr/local/include/bfd.h:1681:39: error: expected ')' bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, ^ /usr/local/include/bfd.h:1681:27: note: to match this '(' bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, ^ /usr/local/include/bfd.h:1684:3: error: use of undeclared identifier = 'ptr' ptr->alignment_power =3D val; ^ /usr/local/include/bfd.h:1684:26: error: use of undeclared identifier = 'val' ptr->alignment_power =3D val; ^ /usr/local/include/bfd.h:6764:3: error: type name requires a specifier = or qualifier ENUM_BITFIELD (bfd_format) format : 3; ^ /usr/local/include/bfd.h:6764:29: error: expected ';' at end of = declaration list ENUM_BITFIELD (bfd_format) format : 3; ^ ; /usr/local/include/bfd.h:6767:3: error: type name requires a specifier = or qualifier ENUM_BITFIELD (bfd_direction) direction : 2; ^ /usr/local/include/bfd.h:6767:18: error: a parameter list without types = is only allowed in a function definition ENUM_BITFIELD (bfd_direction) direction : 2; ^ /usr/local/include/bfd.h:6767:3: error: duplicate member 'ENUM_BITFIELD' ENUM_BITFIELD (bfd_direction) direction : 2; ^ /usr/local/include/bfd.h:6764:3: note: previous declaration is here ENUM_BITFIELD (bfd_format) format : 3; ^ /usr/local/include/bfd.h:6767:32: error: expected ';' at end of = declaration list ENUM_BITFIELD (bfd_direction) direction : 2; ^ ; /usr/local/include/bfd.h:6909:3: error: type name requires a specifier = or qualifier ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; ^ /usr/local/include/bfd.h:6909:18: error: a parameter list without types = is only allowed in a function definition ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=3D] 20 errors generated. gmake[3]: *** [Makefile:158: hw_htab.o] Error 1 gmake[3]: Leaving directory '/root/c_tests/ppc64_tls_git/sim/ppc' gmake[2]: *** [Makefile:129: all] Error 1 gmake[2]: Leaving directory '/root/c_tests/ppc64_tls_git/sim' gmake[1]: *** [Makefile:9532: all-sim] Error 2 gmake[1]: Leaving directory '/root/c_tests/ppc64_tls_git' gmake: *** [Makefile:849: all] Error 2 (Again: cc here is system clang.) = =20 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-ppc@freebsd.org Wed Jan 23 00:28:53 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 49E7314B4B25 for ; Wed, 23 Jan 2019 00:28:53 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic308-4.consmr.mail.bf2.yahoo.com (sonic308-4.consmr.mail.bf2.yahoo.com [74.6.130.43]) (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 3CEDD810BA for ; Wed, 23 Jan 2019 00:28:52 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: TB4455IVM1mGv81mwYbnDu2ptuLxSRs9pA8WI9D2Zr83qpGwrumg44iER2Jucl4 B68K_3GB0fxC8ahWLq7mZkG5WIb5ZQvQpW_ztizvsH2jdb4Mkm8dsg7VqIJ.FZY9O2vWvc7pfilv RbQAoU957a2Kvz6jL.C3HVFsE.i9nIX2dvlfkgFeSgMiAq2oE_vsY6EUSvX5h7BAYXCbZnoq_w2V sThqewZrgAYimp5W4ic3gNlh9hiGU0Z3piM0WguaBOnzsCmbSczd5EbIw91hBFKegLqtNxtIQUt. l0DUGGbh1XqEh4xvt4j2bNMvNHLDV2h9RTU7nTkQqONnbw3YehbxAL.SDriCm7.ndSeJf3lwRm7v npJOIPWaGE96RMnWji_SZ1QpPxejNofX8qQGIQJ3DlEU7plcA9bo_B9YWKVwdbyRbk7biGQZM2gN tIrhWTL27Z9AG_UdzlO9ju.PPwJ.yx94EQ_DS04gF9ebc1j.Hhg5.HVFlL7DoDToCl9m44xuJqMu VX_GP8JA44Ehd_Fkek17SJhhJBUHGFT.WGeqHJU9fvo2ELSMyQk5Q_CIJnSzR7H1SYyn2UYpxVkQ 1nU_yXe1bx76XDAwy6a47KGXM5MuXN1sow0h_PfB5.v3EvPKhaUAt.zyc84Bo4gI2P9piCC_puEh q093vequ9l3x4jljFk.toKfK1IsP1yzlA_I0Wz6RjEVXiv2xZDZMf0J00rCnkm.VDsmp.in5gIMv _awjviRAFXF6CpBDC6zCUxLzr4ay2ufXeSM9K.IjdT1LZyC4yQ38Jt60XcPHF.HQWZcdntx1nQJI 2pdaiUWnG.5IjahwQfvm7SSWR9Hw7qrDenb3_5nEy9UJkVyGoWd.izrIEEqZRqQVJ3cOW4xEHySo ARXDW0lRFnoteFp0dcaEVUSZKZVOuFAvRwjiqBGJ49kkoQjO1UMDVTP0WOPvCL.61a8VwabnbYeS ldGkdRJf.psfBzrcRbV8pS8jnK3yPI7uDCxvNbOzYYEQZsDKAo6JLUbKtl6XbLAXSMxWs48NBVFB ri79M6wI82QHypykaRe6LpKMy62j7MfymzF0yjipNCmfo770XXiJ3GXAgUHseNDxt137gCxPj Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.bf2.yahoo.com with HTTP; Wed, 23 Jan 2019 00:28:50 +0000 Received: from c-67-170-167-181.hsd1.or.comcast.net (EHLO [192.168.1.102]) ([67.170.167.181]) by smtp418.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID f13a5897fb8e25d8ad1c7f93d5972c5d; Wed, 23 Jan 2019 00:28:47 +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: <5AA68ED2-2615-438B-A6AE-406CBD8E49F7@yahoo.com> Date: Tue, 22 Jan 2019 16:28:45 -0800 Cc: "freebsd-ppc@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <20027C29-0093-4001-A135-23783F8B87F3@yahoo.com> References: <19343397-859C-4629-A4A5-B0DCDE25957B@yahoo.com> <5AA68ED2-2615-438B-A6AE-406CBD8E49F7@yahoo.com> To: John Baldwin X-Mailer: Apple Mail (2.3445.102.3) X-Rspamd-Queue-Id: 3CEDD810BA X-Spamd-Bar: + X-Spamd-Result: default: False [1.53 / 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]; DKIM_TRACE(0.00)[yahoo.com:+]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; 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.84)[0.836,0]; NEURAL_HAM_LONG(-0.03)[-0.031,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(1.20)[ip: (3.45), ipnet: 74.6.128.0/21(1.45), asn: 26101(1.16), country: US(-0.08)]; NEURAL_SPAM_MEDIUM(0.04)[0.037,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[43.130.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: Wed, 23 Jan 2019 00:28:53 -0000 On 2019-Jan-22, at 15:52, Mark Millard wrote: > On 2019-Jan-22, at 15:07, John Baldwin wrote: >=20 >> On 1/22/19 2:56 PM, Mark Millard wrote: >>>=20 >>> . . . >>>=20 >>> So I'm trying: >>>=20 >>> # env CFLAGS=3D"-g -O2 -I/usr/local/include" ./configure >>> . . . >>> # rm */config.cache >>> # make >>=20 >> Eh, try gmake instead of make. I'm pretty sure the GDB repository = requires >> GNU make. >=20 > Well, I started over from scratch (empty tree other than .git) and = using gmake > got to a use of ATTRIBUTE_UNUSED that failed for lack of such a macro > definition: Bad wording of my thought: I was not trying to say that it was certain = that there was no definition. It was more like the usage/content being = appropriate to also being supported by clang. > cc -c -g -O2 -I/usr/local/include -DDEFAULT_INLINE=3DPSIM_INLINE_LOCALS = -DWITH_HOST_BYTE_ORDER=3DBIG_ENDIAN -DWITH_SMP=3D5 = -DHAVE_TERMIOS_STRUCTURE -DHAVE_DEVZERO -I. -I. -I./../../include = -I../../bfd -I./../../bfd -I../../gdb -I./../../gdb = -I./../../gdb/config -DHAVE_COMMON_FPU -I../common -I./../common = hw_htab.c > In file included from hw_htab.c:27: > /usr/local/include/bfd.h:1665:38: error: expected ')' > bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, > ^ > /usr/local/include/bfd.h:1665:26: note: to match this '(' > bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, > ^ > /usr/local/include/bfd.h:1668:3: error: use of undeclared identifier = 'ptr' > ptr->userdata =3D val; > ^ > /usr/local/include/bfd.h:1668:19: error: use of undeclared identifier = 'val' > ptr->userdata =3D val; > ^ > /usr/local/include/bfd.h:1673:33: error: expected ')' > bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, = bfd_vma val) > ^ > /usr/local/include/bfd.h:1673:21: note: to match this '(' > bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, = bfd_vma val) > ^ > /usr/local/include/bfd.h:1675:3: error: use of undeclared identifier = 'ptr' > ptr->vma =3D ptr->lma =3D val; > ^ > /usr/local/include/bfd.h:1675:14: error: use of undeclared identifier = 'ptr' > ptr->vma =3D ptr->lma =3D val; > ^ > /usr/local/include/bfd.h:1675:25: error: use of undeclared identifier = 'val' > ptr->vma =3D ptr->lma =3D val; > ^ > /usr/local/include/bfd.h:1676:3: error: use of undeclared identifier = 'ptr' > ptr->user_set_vma =3D TRUE; > ^ > /usr/local/include/bfd.h:1681:39: error: expected ')' > bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * = ptr, > ^ > /usr/local/include/bfd.h:1681:27: note: to match this '(' > bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * = ptr, > ^ > /usr/local/include/bfd.h:1684:3: error: use of undeclared identifier = 'ptr' > ptr->alignment_power =3D val; > ^ > /usr/local/include/bfd.h:1684:26: error: use of undeclared identifier = 'val' > ptr->alignment_power =3D val; > ^ > /usr/local/include/bfd.h:6764:3: error: type name requires a specifier = or qualifier > ENUM_BITFIELD (bfd_format) format : 3; > ^ > /usr/local/include/bfd.h:6764:29: error: expected ';' at end of = declaration list > ENUM_BITFIELD (bfd_format) format : 3; > ^ > ; > /usr/local/include/bfd.h:6767:3: error: type name requires a specifier = or qualifier > ENUM_BITFIELD (bfd_direction) direction : 2; > ^ > /usr/local/include/bfd.h:6767:18: error: a parameter list without = types is only allowed in a function definition > ENUM_BITFIELD (bfd_direction) direction : 2; > ^ > /usr/local/include/bfd.h:6767:3: error: duplicate member = 'ENUM_BITFIELD' > ENUM_BITFIELD (bfd_direction) direction : 2; > ^ > /usr/local/include/bfd.h:6764:3: note: previous declaration is here > ENUM_BITFIELD (bfd_format) format : 3; > ^ > /usr/local/include/bfd.h:6767:32: error: expected ';' at end of = declaration list > ENUM_BITFIELD (bfd_direction) direction : 2; > ^ > ; > /usr/local/include/bfd.h:6909:3: error: type name requires a specifier = or qualifier > ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; > ^ > /usr/local/include/bfd.h:6909:18: error: a parameter list without = types is only allowed in a function definition > ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; > ^ > fatal error: too many errors emitted, stopping now [-ferror-limit=3D] > 20 errors generated. > gmake[3]: *** [Makefile:158: hw_htab.o] Error 1 > gmake[3]: Leaving directory '/root/c_tests/ppc64_tls_git/sim/ppc' > gmake[2]: *** [Makefile:129: all] Error 1 > gmake[2]: Leaving directory '/root/c_tests/ppc64_tls_git/sim' > gmake[1]: *** [Makefile:9532: all-sim] Error 2 > gmake[1]: Leaving directory '/root/c_tests/ppc64_tls_git' > gmake: *** [Makefile:849: all] Error 2 >=20 >=20 >=20 > (Again: cc here is system clang.) = =20 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-ppc@freebsd.org Wed Jan 23 01:06: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 8577114B5B2D for ; Wed, 23 Jan 2019 01:06:48 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic302-20.consmr.mail.gq1.yahoo.com (sonic302-20.consmr.mail.gq1.yahoo.com [98.137.68.146]) (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 F1D6A827D5 for ; Wed, 23 Jan 2019 01:06:46 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: v0GKzU8VM1k0XZMzJ7MqtT2re5I6Yf6a3152KeTUzgVu.Xj080b1FSVXdeZmft9 thYWAv80S7YoX9QuByORZdcP0kc6JA_Pe62t_q89EYPlfWTMah5kpgR8WfkXOVV.IJcPZWw9SCye rxH4m9lkEsey9iMm8gZZLgxVxiZyu_mCvraGp57NYo8huVg7ctvNcqnrk9NpORlmhlxQq1Jx1dY3 sUvF9Zx.hgJJjCE_xl8dm0BZpm4bjCXFCj55lrlHTspPDm5a_fkaO_pdu_dwxbmCDtAy9R9CL6NE Yep3GC5J1DkoBv2F6fYnklUwfOvVed0dPW7qtXIan9gQsXk0mScZXFx3WT2IBpZvIRjCU1EMQuf_ h.kzVMFmjF9C0d8KaRW6ZiA9g5liwsOjoEkt3N_6YZlqbLR.HMTBz.6eOXv3eQ6hXSXEDV44__Qw MZqT4VHFuh10LM15_fhsbQ3oJ0GGTVsVh0PCt7TqA99PJujbFk_QSw8Fcrw6l3_VVu2pZyVqRv91 agjIipAuXwunZvv3J9x10vU2ix7IUZo1hApnnE1tCvanUGxgYenb0VgYqfGKV4d7vlHRbd8YYS25 7lm3_5SC2RgjcSEbq5BF00eKmNPGF4RKcaFTylJYilkdF8jTZAVdPsRcHEQmjWAwz_HGY3fV16.9 UZC.ZlQdampNfRGMyqKMhJTNZH_nUIPuocG.aDkZ_5Ej_VmG6Pfw7TUX5hjvPtJRN1z2wfh7lQCP XIO9dCvSTMDzHlxld93ULBSTYyqf89yk27Hm_KYwLJrnYgbVWVCk952.kgPIQpAFWNBRaJBAd_6p CG9EFYjgWrcQ3fN8dWq8Oh5B4zJc.Q1.jPeGvwRILQ.gYS_d1ANu4xVs7Aj0lWhpHf4km1zdnCA9 hAyjCWrW0E4sFL1H0l06SjHiq4txLcL3jCdT73TBLuxqi_ZeXn6ABlIbVUG..IXjCtgD4POKsdu6 6K4_wRpEL9Ecgj0U.F.KnZ..ZyP.cDSzJDw4tMl0v9vq4stEeJ265ptKdTwOZNdftPsZI_FVfF2o fttr30NyKq5gDnGSDayQjScJ0Yn5hnkvtOhlvjGkCxGLyqU3JEVhizmu12kYmYtlwpDQ5GQ-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.gq1.yahoo.com with HTTP; Wed, 23 Jan 2019 01:06:39 +0000 Received: from c-67-170-167-181.hsd1.or.comcast.net (EHLO [192.168.1.102]) ([67.170.167.181]) by smtp413.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID b8675d4716330c1bd795959674f54d4f; Wed, 23 Jan 2019 01:06:38 +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: <20027C29-0093-4001-A135-23783F8B87F3@yahoo.com> Date: Tue, 22 Jan 2019 17:06:37 -0800 Cc: "freebsd-ppc@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <4048D2A4-7E14-481C-9B5D-00567BCF4463@yahoo.com> References: <19343397-859C-4629-A4A5-B0DCDE25957B@yahoo.com> <5AA68ED2-2615-438B-A6AE-406CBD8E49F7@yahoo.com> <20027C29-0093-4001-A135-23783F8B87F3@yahoo.com> To: John Baldwin X-Mailer: Apple Mail (2.3445.102.3) X-Rspamd-Queue-Id: F1D6A827D5 X-Spamd-Bar: - X-Spamd-Result: default: False [-1.65 / 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]; DKIM_TRACE(0.00)[yahoo.com:+]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; 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.86)[-0.863,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.22)[0.223,0]; NEURAL_HAM_LONG(-0.98)[-0.981,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.48)[ip: (1.24), ipnet: 98.137.64.0/21(0.69), asn: 36647(0.55), country: US(-0.08)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[146.68.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: Wed, 23 Jan 2019 01:06:48 -0000 On 2019-Jan-22, at 16:28, Mark Millard wrote: > On 2019-Jan-22, at 15:52, Mark Millard wrote: >=20 >=20 >=20 >> On 2019-Jan-22, at 15:07, John Baldwin wrote: >>=20 >>> On 1/22/19 2:56 PM, Mark Millard wrote: >>>>=20 >>>> . . . >>>>=20 >>>> So I'm trying: >>>>=20 >>>> # env CFLAGS=3D"-g -O2 -I/usr/local/include" ./configure >>>> . . . >>>> # rm */config.cache >>>> # make >>>=20 >>> Eh, try gmake instead of make. I'm pretty sure the GDB repository = requires >>> GNU make. >>=20 >> Well, I started over from scratch (empty tree other than .git) and = using gmake >> got to a use of ATTRIBUTE_UNUSED that failed for lack of such a macro >> definition: >=20 > Bad wording of my thought: I was not trying to say that it was certain = that > there was no definition. It was more like the usage/content being = appropriate > to also being supported by clang. >=20 >> cc -c -g -O2 -I/usr/local/include -DDEFAULT_INLINE=3DPSIM_INLINE_LOCALS= -DWITH_HOST_BYTE_ORDER=3DBIG_ENDIAN -DWITH_SMP=3D5 = -DHAVE_TERMIOS_STRUCTURE -DHAVE_DEVZERO -I. -I. -I./../../include = -I../../bfd -I./../../bfd -I../../gdb -I./../../gdb = -I./../../gdb/config -DHAVE_COMMON_FPU -I../common -I./../common = hw_htab.c >> In file included from hw_htab.c:27: >> /usr/local/include/bfd.h:1665:38: error: expected ')' >> bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * = ptr, >> ^ Actually: the wrong bfd.h because -I/usr/local/include is too early and overrides the local -I usage and binutils is installed: # find / -name bfd.h -print | less /usr/local/include/bfd.h /usr/src/gnu/usr.bin/binutils/libbfd/bfd.h /root/c_tests/ppc64_tls_git/bfd/bfd.h # pkg which /usr/local/include/bfd.h /usr/local/include/bfd.h was installed by package binutils-2.30_6,1 The 2 files do not seem to be equivalent. >> /usr/local/include/bfd.h:1665:26: note: to match this '(' >> bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * = ptr, >> ^ >> /usr/local/include/bfd.h:1668:3: error: use of undeclared identifier = 'ptr' >> ptr->userdata =3D val; >> ^ >> /usr/local/include/bfd.h:1668:19: error: use of undeclared identifier = 'val' >> ptr->userdata =3D val; >> ^ >> /usr/local/include/bfd.h:1673:33: error: expected ')' >> bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, = bfd_vma val) >> ^ >> /usr/local/include/bfd.h:1673:21: note: to match this '(' >> bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, = bfd_vma val) >> ^ >> /usr/local/include/bfd.h:1675:3: error: use of undeclared identifier = 'ptr' >> ptr->vma =3D ptr->lma =3D val; >> ^ >> /usr/local/include/bfd.h:1675:14: error: use of undeclared identifier = 'ptr' >> ptr->vma =3D ptr->lma =3D val; >> ^ >> /usr/local/include/bfd.h:1675:25: error: use of undeclared identifier = 'val' >> ptr->vma =3D ptr->lma =3D val; >> ^ >> /usr/local/include/bfd.h:1676:3: error: use of undeclared identifier = 'ptr' >> ptr->user_set_vma =3D TRUE; >> ^ >> /usr/local/include/bfd.h:1681:39: error: expected ')' >> bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * = ptr, >> ^ >> /usr/local/include/bfd.h:1681:27: note: to match this '(' >> bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * = ptr, >> ^ >> /usr/local/include/bfd.h:1684:3: error: use of undeclared identifier = 'ptr' >> ptr->alignment_power =3D val; >> ^ >> /usr/local/include/bfd.h:1684:26: error: use of undeclared identifier = 'val' >> ptr->alignment_power =3D val; >> ^ >> /usr/local/include/bfd.h:6764:3: error: type name requires a = specifier or qualifier >> ENUM_BITFIELD (bfd_format) format : 3; >> ^ >> /usr/local/include/bfd.h:6764:29: error: expected ';' at end of = declaration list >> ENUM_BITFIELD (bfd_format) format : 3; >> ^ >> ; >> /usr/local/include/bfd.h:6767:3: error: type name requires a = specifier or qualifier >> ENUM_BITFIELD (bfd_direction) direction : 2; >> ^ >> /usr/local/include/bfd.h:6767:18: error: a parameter list without = types is only allowed in a function definition >> ENUM_BITFIELD (bfd_direction) direction : 2; >> ^ >> /usr/local/include/bfd.h:6767:3: error: duplicate member = 'ENUM_BITFIELD' >> ENUM_BITFIELD (bfd_direction) direction : 2; >> ^ >> /usr/local/include/bfd.h:6764:3: note: previous declaration is here >> ENUM_BITFIELD (bfd_format) format : 3; >> ^ >> /usr/local/include/bfd.h:6767:32: error: expected ';' at end of = declaration list >> ENUM_BITFIELD (bfd_direction) direction : 2; >> ^ >> ; >> /usr/local/include/bfd.h:6909:3: error: type name requires a = specifier or qualifier >> ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; >> ^ >> /usr/local/include/bfd.h:6909:18: error: a parameter list without = types is only allowed in a function definition >> ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; >> ^ >> fatal error: too many errors emitted, stopping now [-ferror-limit=3D] >> 20 errors generated. >> gmake[3]: *** [Makefile:158: hw_htab.o] Error 1 >> gmake[3]: Leaving directory '/root/c_tests/ppc64_tls_git/sim/ppc' >> gmake[2]: *** [Makefile:129: all] Error 1 >> gmake[2]: Leaving directory '/root/c_tests/ppc64_tls_git/sim' >> gmake[1]: *** [Makefile:9532: all-sim] Error 2 >> gmake[1]: Leaving directory '/root/c_tests/ppc64_tls_git' >> gmake: *** [Makefile:849: all] Error 2 >>=20 >>=20 >>=20 >> (Again: cc here is system clang.) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-ppc@freebsd.org Wed Jan 23 01:55:28 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 A77AA14B68BC for ; Wed, 23 Jan 2019 01:55:28 +0000 (UTC) (envelope-from al@datazap.net) Received: from agnus.datazap.net (agnus.datazap.net [209.160.43.98]) by mx1.freebsd.org (Postfix) with ESMTP id 24BA183DAE for ; Wed, 23 Jan 2019 01:55:26 +0000 (UTC) (envelope-from al@datazap.net) Received: from [127.0.0.1] (localhost [127.0.0.1]) by agnus.datazap.net (Postfix) with ESMTP id 308ABB7955 for ; Tue, 22 Jan 2019 20:55:16 -0500 (EST) To: "freebsd-ppc@freebsd.org" From: Al Subject: Problems booting from CD Message-ID: Date: Wed, 23 Jan 2019 02:55:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux ppc64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 24BA183DAE X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [4.10 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.98)[0.981,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ppc@freebsd.org]; DMARC_NA(0.00)[datazap.net]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_SPAM_MEDIUM(0.99)[0.992,0]; IP_SCORE(0.34)[ipnet: 209.160.32.0/20(1.18), asn: 14361(0.61), country: US(-0.08)]; RCVD_IN_DNSWL_MED(-0.20)[98.43.160.209.list.dnswl.org : 127.0.5.2]; MX_GOOD(-0.01)[agnus.datazap.net]; NEURAL_SPAM_LONG(0.99)[0.994,0]; TO_DN_EQ_ADDR_ALL(0.00)[]; R_SPF_NA(0.00)[]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:14361, ipnet:209.160.32.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] 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: Wed, 23 Jan 2019 01:55:28 -0000 Hello, Installing FreeBSD 12 on a G3 Blue & White. First, I pulled out the faster ATA controller and the 2 networks cards and then disconnected the hard drive. Tried to boot from the CD. It will boot and then crash when it is looking at it's network port. No kernel panic, no debugger. If I hit enter instead of waiting for the delay loading the kernel, then it will give me several errors about the file system being read only. It seems to mount it, but then reboots. I can't completely read what is on the screen because it happens so fast. I thought maybe it was the CD, so I have burnt several CDs, but it doesn't seem to make any difference. It has an RDB keyboard. I thought maybe that might be the problem, but it is the same with it unplugged, it always gives the same results. I also tried to do an install on a PowerBook G3 with a G4 upgrade. This computer has a DVD drive and it will boot OSX 10.4 and Linux from a DVD. Still it crashes during boot up too using the FreeBSD install CD. It crashes at a different place than the Blue & White, but always in the same place. I am not sure if I included enough information. I can include the exact line when the boot stopped if needed. Also, would someone have a dmesg from a successful boot with a G3 from a CD they would be willing to share? I searched for a solution, but it seems no one else is having this same issue. Does anyone have any ideas? Kind Regards, Al From owner-freebsd-ppc@freebsd.org Wed Jan 23 02:32:23 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 2098F14B77C6 for ; Wed, 23 Jan 2019 02:32:23 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic314-22.consmr.mail.ne1.yahoo.com (sonic314-22.consmr.mail.ne1.yahoo.com [66.163.189.148]) (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 3231D8511A for ; Wed, 23 Jan 2019 02:32:22 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: dqikWTsVM1kxByHb5M4ly1lcnMExhusX0tAFDrjxlcjmagyte.jD0m.Me8mkdSy PWtn5CKKvhJ.z7RhhBpX.teaRJg0dp9k364260Dstgl0VV61x2HBYOCrO.qwv9FasIrvN9jCn47u BaPz_Mz7zJGTbAzhzYnt_UMxHvGZKJl4gcgyhJefCBMxWfMlAru7Z73CYDLExBnqYmr1sVlMu1VS lVchFBNLjgRYB1kgqKxC5Jxvs2.yLZX9frQVQo1alZbINhyNTKcKQJEGkzQklJ19_9Kv7CWSsWQt qW4swadYaG1b82cZImKc7HCpn0h4ztSPx7o1zWay7Atis5ZpQ0Cc58DCcZFgH4LO3v4j8nRS40.y zc8StASkT4wdi1XNBfUoJzddWtoXzglyGZJhRwd88dEZh3pW5PYgYrcac75hQK02OkW00_dWm5Y7 2lCEpJQVL4eQbM1DnN0CC7McS08NnjuUzVwKCu6bPAG_xap2Fs1I_Lvn9XtVgZKc7FtEZWky01s1 gVo15Z9J7RRhvlJQeOw_yFORkoe8kZC.LBSIwNpWwnDsqRTp9dUhRK7JALBaCIliLBfhhsLT06p7 zJrZArxZyOy7Zng6sY6Ic8p3l7Mm_DFQ1utN7NebhJy5PGQDn9x6P4tZ_nHIj3XuMhN_yX00AtzN YAOb7hNy8GGLYMFijbE2OtNL_JPbQKHU58RwzXRRwOKVpJUwMI1.jKKPrJ04o5OcLfvUeEgWHF__ oqPg3kYq9ynShhmuxeqxDupNpGA1S4xvzwkfsin3narwwtlMOa9Ya4EaCrm5ZtNYWvoPOfIXLfuC HEkTcfR0T.8t1c78Qnxy59plc3x_j_0EWRr29d2TXFnBHc.kAsbJJOom79wYKlibYH7II689_35I 8qHkE3dcBg31TeETAiwBx8x03uDeA5gFHqL4Cwyor9LCH5hjqSHV0jkO8RePQe0IVe6KhpqA5lNX Wkat1dBVevPlRO7p3_4TdT81kAHbT04xm5SgVrIk6CMpoo6CWufd1C6xUfnjAsuWlOcr7RrW7NrJ IRLjbTboZACVaO8nfqI9T_2.GUigZ4yXFQc1.EJg0Df_9gahXWgNq8vj4OLFBOhJ3h5k8 Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ne1.yahoo.com with HTTP; Wed, 23 Jan 2019 02:32:15 +0000 Received: from c-67-170-167-181.hsd1.or.comcast.net (EHLO [192.168.1.102]) ([67.170.167.181]) by smtp403.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 024e1f3df822dc454b0aec0e77d175df; Wed, 23 Jan 2019 02:32:10 +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: <4048D2A4-7E14-481C-9B5D-00567BCF4463@yahoo.com> Date: Tue, 22 Jan 2019 18:32:08 -0800 Cc: "freebsd-ppc@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <2AAC9738-73BD-475A-888A-252EE853A5C6@yahoo.com> References: <19343397-859C-4629-A4A5-B0DCDE25957B@yahoo.com> <5AA68ED2-2615-438B-A6AE-406CBD8E49F7@yahoo.com> <20027C29-0093-4001-A135-23783F8B87F3@yahoo.com> <4048D2A4-7E14-481C-9B5D-00567BCF4463@yahoo.com> To: John Baldwin X-Mailer: Apple Mail (2.3445.102.3) X-Rspamd-Queue-Id: 3231D8511A X-Spamd-Bar: ++ X-Spamd-Result: default: False [2.74 / 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]; DKIM_TRACE(0.00)[yahoo.com:+]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; 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:36646, ipnet:66.163.184.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.99)[0.988,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(1.54)[ip: (5.80), ipnet: 66.163.184.0/21(1.10), asn: 36646(0.88), country: US(-0.08)]; NEURAL_SPAM_MEDIUM(0.31)[0.305,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.42)[0.419,0]; RCVD_IN_DNSWL_NONE(0.00)[148.189.163.66.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: Wed, 23 Jan 2019 02:32:23 -0000 On 2019-Jan-22, at 17:06, Mark Millard wrote: > On 2019-Jan-22, at 16:28, Mark Millard wrote: >=20 >=20 >=20 >> On 2019-Jan-22, at 15:52, Mark Millard wrote: >>=20 >>=20 >>=20 >>> On 2019-Jan-22, at 15:07, John Baldwin wrote: >>>=20 >>>> On 1/22/19 2:56 PM, Mark Millard wrote: >>>>>=20 >>>>> . . . >>>>>=20 >>>>> So I'm trying: >>>>>=20 >>>>> # env CFLAGS=3D"-g -O2 -I/usr/local/include" ./configure >>>>> . . . >>>>> # rm */config.cache >>>>> # make >>>>=20 >>>> Eh, try gmake instead of make. I'm pretty sure the GDB repository = requires >>>> GNU make. >>>=20 >>> Well, I started over from scratch (empty tree other than .git) and = using gmake >>> got to a use of ATTRIBUTE_UNUSED that failed for lack of such a = macro >>> definition: >>=20 >> Bad wording of my thought: I was not trying to say that it was = certain that >> there was no definition. It was more like the usage/content being = appropriate >> to also being supported by clang. >>=20 >>> cc -c -g -O2 -I/usr/local/include = -DDEFAULT_INLINE=3DPSIM_INLINE_LOCALS -DWITH_HOST_BYTE_ORDER=3DBIG_ENDIAN= -DWITH_SMP=3D5 -DHAVE_TERMIOS_STRUCTURE -DHAVE_DEVZERO -I. = -I. -I./../../include -I../../bfd -I./../../bfd -I../../gdb = -I./../../gdb -I./../../gdb/config -DHAVE_COMMON_FPU -I../common = -I./../common hw_htab.c >>> In file included from hw_htab.c:27: >>> /usr/local/include/bfd.h:1665:38: error: expected ')' >>> bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * = ptr, >>> ^ >=20 > Actually: the wrong bfd.h because -I/usr/local/include is too early > and overrides the local -I usage and binutils is installed: >=20 > # find / -name bfd.h -print | less > /usr/local/include/bfd.h > /usr/src/gnu/usr.bin/binutils/libbfd/bfd.h > /root/c_tests/ppc64_tls_git/bfd/bfd.h >=20 > # pkg which /usr/local/include/bfd.h > /usr/local/include/bfd.h was installed by package binutils-2.30_6,1 >=20 > The 2 files do not seem to be equivalent. >=20 >=20 >>> . . . >>> 20 errors generated. >>> gmake[3]: *** [Makefile:158: hw_htab.o] Error 1 >>> gmake[3]: Leaving directory '/root/c_tests/ppc64_tls_git/sim/ppc' >>> gmake[2]: *** [Makefile:129: all] Error 1 >>> gmake[2]: Leaving directory '/root/c_tests/ppc64_tls_git/sim' >>> gmake[1]: *** [Makefile:9532: all-sim] Error 2 >>> gmake[1]: Leaving directory '/root/c_tests/ppc64_tls_git' >>> gmake: *** [Makefile:849: all] Error 2 >>>=20 >>>=20 >>>=20 >>> (Again: cc here is system clang.) So I'm trying: # git clean -f # rm */config.cache */*/config.cache # env CPATH=3D/usr/local/include ./configure . . . # env CPATH=3D/usr/local/include gmake . . . in order to try to add paths after the command line -I paths. . . . This looks like it built. I've not used the build yet. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-ppc@freebsd.org Wed Jan 23 03:20:02 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 614A214B8E85 for ; Wed, 23 Jan 2019 03:20:02 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic306-21.consmr.mail.gq1.yahoo.com (sonic306-21.consmr.mail.gq1.yahoo.com [98.137.68.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 37FF38767D for ; Wed, 23 Jan 2019 03:20:01 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: jKqgsdkVM1lAHnRmSprULodtxzrMoXq2fPK235mZ7Kla1vNr.yU5T7VPg3V9Jtd bnuo7MS9..PH_0Uxtf2eM4XM0KKfC2N0Z91z74ofJ47yGaUqJ66rGUBA573SNollv3n9kZi2caln B_ODOnydFtXp_o9ZnUGPAgiDAvt44s_6m14.RPbxJVFG3iYkLV0y5vO03G_XoI5XhJPB7bKHRUXq DNk75dXUe9zlrGR5WBu9CCE6MvXmibqKd.EL0MkpLtvj4RiO0Pq3wcSqGz5TUryBi4nAMsw2OhIU 5pl1Y8vqK933safG0kG.boAk4tN3pqZp52C1AisxWkEulYPcm7Sla7GPueUOpNbrXsPQ0tJEnODe qf5RXZ_b2I79Fwo1iKHFYyKNAyP1be4hBUoTpMI6YHGtu04XhtSOQwE5lro8gEV_OTyiU85bzt9_ 2FUb0rYBdZhISu3LTCsJDxSV8cqcqELcD80EnmbLV03VQr1jxNE3OxOi.p2Vg8y6E.2u_9ojYVxx kDtcXJoX0nmN5GEUd1dpWjBX8V7iT.Ho6eUCTPVVXBJrNWYjJg4.IVFFpbRt6ht9nZvZVEkDYhyk FdkMQaa.8ADN.RG2uMc2IB_1aBWihK.jXBx1sbouOSpIybDOJPsr9pzypm7c2oOobpGibI4Omo48 Pa13YVhERX7YjqEP6nP5XOMvHXK0doMoflrdIeuNm5dX8k9UsRYYCtKZdenRJs0EFEW3C1ij68uv pffkCyM79MxomV.5NfFVIHCixr9qGpj4JaQhXK2CtOxevZMOS4.f8hivEgpdKRISpMCx4MhEXVtB Gc.9bVOFs7nsrY1N7iqTjH2jwODP8dWTq7PIIYyCQAAxR2OcIlFqtEpsQTVAXAejLCjZW3BE3qos UrtY4PgvYQSl1C7pfIuTh4peZrOnI912CjKUauNAULJ8lwTYx.ihxL5lJiQf0p9HjS9KcD5qirZM kgbxUNmNKI6k.xWFBV2wDjrLrylY1Yu1ps9Sk.IaC_C_ZGBsm.44rao.hIGrWtpJBJ8sVl0RmrPQ OcnPiMDAJMl0mj.XHgqg3PfgGtTyz4_SnQlcMKgfb6TS3sm4GoOysRZzF.lEAolJ6cZ_C Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.gq1.yahoo.com with HTTP; Wed, 23 Jan 2019 03:19:54 +0000 Received: from c-67-170-167-181.hsd1.or.comcast.net (EHLO [192.168.1.102]) ([67.170.167.181]) by smtp420.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID f40e541575bf573a5444b8a7409496a7; Wed, 23 Jan 2019 03:19:52 +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 [actually running some tests finally but these tests fail] From: Mark Millard In-Reply-To: <2AAC9738-73BD-475A-888A-252EE853A5C6@yahoo.com> Date: Tue, 22 Jan 2019 19:19:51 -0800 Cc: "freebsd-ppc@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <493AC0BE-3EC6-42B7-B027-FFB6454761B5@yahoo.com> References: <19343397-859C-4629-A4A5-B0DCDE25957B@yahoo.com> <5AA68ED2-2615-438B-A6AE-406CBD8E49F7@yahoo.com> <20027C29-0093-4001-A135-23783F8B87F3@yahoo.com> <4048D2A4-7E14-481C-9B5D-00567BCF4463@yahoo.com> <2AAC9738-73BD-475A-888A-252EE853A5C6@yahoo.com> To: John Baldwin X-Mailer: Apple Mail (2.3445.102.3) X-Rspamd-Queue-Id: 37FF38767D X-Spamd-Bar: - X-Spamd-Result: default: False [-1.96 / 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]; DKIM_TRACE(0.00)[yahoo.com:+]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; 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.99)[-0.987,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.30)[0.304,0]; NEURAL_HAM_LONG(-1.00)[-0.997,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.23)[ipnet: 98.137.64.0/21(0.69), asn: 36647(0.55), country: US(-0.08)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[84.68.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: Wed, 23 Jan 2019 03:20:02 -0000 On 2019-Jan-22, at 18:32, Mark Millard wrote: > On 2019-Jan-22, at 17:06, Mark Millard wrote: >=20 >=20 >=20 > . . . > So I'm trying: >=20 > # git clean -f > # rm */config.cache */*/config.cache > # env CPATH=3D/usr/local/include ./configure > . . . > # env CPATH=3D/usr/local/include gmake > . . . >=20 > in order to try to add paths after the command line -I paths. >=20 > . . . This looks like it built. I've not used the build yet. >=20 Looking at a *.core did not go well for my context: # cc -g -O2 tls_gdb_test.c=20 tls_gdb_test.c:16:2: warning: indirection of non-volatile null pointer = will be deleted, not trap [-Wnull-dereference] *(char *)NULL =3D 1; ^~~~~~~~~~~~~ tls_gdb_test.c:16:2: note: consider using __builtin_trap() or qualifying = pointer with 'volatile' 1 warning generated. FBSDG5L# ./a.out main: PID 70304 id =3D 70304 (0x810054020) Trace/BPT trap (core dumped) # ppc64_tls_git/gdb/gdb a.out a.out.70304.core=20 GNU gdb (GDB) 8.2.50.20190115-git Copyright (C) 2019 Free Software Foundation, Inc. . . . Reading symbols from a.out... [New LWP 100166] Core was generated by `./a.out'. Program terminated with signal SIGTRAP, Trace/breakpoint trap. #0 main (ac=3D, av=3D) at = tls_gdb_test.c:16 16 *(char *)NULL =3D 1; (gdb) bt #0 main (ac=3D, av=3D) at = tls_gdb_test.c:16 (gdb) p id Cannot find thread-local storage for LWP 100166, executable file = /root/c_tests/a.out: Cannot fetch runtime linker structure offsets (gdb) p &id Cannot find thread-local storage for LWP 100166, executable file = /root/c_tests/a.out: Cannot fetch runtime linker structure offsets (gdb)=20 Trying running under the gdb variant got stuck with gdb looping = indefinately: 70322 root 1 103 0 30M 20M 0 CPU2 2 3:12 = 101.06% ppc64_tls_git/gdb/gdb a.out That was for: # ppc64_tls_git/gdb/gdb a.out GNU gdb (GDB) 8.2.50.20190115-git Copyright (C) 2019 Free Software Foundation, Inc. . . . But I was able to ^C to get back to a (gdb) prompt and: (gdb) p id Cannot find thread-local storage for LWP 100111 of process 70323, = executable file /root/c_tests/a.out: Cannot fetch runtime linker structure offsets (gdb) p &id Cannot find thread-local storage for LWP 100111 of process 70323, = executable file /root/c_tests/a.out: Cannot fetch runtime linker structure offsets (gdb) info threads Id Target Id Frame=20 * 1 LWP 100111 of process 70323 main (ac=3D, = av=3D) at tls_gdb_test.c:16 So it looks to me to not be working with system-clang based compiles of = the example test from the original E-mail. But, looking around and using stepi ( with display/i $pc ) the code is = trying a trap instruction over and over: (gdb) disass Dump of assembler code for function main: 0x0000000010000adc <+0>: mflr r0 0x0000000010000ae0 <+4>: std r31,-8(r1) 0x0000000010000ae4 <+8>: std r0,16(r1) 0x0000000010000ae8 <+12>: stdu r1,-128(r1) 0x0000000010000aec <+16>: mr r31,r1 0x0000000010000af0 <+20>: std r30,112(r31) 0x0000000010000af4 <+24>: bl 0x10000600 = <00000017.plt_call.getpid@@FBSD_1.0> 0x0000000010000af8 <+28>: ld r2,40(r1) 0x0000000010000afc <+32>: mr r4,r3 0x0000000010000b00 <+36>: addis r3,r2,-2 0x0000000010000b04 <+40>: addi r3,r3,31952 0x0000000010000b08 <+44>: bl 0x100005e0 = <00000017.plt_call.printf@@FBSD_1.0> 0x0000000010000b0c <+48>: ld r2,40(r1) 0x0000000010000b10 <+52>: bl 0x10000600 = <00000017.plt_call.getpid@@FBSD_1.0> 0x0000000010000b14 <+56>: ld r2,40(r1) 0x0000000010000b18 <+60>: mr r30,r3 0x0000000010000b1c <+64>: nop 0x0000000010000b20 <+68>: nop 0x0000000010000b24 <+72>: addi r3,r13,4096 0x0000000010000b28 <+76>: nop 0x0000000010000b2c <+80>: addis r3,r3,0 0x0000000010000b30 <+84>: mr r4,r30 0x0000000010000b34 <+88>: stw r30,-32768(r3) 0x0000000010000b38 <+92>: addi r5,r3,-32768 0x0000000010000b3c <+96>: addis r3,r2,-2 0x0000000010000b40 <+100>: addi r3,r3,31966 0x0000000010000b44 <+104>: bl 0x100005e0 = <00000017.plt_call.printf@@FBSD_1.0> 0x0000000010000b48 <+108>: ld r2,40(r1) 0x0000000010000b4c <+112>: nop 0x0000000010000b50 <+116>: nop 0x0000000010000b54 <+120>: ld r3,-32728(r2) 0x0000000010000b58 <+124>: ld r4,-32720(r2) 0x0000000010000b5c <+128>: lwz r3,0(r3) 0x0000000010000b60 <+132>: cmplwi r3,0 0x0000000010000b64 <+136>: ld r3,0(r4) 0x0000000010000b68 <+140>: bne 0x10000b8c 0x0000000010000b6c <+144>: lwz r4,8(r3) 0x0000000010000b70 <+148>: addi r5,r4,-1 0x0000000010000b74 <+152>: cmpwi r4,0 0x0000000010000b78 <+156>: stw r5,8(r3) 0x0000000010000b7c <+160>: bgt 0x10000b98 0x0000000010000b80 <+164>: bl 0x10000620 = <00000017.plt_call.__srget@@FBSD_1.0> 0x0000000010000b84 <+168>: ld r2,40(r1) =3D> 0x0000000010000b88 <+172>: trap 0x0000000010000b8c <+176>: bl 0x10000640 = <00000017.plt_call.getc@@FBSD_1.0> 0x0000000010000b90 <+180>: ld r2,40(r1) 0x0000000010000b94 <+184>: trap 0x0000000010000b98 <+188>: ld r4,0(r3) 0x0000000010000b9c <+192>: addi r4,r4,1 0x0000000010000ba0 <+196>: std r4,0(r3) 0x0000000010000ba4 <+200>: trap 0x0000000010000ba8 <+204>: .long 0x0 0x0000000010000bac <+208>: .long 0x0 0x0000000010000bb0 <+212>: .long 0x0 End of assembler dump. I do not know if my context being a head -r341836 variant might = contribute (too old?). I may try some fairly modern gcc* variant(s) instead to see if that = makes a difference. For reference: the compile of the test was based on using -g -O2 . =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-ppc@freebsd.org Wed Jan 23 06:54:01 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 83FD914BD7DD for ; Wed, 23 Jan 2019 06:54:01 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic314-22.consmr.mail.ne1.yahoo.com (sonic314-22.consmr.mail.ne1.yahoo.com [66.163.189.148]) (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 B7A7C8D681 for ; Wed, 23 Jan 2019 06:54:00 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: ZMB6MzcVM1kMbribkCI3IhYNH1P6nAkfEVBH1eriHCcLYLChg.p1Q.Zf3syIS14 XUdtH2KMBkMg7tEe4t89GPAdxRwJj1dtNXRZBh00K4svSpwn1bVWOvA9N1zoaidvvWPWDLwMl220 qv.7sFxMnK_uocaVAFxG7MBIUPZyz8JzwLl7jQOxx7ocr7LbBP8poQ0GrfUotGDl5r4c1.X1hraq NEcExjxI6ZsMVa6G5WhcJn6gIgVWRvy2alVz4LTSYRPLACyVD.SgjwZDv0maQxUM8FZRMNjjHhUU X.8fMPnLPnlla__AqV4gHI_.jRZA.9dF3l1hp8hSS7tiYEuDOEW3rFGQ.ggu2aju7AmaiU9owV76 JwdHSi.7w.Ul5uNywcS0xXVmQTapAF_YXIZCG6Q81BrMTL_cXdalrfJ59PCanJJi228wTNImp8hW JXhXNQK4hdanaZS8iCpyHMCkXy20R.JO2omD6HkkOfuiqZ.dHxE2gjjubqhiHyt7RC_5yMMmnQCh ANAq6gfE3XD2A2jGN7o66S6AhFdF8dl4ih7724aPbkU1TDX_bsnfQs02JtP2wIBF1LcngyuW5d1q 5FgHp5_2oUxhMHxf8RUocKIgT5V.zo7oBdbdkQvU_7vpS3a2KXd0nXXxbeSxtGYbLGr1poC5vs6B qoWsmqfX8Z9HDu.RZieM1Jz_46_WDbyvruonmKE9.bHccHWgvG4XJJ29g3Lhuk7pou4asRjUTcRF 5SLNjvHz5_qMeVoSc7li9Ogwv4DPdXKGJppyQu4X83_0E8mSvw.5GcpBmo8jRWjhXV4Pr1b3YvCX cdR8CGdnSRK_J7MGOlyylbTVPSbY0TyQEgSWrIVW7BWPkGPwW0YIxWZ0xyHueKcx0_Br9J_nWE6C YoOkmKZcACCq9TwSWXLe1cOwp9btfMAJ4CvsD2fr0o60dTXqyEyIirwav5C2anwkLmdMQL4pfdkU fUMwN.CBOZJNPla6n6mt_q8wtUH9iC9hi.g2nbHmj0xmzI3QVEr2rPWcdHwkCEtNuXhx_iJpffY3 uJ3.wP8v1Sk476SkPlk7.BNSpbEsbpzHw8AfAQSznoi0grt_IhWouDYeKzt7.qMGTI28c Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ne1.yahoo.com with HTTP; Wed, 23 Jan 2019 06:53:59 +0000 Received: from c-67-170-167-181.hsd1.or.comcast.net (EHLO [192.168.1.102]) ([67.170.167.181]) by smtp411.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID e4b4293c3d9c8c8b92041dadf6e627bc; Wed, 23 Jan 2019 06:53:57 +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 [actually running some tests finally but these tests fail] From: Mark Millard In-Reply-To: <493AC0BE-3EC6-42B7-B027-FFB6454761B5@yahoo.com> Date: Tue, 22 Jan 2019 22:53:55 -0800 Cc: "freebsd-ppc@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <19343397-859C-4629-A4A5-B0DCDE25957B@yahoo.com> <5AA68ED2-2615-438B-A6AE-406CBD8E49F7@yahoo.com> <20027C29-0093-4001-A135-23783F8B87F3@yahoo.com> <4048D2A4-7E14-481C-9B5D-00567BCF4463@yahoo.com> <2AAC9738-73BD-475A-888A-252EE853A5C6@yahoo.com> <493AC0BE-3EC6-42B7-B027-FFB6454761B5@yahoo.com> To: John Baldwin X-Mailer: Apple Mail (2.3445.102.3) X-Rspamd-Queue-Id: B7A7C8D681 X-Spamd-Bar: + X-Spamd-Result: default: False [1.93 / 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]; DKIM_TRACE(0.00)[yahoo.com:+]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; 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:36646, ipnet:66.163.184.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.23)[-0.228,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.89)[0.892,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(1.48)[ip: (5.49), ipnet: 66.163.184.0/21(1.10), asn: 36646(0.88), country: US(-0.08)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.30)[0.297,0]; RCVD_IN_DNSWL_NONE(0.00)[148.189.163.66.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: Wed, 23 Jan 2019 06:54:01 -0000 On 2019-Jan-22, at 19:19, Mark Millard wrote: > On 2019-Jan-22, at 18:32, Mark Millard wrote: >=20 >=20 >=20 >> On 2019-Jan-22, at 17:06, Mark Millard wrote: >>=20 >>=20 >>=20 >> . . . >> So I'm trying: >>=20 >> # git clean -f >> # rm */config.cache */*/config.cache >> # env CPATH=3D/usr/local/include ./configure >> . . . >> # env CPATH=3D/usr/local/include gmake >> . . . >>=20 >> in order to try to add paths after the command line -I paths. >>=20 >> . . . This looks like it built. I've not used the build yet. >>=20 >=20 > Looking at a *.core did not go well for my context: >=20 > # cc -g -O2 tls_gdb_test.c=20 > tls_gdb_test.c:16:2: warning: indirection of non-volatile null pointer = will be deleted, not trap [-Wnull-dereference] > *(char *)NULL =3D 1; > ^~~~~~~~~~~~~ > tls_gdb_test.c:16:2: note: consider using __builtin_trap() or = qualifying pointer with 'volatile' > 1 warning generated. > FBSDG5L# ./a.out > main: PID 70304 > id =3D 70304 (0x810054020) >=20 > Trace/BPT trap (core dumped) >=20 > # ppc64_tls_git/gdb/gdb a.out a.out.70304.core=20 > GNU gdb (GDB) 8.2.50.20190115-git > Copyright (C) 2019 Free Software Foundation, Inc. > . . . > Reading symbols from a.out... > [New LWP 100166] > Core was generated by `./a.out'. > Program terminated with signal SIGTRAP, Trace/breakpoint trap. > #0 main (ac=3D, av=3D) at = tls_gdb_test.c:16 > 16 *(char *)NULL =3D 1; > (gdb) bt > #0 main (ac=3D, av=3D) at = tls_gdb_test.c:16 > (gdb) p id > Cannot find thread-local storage for LWP 100166, executable file = /root/c_tests/a.out: > Cannot fetch runtime linker structure offsets > (gdb) p &id > Cannot find thread-local storage for LWP 100166, executable file = /root/c_tests/a.out: > Cannot fetch runtime linker structure offsets > (gdb)=20 >=20 >=20 > Trying running under the gdb variant got stuck with gdb looping = indefinately: >=20 > 70322 root 1 103 0 30M 20M 0 CPU2 2 3:12 = 101.06% ppc64_tls_git/gdb/gdb a.out >=20 > That was for: >=20 > # ppc64_tls_git/gdb/gdb a.out > GNU gdb (GDB) 8.2.50.20190115-git > Copyright (C) 2019 Free Software Foundation, Inc. > . . . >=20 > But I was able to ^C to get back to a (gdb) prompt and: >=20 > (gdb) p id > Cannot find thread-local storage for LWP 100111 of process 70323, = executable file /root/c_tests/a.out: > Cannot fetch runtime linker structure offsets > (gdb) p &id > Cannot find thread-local storage for LWP 100111 of process 70323, = executable file /root/c_tests/a.out: > Cannot fetch runtime linker structure offsets > (gdb) info threads > Id Target Id Frame=20 > * 1 LWP 100111 of process 70323 main (ac=3D, = av=3D) at tls_gdb_test.c:16 >=20 > So it looks to me to not be working with system-clang based compiles = of the example > test from the original E-mail. >=20 > But, looking around and using stepi ( with display/i $pc ) the code is = trying a trap instruction > over and over: >=20 > (gdb) disass > Dump of assembler code for function main: > 0x0000000010000adc <+0>: mflr r0 > 0x0000000010000ae0 <+4>: std r31,-8(r1) > 0x0000000010000ae4 <+8>: std r0,16(r1) > 0x0000000010000ae8 <+12>: stdu r1,-128(r1) > 0x0000000010000aec <+16>: mr r31,r1 > 0x0000000010000af0 <+20>: std r30,112(r31) > 0x0000000010000af4 <+24>: bl 0x10000600 = <00000017.plt_call.getpid@@FBSD_1.0> > 0x0000000010000af8 <+28>: ld r2,40(r1) > 0x0000000010000afc <+32>: mr r4,r3 > 0x0000000010000b00 <+36>: addis r3,r2,-2 > 0x0000000010000b04 <+40>: addi r3,r3,31952 > 0x0000000010000b08 <+44>: bl 0x100005e0 = <00000017.plt_call.printf@@FBSD_1.0> > 0x0000000010000b0c <+48>: ld r2,40(r1) > 0x0000000010000b10 <+52>: bl 0x10000600 = <00000017.plt_call.getpid@@FBSD_1.0> > 0x0000000010000b14 <+56>: ld r2,40(r1) > 0x0000000010000b18 <+60>: mr r30,r3 > 0x0000000010000b1c <+64>: nop > 0x0000000010000b20 <+68>: nop > 0x0000000010000b24 <+72>: addi r3,r13,4096 > 0x0000000010000b28 <+76>: nop > 0x0000000010000b2c <+80>: addis r3,r3,0 > 0x0000000010000b30 <+84>: mr r4,r30 > 0x0000000010000b34 <+88>: stw r30,-32768(r3) > 0x0000000010000b38 <+92>: addi r5,r3,-32768 > 0x0000000010000b3c <+96>: addis r3,r2,-2 > 0x0000000010000b40 <+100>: addi r3,r3,31966 > 0x0000000010000b44 <+104>: bl 0x100005e0 = <00000017.plt_call.printf@@FBSD_1.0> > 0x0000000010000b48 <+108>: ld r2,40(r1) > 0x0000000010000b4c <+112>: nop > 0x0000000010000b50 <+116>: nop > 0x0000000010000b54 <+120>: ld r3,-32728(r2) > 0x0000000010000b58 <+124>: ld r4,-32720(r2) > 0x0000000010000b5c <+128>: lwz r3,0(r3) > 0x0000000010000b60 <+132>: cmplwi r3,0 > 0x0000000010000b64 <+136>: ld r3,0(r4) > 0x0000000010000b68 <+140>: bne 0x10000b8c > 0x0000000010000b6c <+144>: lwz r4,8(r3) > 0x0000000010000b70 <+148>: addi r5,r4,-1 > 0x0000000010000b74 <+152>: cmpwi r4,0 > 0x0000000010000b78 <+156>: stw r5,8(r3) > 0x0000000010000b7c <+160>: bgt 0x10000b98 > 0x0000000010000b80 <+164>: bl 0x10000620 = <00000017.plt_call.__srget@@FBSD_1.0> > 0x0000000010000b84 <+168>: ld r2,40(r1) > =3D> 0x0000000010000b88 <+172>: trap > 0x0000000010000b8c <+176>: bl 0x10000640 = <00000017.plt_call.getc@@FBSD_1.0> > 0x0000000010000b90 <+180>: ld r2,40(r1) > 0x0000000010000b94 <+184>: trap > 0x0000000010000b98 <+188>: ld r4,0(r3) > 0x0000000010000b9c <+192>: addi r4,r4,1 > 0x0000000010000ba0 <+196>: std r4,0(r3) > 0x0000000010000ba4 <+200>: trap > 0x0000000010000ba8 <+204>: .long 0x0 > 0x0000000010000bac <+208>: .long 0x0 > 0x0000000010000bb0 <+212>: .long 0x0 > End of assembler dump. >=20 >=20 > I do not know if my context being a head -r341836 variant might = contribute > (too old?). >=20 > I may try some fairly modern gcc* variant(s) instead to see if that = makes a difference. >=20 > For reference: the compile of the test was based on using -g -O2 . So far all tried-combinations of using gcc versions for build the test program and/or building the gdb used do not work for "p id" and "p &id" in doing the test. clang is not essential to the behavior observed. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-ppc@freebsd.org Wed Jan 23 08:20:03 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 558D114BEF30 for ; Wed, 23 Jan 2019 08:20:03 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic303-20.consmr.mail.ne1.yahoo.com (sonic303-20.consmr.mail.ne1.yahoo.com [66.163.188.146]) (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 18E1C8FA31 for ; Wed, 23 Jan 2019 08:20:01 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: 0oAsk.YVM1kL2VHkBGfaYwIuJ5elAmDu9N3d7RZEECLSBXpZO32FdrEMWmcy.ff kW9LQO.uzrT4zymSNyJzuMirIQ3jLOhQ30ZIOZXs0lmfouRFrlQ.IUY6rjnxu.JbKu5jc_mk.1l. gpowm82bSseNWcJxnfPkgvRnLSdTTef6acH.Q6wS4CBD54cAEODTQi1iwF9TlBMVU11Nf64T70DG aiOQvhDvOqckbJCSBsLnrXGRm.wIgBJ.Xcpgxlx_OZMtP4KFxwYE6ekkCmpGmyr4DcUWNa2Wx.ZE XxKu2TseredyO1HDF2dbTuzRrtdaDXtX6E4PZDD2fj8v_oG0jdxOSY2rtg8jh4pZoKHUOIRRl0e5 2vQ2Xy6zVnPc9gzM7YhRN1lTZ5FlEsAX_gqAva8Jsk5NytAwMU8_BwbMVQJgfDAIkRfXiKxlgWjc VYh_zX0NMf9o7JIDRcUB2GNtWYrRefjBkiq0_cQVQpXYy7opWJ2SquWinO5PX.D.8ian6HHDIWka NUi6BUtPxHtfJfUsvyU3bhSqS27S1TD9owwl6yZEBRXkiMeuHK7e942_RijyACu4g36M9_30oGZB t4XgDQJ9wl7ROowCMyHQbEuTk5tqb.fGhS3tKn4qT62YTsFzBq8ymWlQPtud8IKCDiAwy5bO8z9e Zu4uRJGiYA28CG73uHPVoz.i73c3JC52Vl2VbyzllwzGXAHhnXwjCCqHeJH.gohorrj1zOTurGBZ hgY_PkZdaY66pDd.AnHqh5NSR7LYPuYposwHThS7RQp4CY5IyZQn9X1Qc8qowf8aGwRGtQJ3vTUa 4fkm7VFOl45X0fT4ib41BHtxFG33FXuhQXcf_BO8L3i0Jl1kCK9A8XRrTER_WkyoTZ2TOcTAREk0 HkTzNidMqy7YvlwUSfgqqJTYTDIatS2nxNYEp2UBiPJk658b1VFysuMir3rWxK45qD12nlVL0drX YHimTW1dVIbIv_bYvZCmpQrdu5HPA0bmZXHumPJhheJH8arbgWTE1vLg8QUk3rm.GWiEsgzlgkIW syUYs13qU204VvtZSHbuWPAUZ4SCNspystaEKWmzBKLHevt1nv45IFibmvSzWw5axAjgbQ_05SA- - Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ne1.yahoo.com with HTTP; Wed, 23 Jan 2019 08:20:00 +0000 Received: from c-67-170-167-181.hsd1.or.comcast.net (EHLO [192.168.1.102]) ([67.170.167.181]) by smtp412.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID d45fffbcf0d9307c41e1a28bceaeb5d6; Wed, 23 Jan 2019 08:19:56 +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 [actually running some tests finally: a success with -pthread used] From: Mark Millard In-Reply-To: Date: Wed, 23 Jan 2019 00:19:54 -0800 Cc: "freebsd-ppc@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <52E66D9B-C332-4565-B8E7-F54F6454B062@yahoo.com> References: <19343397-859C-4629-A4A5-B0DCDE25957B@yahoo.com> <5AA68ED2-2615-438B-A6AE-406CBD8E49F7@yahoo.com> <20027C29-0093-4001-A135-23783F8B87F3@yahoo.com> <4048D2A4-7E14-481C-9B5D-00567BCF4463@yahoo.com> <2AAC9738-73BD-475A-888A-252EE853A5C6@yahoo.com> <493AC0BE-3EC6-42B7-B027-FFB6454761B5@yahoo.com> To: John Baldwin X-Mailer: Apple Mail (2.3445.102.3) X-Rspamd-Queue-Id: 18E1C8FA31 X-Spamd-Bar: / X-Spamd-Result: default: False [-0.80 / 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]; DKIM_TRACE(0.00)[yahoo.com:+]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; 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:36646, ipnet:66.163.184.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.79)[-0.792,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.38)[0.376,0]; NEURAL_HAM_LONG(-0.71)[-0.715,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.84)[ip: (2.30), ipnet: 66.163.184.0/21(1.10), asn: 36646(0.88), country: US(-0.08)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[146.188.163.66.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: Wed, 23 Jan 2019 08:20:03 -0000 On 2019-Jan-22, at 22:53, Mark Millard wrote: > On 2019-Jan-22, at 19:19, Mark Millard wrote: >=20 >=20 >=20 >> On 2019-Jan-22, at 18:32, Mark Millard wrote: >>=20 >>=20 >>=20 >>> On 2019-Jan-22, at 17:06, Mark Millard wrote: >>>=20 >>>=20 >>>=20 >>> . . . >>> So I'm trying: >>>=20 >>> # git clean -f >>> # rm */config.cache */*/config.cache >>> # env CPATH=3D/usr/local/include ./configure >>> . . . >>> # env CPATH=3D/usr/local/include gmake >>> . . . >>>=20 >>> in order to try to add paths after the command line -I paths. >>>=20 >>> . . . This looks like it built. I've not used the build yet. >>>=20 >>=20 >> Looking at a *.core did not go well for my context: >>=20 >> # cc -g -O2 tls_gdb_test.c=20 >> tls_gdb_test.c:16:2: warning: indirection of non-volatile null = pointer will be deleted, not trap [-Wnull-dereference] >> *(char *)NULL =3D 1; >> ^~~~~~~~~~~~~ >> tls_gdb_test.c:16:2: note: consider using __builtin_trap() or = qualifying pointer with 'volatile' >> 1 warning generated. >> . . . >=20 >=20 > So far all tried-combinations of using gcc versions for build > the test program and/or building the gdb used do not work for > "p id" and "p &id" in doing the test. clang is not essential > to the behavior observed. Using "-g -O2 -pthread" to build the test program via system clang or gcc8 (for example) did lead to the likes of: (gdb) run=20 Starting program: /root/c_tests/a.out=20 main: PID 15350 id =3D 15350 (0x810055020) ^C Program received signal SIGINT, Interrupt. main (ac=3D, av=3D) at tls_gdb_test.c:16 16 *(char *)NULL =3D 1; (gdb) bt #0 main (ac=3D, av=3D) at = tls_gdb_test.c:16 (gdb) info threads Id Target Id Frame=20 * 1 LWP 100324 of process 15350 main (ac=3D, = av=3D) at tls_gdb_test.c:16 (gdb) p id $1 =3D 15350 (gdb) p &id $2 =3D (int *) 0x810055020 So it appears one branch of: static void fbsd_fetch_rtld_offsets (struct gdbarch *gdbarch, struct = fbsd_pspace_data *data) { TRY { /* Fetch offsets from debug symbols in rtld. */ data->off_linkmap =3D parse_and_eval_long ("&((Obj_Entry = *)0)->linkmap"); data->off_tlsindex =3D parse_and_eval_long ("&((Obj_Entry = *)0)->tlsindex"); data->rtld_offsets_valid =3D true; return; } CATCH (e, RETURN_MASK_ERROR) { data->off_linkmap =3D -1; } END_CATCH TRY { /* Fetch offsets from global variables in libthr. Note that this does not work for single-threaded processes that are not linked against libthr. */ data->off_linkmap =3D fbsd_read_integer_by_name(gdbarch, = "_thread_off_linkmap"); data->off_tlsindex =3D fbsd_read_integer_by_name(gdbarch, = "_thread_off_tlsindex"); data->rtld_offsets_valid =3D true; return; } CATCH (e, RETURN_MASK_ERROR) { data->off_linkmap =3D -1; } END_CATCH } is working when -pthread is used. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-ppc@freebsd.org Wed Jan 23 10:49:37 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 05B4714C220E for ; Wed, 23 Jan 2019 10:49:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A19B66D8DC for ; Wed, 23 Jan 2019 10:49:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by freefall.freebsd.org (Postfix) id 943D93CDA; Wed, 23 Jan 2019 10:49:36 +0000 (UTC) Delivered-To: powerpc@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id 8FB433CD9 for ; Wed, 23 Jan 2019 10:49:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5669F6D8D9 for ; Wed, 23 Jan 2019 10:49:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 97A0A10E1 for ; Wed, 23 Jan 2019 10:49:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x0NAnZ7T043789 for ; Wed, 23 Jan 2019 10:49:35 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x0NAnZEf043788 for powerpc@FreeBSD.org; Wed, 23 Jan 2019 10:49:35 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: powerpc@FreeBSD.org Subject: [Bug 233850] lang/php73: DTRACE option on PowerPC causes ld(1) link probe failures; Relocations in generic ELF Date: Wed, 23 Jan 2019 10:49:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: tz@freebsd.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Rspamd-Queue-Id: A19B66D8DC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.994,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,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: Wed, 23 Jan 2019 10:49:37 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D233850 --- Comment #3 from commit-hook@freebsd.org --- A commit references this bug: Author: tz Date: Wed Jan 23 10:48:58 UTC 2019 New revision: 491031 URL: https://svnweb.freebsd.org/changeset/ports/491031 Log: lang/php73: disable DTRACE option on PowerPC DTRACE causes ld(1) link probe failures and therefore fails the build. PR: 233850 Submitted by: Chip Cuccio MFH: 2019Q1 Changes: head/lang/php73/Makefile --=20 You are receiving this mail because: You are on the CC list for the bug.= From owner-freebsd-ppc@freebsd.org Wed Jan 23 10:49:59 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 104A514C2232 for ; Wed, 23 Jan 2019 10:49:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB45C6D907 for ; Wed, 23 Jan 2019 10:49:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by freefall.freebsd.org (Postfix) id 621163CF5; Wed, 23 Jan 2019 10:49:58 +0000 (UTC) Delivered-To: powerpc@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id 5DF593CF4 for ; Wed, 23 Jan 2019 10:49:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1D2526D904 for ; Wed, 23 Jan 2019 10:49:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 64EB210E5 for ; Wed, 23 Jan 2019 10:49:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x0NAnvVZ044141 for ; Wed, 23 Jan 2019 10:49:57 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x0NAnvHZ044140 for powerpc@FreeBSD.org; Wed, 23 Jan 2019 10:49:57 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: powerpc@FreeBSD.org Subject: [Bug 233850] lang/php73: DTRACE option on PowerPC causes ld(1) link probe failures; Relocations in generic ELF Date: Wed, 23 Jan 2019 10:49:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: tz@freebsd.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: tz@freebsd.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Rspamd-Queue-Id: AB45C6D907 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.994,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,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: Wed, 23 Jan 2019 10:49:59 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D233850 --- Comment #4 from Torsten Zuehlsdorff --- Thank you Chip, the build log was what i asked for. I see the problem and the patch looks fine. Its committed now. :) --=20 You are receiving this mail because: You are on the CC list for the bug.= From owner-freebsd-ppc@freebsd.org Wed Jan 23 10:50:19 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 3803E14C226D for ; Wed, 23 Jan 2019 10:50:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AFE286D95C for ; Wed, 23 Jan 2019 10:50:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by freefall.freebsd.org (Postfix) id 73FD93D18; Wed, 23 Jan 2019 10:50:18 +0000 (UTC) Delivered-To: powerpc@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id 6FBB53D17 for ; Wed, 23 Jan 2019 10:50:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 29E0C6D959 for ; Wed, 23 Jan 2019 10:50:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 5367310EC for ; Wed, 23 Jan 2019 10:50:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x0NAoHte044607 for ; Wed, 23 Jan 2019 10:50:17 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x0NAoHYi044606 for powerpc@FreeBSD.org; Wed, 23 Jan 2019 10:50:17 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: powerpc@FreeBSD.org Subject: [Bug 233850] lang/php73: DTRACE option on PowerPC causes ld(1) link probe failures; Relocations in generic ELF Date: Wed, 23 Jan 2019 10:50:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: tz@freebsd.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: tz@freebsd.org X-Bugzilla-Flags: maintainer-feedback+ X-Bugzilla-Changed-Fields: flagtypes.name Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Rspamd-Queue-Id: AFE286D95C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.994,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,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: Wed, 23 Jan 2019 10:50:19 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D233850 Torsten Zuehlsdorff changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|maintainer-feedback?(tz@fre |maintainer-feedback+ |ebsd.org) | --=20 You are receiving this mail because: You are on the CC list for the bug.= From owner-freebsd-ppc@freebsd.org Wed Jan 23 11:21:34 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 A7C3F14C2F3A for ; Wed, 23 Jan 2019 11:21:34 +0000 (UTC) (envelope-from albert@fsfe.org) Received: from meitnerium.buergernetzwerk.at (meitnerium.buergernetzwerk.at [IPv6:2a02:1b8:10:92::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FBBD6E99C for ; Wed, 23 Jan 2019 11:21:33 +0000 (UTC) (envelope-from albert@fsfe.org) Received: from loki.dengg.name (2a02-8388-0302-4080-5ca6-a9b2-f25c-e73c.cable.dynamic.v6.surfer.at [IPv6:2a02:8388:302:4080:5ca6:a9b2:f25c:e73c]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by meitnerium.buergernetzwerk.at (Postfix) with ESMTPSA id F0A261FE67 for ; Wed, 23 Jan 2019 12:21:30 +0100 (CET) Date: Wed, 23 Jan 2019 12:21:29 +0100 From: Albert Dengg To: freebsd-ppc@freebsd.org Subject: Re: FreeBSD on the Talos II; OpenPOWER in general Message-ID: <20190123112129.GA15424@loki.dengg.name> References: <63b1530f-bd2d-99b8-8aed-69cc753c75b8@freebsd.org> <3d857baf-eb4f-5da3-082c-1a2b84cc11b7@fastmail.jp> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WIyZ46R2i8wDzkSu" Content-Disposition: inline In-Reply-To: <3d857baf-eb4f-5da3-082c-1a2b84cc11b7@fastmail.jp> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 6FBBD6E99C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.62 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-0.97)[-0.971,0]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.997,0]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ppc@freebsd.org]; TO_DN_NONE(0.00)[]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[fsfe.org]; NEURAL_SPAM_SHORT(0.56)[0.558,0]; MX_GOOD(-0.01)[mail1.fsfe.org]; R_SPF_NA(0.00)[]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] 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: Wed, 23 Jan 2019 11:21:34 -0000 --WIyZ46R2i8wDzkSu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 22, 2019 at 09:54:47AM +0000, Uni Gaia wrote: =2E.. >=20 > Very cool. So people are actually using it as a desktop today? i'm testing it for server work only sofar. i'm not 100% shure, but there is quite some chance that you run into endianess issues (freebsd runs as big endian, most linux distros run in little endian on POWER, which has the advantage that since x86/amd64 are also little that desktop software is better tested in that mode. i hope to be able to continue more testing as soon as some other stuff is sorted out. regards, albert --WIyZ46R2i8wDzkSu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEruqE5W88aeruzKNUxGW+tDwRszcFAlxITjYACgkQxGW+tDwR szep/xAAnW1A6X7WiVEczIoZX3sFwv+5dTHBvTU2FNAEL2XGpCPtLgEIpEXtaLyp mWNlrnWYuS1ajdf6E77upDeOwd4G89DIiBARHk1a623v1wguSZ4orI3OQKNkkHdI GwQi8keS3X2OMEOgna5Msv7MfzLURt9biAmC7aw34iU7f42NDn+8/UNjMt/lOKN1 zB6EDQEKPKnaaHTKzcwPUPtNz5c9daTjx2GVH1k98kaAtEzXatTcYdHYoEfjlcv8 r9/HY8KUUEkjKb2yAUkBOGshY0Z9Zmxf8SYsvU5BF++D9jtdt1upxn2Py3P76Bqo yNO8eyBnzGr3oghWiM6d63cXGI5cilexAyj97RZ8QfnCsO3nGyQV3Ly15zQNRs6D xRbg1Pm/6ee5PqSgEcqjefjPZgNegkcmJlMMiPaFN3DBSh7/ND3iFTWo9mLSICFI 98rPULX6ehcW2vZf4G0gIzOa51qtNdoDhntbTSZdJQarOf6LZuaS0xXYQac+q2Xu vgm9sIaFfaycRPk10J5AzuCcUmtQUSzYyb/VrU46CsPBcfCJw3e8Vd6zZZHXqKxF MJGeemMzHprBz2/pyc3BYdwpt+oTdf5jnOHGuzp9QiRjsJmN2RXDy1jRW0ZlVoxs FUGIVk9uSGZ7C7TqddoXWdTfbnJYr8bD6oY9WBZu+3SpVvnrndw= =2b4s -----END PGP SIGNATURE----- --WIyZ46R2i8wDzkSu-- From owner-freebsd-ppc@freebsd.org Wed Jan 23 15:09:03 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 012D614AADC4 for ; Wed, 23 Jan 2019 15:09:03 +0000 (UTC) (envelope-from al@datazap.net) Received: from agnus.datazap.net (agnus.datazap.net [209.160.43.98]) by mx1.freebsd.org (Postfix) with ESMTP id 063A976BAF for ; Wed, 23 Jan 2019 15:09:01 +0000 (UTC) (envelope-from al@datazap.net) Received: from [127.0.0.1] (localhost [127.0.0.1]) by agnus.datazap.net (Postfix) with ESMTP id D86D5B7955 for ; Wed, 23 Jan 2019 10:08:56 -0500 (EST) Subject: Migration from NetBSD (was Re: Problems booting from CD) From: Al To: "freebsd-ppc@freebsd.org" References: Message-ID: <11f861c2-66d0-47e7-24c2-a55b53694572@datazap.net> Date: Wed, 23 Jan 2019 16:08:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux ppc64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 063A976BAF X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [4.06 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.97)[0.966,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ppc@freebsd.org]; DMARC_NA(0.00)[datazap.net]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_SPAM_MEDIUM(0.99)[0.989,0]; IP_SCORE(0.33)[ipnet: 209.160.32.0/20(1.11), asn: 14361(0.60), country: US(-0.08)]; RCVD_IN_DNSWL_MED(-0.20)[98.43.160.209.list.dnswl.org : 127.0.5.2]; MX_GOOD(-0.01)[cached: agnus.datazap.net]; NEURAL_SPAM_LONG(0.99)[0.993,0]; TO_DN_EQ_ADDR_ALL(0.00)[]; R_SPF_NA(0.00)[]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:14361, ipnet:209.160.32.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] 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: Wed, 23 Jan 2019 15:09:03 -0000 On 23/01/19 02:55, Al wrote: > Hello, > > Installing FreeBSD 12 on a G3 Blue & White. First, I pulled out the > faster ATA controller and the 2 networks cards and then disconnected > the hard drive. Tried to boot from the CD. It will boot and then crash > when it is looking at it's network port. No kernel panic, no debugger. > If I hit enter instead of waiting for the delay loading the kernel, > then it will give me several errors about the file system being read > only. It seems to mount it, but then reboots. I can't completely read > what is on the screen because it happens so fast. I thought maybe it > was the CD, so I have burnt several CDs, but it doesn't seem to make > any difference. It has an RDB keyboard. I thought maybe that might be > the problem, but it is the same with it unplugged, it always gives the > same results. > > I also tried to do an install on a PowerBook G3 with a G4 upgrade. > This computer has a DVD drive and it will boot OSX 10.4 and Linux from > a DVD. Still it crashes during boot up too using the FreeBSD install > CD. It crashes at a different place than the Blue & White, but always > in the same place. > > I am not sure if I included enough information. I can include the > exact line when the boot stopped if needed. Also, would someone have a > dmesg from a successful boot with a G3 from a CD they would be willing > to share? > > I searched for a solution, but it seems no one else is having this > same issue. Does anyone have any ideas? I am trying to migrate from NetBSD to FreeBSD. I have since tried to install FreeBSD on every available PowerPC system I have. Since searching didn't yield anything, so I looked at some old threads in the FreeBSD PPC mailing list. I have to wonder if I can do an install from a CD on older Macs. It sounds like I need to do an install from another medium (like a hard drive) after reading through the mailing list. Also, my goal in getting the G3 running FreeBSD is 2 fold. First, it would be nice to upgrade the OS, next I want to be able to build the kernel/userland for my X5000. I have tried to build it in a virtual machine, but I get stuck at the last step in compiling uboot from NetBSD (I knew I couldn't get away from NetBSD that easy). I did have one other thought. A G3 or G4 can not boot from USB. Also, I can not create a FreeBSD filesystem from another OS. Of course with an image the install could be done with any OS. What if I took the thumbdrive image and install it onto a hard drive. Would FreeBSD know where to find its userland? I guess it is worth a try. Kind Regards, Al From owner-freebsd-ppc@freebsd.org Wed Jan 23 15:26:32 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 CCD9614AB25C for ; Wed, 23 Jan 2019 15:26:32 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6967B7747C; Wed, 23 Jan 2019 15:26:32 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 4F9997496; Wed, 23 Jan 2019 15:26:32 +0000 (UTC) Date: Wed, 23 Jan 2019 15:26:32 +0000 From: Alexey Dokuchaev To: Al Cc: "freebsd-ppc@freebsd.org" Subject: Re: Migration from NetBSD (was Re: Problems booting from CD) Message-ID: <20190123152632.GA19736@FreeBSD.org> References: <11f861c2-66d0-47e7-24c2-a55b53694572@datazap.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <11f861c2-66d0-47e7-24c2-a55b53694572@datazap.net> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 6967B7747C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.993,0]; NEURAL_HAM_SHORT(-0.95)[-0.947,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] 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: Wed, 23 Jan 2019 15:26:33 -0000 On Wed, Jan 23, 2019 at 04:08:55PM +0100, Al wrote: > I am trying to migrate from NetBSD to FreeBSD. That's good to hear! :-) > I have to wonder if I can do an install from a CD on older Macs. It > sounds like I need to do an install from another medium (like a hard > drive) after reading through the mailing list. I've always preferred network install than fiddling with some media, as described here: https://people.freebsd.org/~grehan/install.html ./danfe From owner-freebsd-ppc@freebsd.org Wed Jan 23 17:03:52 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 26AF714AD369 for ; Wed, 23 Jan 2019 17:03:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C14EA824FC; Wed, 23 Jan 2019 17:03:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 5764C154E2; Wed, 23 Jan 2019 17:03:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: GDB TLS testing [actually running some tests finally: a success with -pthread used] To: Mark Millard Cc: "freebsd-ppc@freebsd.org" References: <19343397-859C-4629-A4A5-B0DCDE25957B@yahoo.com> <5AA68ED2-2615-438B-A6AE-406CBD8E49F7@yahoo.com> <20027C29-0093-4001-A135-23783F8B87F3@yahoo.com> <4048D2A4-7E14-481C-9B5D-00567BCF4463@yahoo.com> <2AAC9738-73BD-475A-888A-252EE853A5C6@yahoo.com> <493AC0BE-3EC6-42B7-B027-FFB6454761B5@yahoo.com> <52E66D9B-C332-4565-B8E7-F54F6454B062@yahoo.com> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Wed, 23 Jan 2019 09:02:44 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <52E66D9B-C332-4565-B8E7-F54F6454B062@yahoo.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C14EA824FC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.99)[-0.990,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,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: Wed, 23 Jan 2019 17:03:52 -0000 On 1/23/19 12:19 AM, Mark Millard wrote: > > > On 2019-Jan-22, at 22:53, Mark Millard wrote: > > > >> On 2019-Jan-22, at 19:19, Mark Millard wrote: >> >> >> >>> On 2019-Jan-22, at 18:32, Mark Millard wrote: >>> >>> >>> >>>> On 2019-Jan-22, at 17:06, Mark Millard wrote: >>>> >>>> >>>> >>>> . . . >>>> So I'm trying: >>>> >>>> # git clean -f >>>> # rm */config.cache */*/config.cache >>>> # env CPATH=/usr/local/include ./configure >>>> . . . >>>> # env CPATH=/usr/local/include gmake >>>> . . . >>>> >>>> in order to try to add paths after the command line -I paths. >>>> >>>> . . . This looks like it built. I've not used the build yet. >>>> >>> >>> Looking at a *.core did not go well for my context: >>> >>> # cc -g -O2 tls_gdb_test.c >>> tls_gdb_test.c:16:2: warning: indirection of non-volatile null pointer will be deleted, not trap [-Wnull-dereference] >>> *(char *)NULL = 1; >>> ^~~~~~~~~~~~~ >>> tls_gdb_test.c:16:2: note: consider using __builtin_trap() or qualifying pointer with 'volatile' >>> 1 warning generated. For me, builtin_trap didn't DTRT on ppc before, but that was probably using gcc rather than clang (and possibly using gcc4.2). >>> . . . >> >> >> So far all tried-combinations of using gcc versions for build >> the test program and/or building the gdb used do not work for >> "p id" and "p &id" in doing the test. clang is not essential >> to the behavior observed. > > Using "-g -O2 -pthread" to build the test program via system > clang or gcc8 (for example) did lead to the likes of: > > (gdb) run > Starting program: /root/c_tests/a.out > main: PID 15350 > id = 15350 (0x810055020) > > ^C > Program received signal SIGINT, Interrupt. > main (ac=, av=) at tls_gdb_test.c:16 > 16 *(char *)NULL = 1; > (gdb) bt > #0 main (ac=, av=) at tls_gdb_test.c:16 > (gdb) info threads > Id Target Id Frame > * 1 LWP 100324 of process 15350 main (ac=, av=) at tls_gdb_test.c:16 > (gdb) p id > $1 = 15350 > (gdb) p &id > $2 = (int *) 0x810055020 > > So it appears one branch of: > > static void > fbsd_fetch_rtld_offsets (struct gdbarch *gdbarch, struct fbsd_pspace_data *data) > { > TRY > { > /* Fetch offsets from debug symbols in rtld. */ > data->off_linkmap = parse_and_eval_long ("&((Obj_Entry *)0)->linkmap"); > data->off_tlsindex = parse_and_eval_long ("&((Obj_Entry *)0)->tlsindex"); > data->rtld_offsets_valid = true; > return; > } > CATCH (e, RETURN_MASK_ERROR) > { > data->off_linkmap = -1; > } > END_CATCH > > TRY > { > /* Fetch offsets from global variables in libthr. Note that > this does not work for single-threaded processes that are not > linked against libthr. */ > data->off_linkmap = fbsd_read_integer_by_name(gdbarch, > "_thread_off_linkmap"); > data->off_tlsindex = fbsd_read_integer_by_name(gdbarch, > "_thread_off_tlsindex"); > data->rtld_offsets_valid = true; > return; > } > CATCH (e, RETURN_MASK_ERROR) > { > data->off_linkmap = -1; > } > END_CATCH > } > > is working when -pthread is used. Yes. The second one only works for programs linked against -lthr. Otherwise you need to have built your system with debug symbols (which is the default), and gdb needs to be able to access /usr/lib/debug/libexec/ld-elf.so.1.debug to determine the offsets of the two fields in Obj_Entry (this is what the first TRY clause does). -- John Baldwin                                                                              From owner-freebsd-ppc@freebsd.org Wed Jan 23 18:00:05 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 B876214AE759 for ; Wed, 23 Jan 2019 18:00:05 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic304-22.consmr.mail.gq1.yahoo.com (sonic304-22.consmr.mail.gq1.yahoo.com [98.137.68.203]) (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 C583A84A10 for ; Wed, 23 Jan 2019 18:00:03 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: Ph2ARQ8VM1lKZ0TSBPv.wCN6IqlvZSbKocZJxN81VVAVUTihduwlbsn5KgssikB tWxjjqRyH6P56v2gKjO9X8CU_0bIRFs99b33eedQN4V2CAlfURmMfadZSyi9kKFpIsMzqWVcngpo sL7ukAfXlD6XgJfAGdpKOGTxFFHdFGE9xVdTli7srxhXfyjMaV5zoV3k0IptjQnTNbUQFy.H8U9h RIVv5dOj.OoBAnU997NFlqDjVu_rdPfF6ES2vVoR8uI6Bhv2.DDlyzZ2ktpb3nDUUEJ8NANfTVj3 Lv7rzZa0wqbcApm.SfpWkuzyuCx0I.hTD9uvrtGRFnGTApNaF9knqxlhi3vTRYRBTqixdKZmnP_m REG7wJkp3ei3i2vHcVNZweRkqszA.qjE2VTYSH4S518QG8whVeUQiJTGX6E7yzY8JNvnJhoaCGjI vRZaF9D4.0WmAZeYQvKNKrZK3jzrMAtmSMRBIzKVI8K9QLug444g.n9DD5e5hb_O4sgsRBu7hBE1 1KbngElxOGY4dgxzEMNLxViiIPDxb1OapOxBS1kejWDDEYwmznLD1PuXlOyVXGseeAiHFwg9mXWl GOArCSgpVzaMpDE5B0uWG0W3eCfudG0s1WMEAS1QEZL8g7WrNOuy3QssQqLFpyTey_LB6QsyHXPq _TfoFOUKRzcTyznfPP0l41bJ0HicyT451vAmzzPLSK3o2YsoXRPJpUnl3elYGd9hMoVD73.MmMqA IF0K2jqPpjGYVVPrqa1iexYRZ5FZ8aTIgyRpHXlWWi_3qR8QJGzn.dy00Eu3njxduEKaNG3sLDNK qODhfEsUtBgmZqKFfXHRqD09Y2DRlyKANq5.CzYR775XJsAramrtGKwowykDfufSHGGLaLwDGKhA ebAIAgZKVMT_2PoVUbXhTyQw46tjLxunK0as8ceFpa5FncYLHfhSlcoVBW.qvTJ_bdzXLZ6ZGLV8 jf68IKaURmAm0QqmzwwIH1E2aKs9_nffIYPXVMbUYTq9dC1OkhKYXYgmK14b6P_QlfrpNa96VyCP 3pmcoSQ2V4LHDev0G5UOGMVAfuowYCRUJU8DFS6jI.tDKlmWrEmwYCRGx33pfDUh3LbHzbuI- Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.gq1.yahoo.com with HTTP; Wed, 23 Jan 2019 18:00:01 +0000 Received: from c-67-170-167-181.hsd1.or.comcast.net (EHLO [192.168.1.102]) ([67.170.167.181]) by smtp407.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 5b8b6c28b59d949b003a0ac1f05324a1; Wed, 23 Jan 2019 17:59:57 +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 [actually running some tests finally: a success with -pthread used] From: Mark Millard In-Reply-To: Date: Wed, 23 Jan 2019 09:59:57 -0800 Cc: "freebsd-ppc@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <19343397-859C-4629-A4A5-B0DCDE25957B@yahoo.com> <5AA68ED2-2615-438B-A6AE-406CBD8E49F7@yahoo.com> <20027C29-0093-4001-A135-23783F8B87F3@yahoo.com> <4048D2A4-7E14-481C-9B5D-00567BCF4463@yahoo.com> <2AAC9738-73BD-475A-888A-252EE853A5C6@yahoo.com> <493AC0BE-3EC6-42B7-B027-FFB6454761B5@yahoo.com> <52E66D9B-C332-4565-B8E7-F54F6454B062@yahoo.com> To: John Baldwin X-Mailer: Apple Mail (2.3445.102.3) X-Rspamd-Queue-Id: C583A84A10 X-Spamd-Bar: / X-Spamd-Result: default: False [-0.31 / 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]; NEURAL_HAM_SHORT(-0.03)[-0.028,0]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; 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.55)[-0.552,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.27)[-0.267,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(1.05)[ip: (4.09), ipnet: 98.137.64.0/21(0.69), asn: 36647(0.55), country: US(-0.08)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[203.68.137.98.list.dnswl.org : 127.0.5.0]; RWL_MAILSPIKE_POSSIBLE(0.00)[203.68.137.98.rep.mailspike.net : 127.0.0.17] 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: Wed, 23 Jan 2019 18:00:06 -0000 On 2019-Jan-23, at 09:02, John Baldwin wrote: > On 1/23/19 12:19 AM, Mark Millard wrote: >>=20 >>=20 >> On 2019-Jan-22, at 22:53, Mark Millard wrote: >>=20 >>=20 >>=20 >>> On 2019-Jan-22, at 19:19, Mark Millard wrote: >>>=20 >>>=20 >>>=20 >>>> On 2019-Jan-22, at 18:32, Mark Millard wrote: >>>>=20 >>>>=20 >>>>=20 >>>>> On 2019-Jan-22, at 17:06, Mark Millard = wrote: >>>>>=20 >>>>>=20 >>>>>=20 >>>>> . . . >>>>> So I'm trying: >>>>>=20 >>>>> # git clean -f >>>>> # rm */config.cache */*/config.cache >>>>> # env CPATH=3D/usr/local/include ./configure >>>>> . . . >>>>> # env CPATH=3D/usr/local/include gmake >>>>> . . . >>>>>=20 >>>>> in order to try to add paths after the command line -I paths. >>>>>=20 >>>>> . . . This looks like it built. I've not used the build yet. >>>>>=20 >>>>=20 >>>> Looking at a *.core did not go well for my context: >>>>=20 >>>> # cc -g -O2 tls_gdb_test.c=20 >>>> tls_gdb_test.c:16:2: warning: indirection of non-volatile null = pointer will be deleted, not trap [-Wnull-dereference] >>>> *(char *)NULL =3D 1; >>>> ^~~~~~~~~~~~~ >>>> tls_gdb_test.c:16:2: note: consider using __builtin_trap() or = qualifying pointer with 'volatile' >>>> 1 warning generated. >=20 > For me, builtin_trap didn't DTRT on ppc before, but that was probably = using > gcc rather than clang (and possibly using gcc4.2). >=20 >>>> . . . >>>=20 >>>=20 >>> So far all tried-combinations of using gcc versions for build >>> the test program and/or building the gdb used do not work for >>> "p id" and "p &id" in doing the test. clang is not essential >>> to the behavior observed. >>=20 >> Using "-g -O2 -pthread" to build the test program via system >> clang or gcc8 (for example) did lead to the likes of: >>=20 >> (gdb) run=20 >> Starting program: /root/c_tests/a.out=20 >> main: PID 15350 >> id =3D 15350 (0x810055020) >>=20 >> ^C >> Program received signal SIGINT, Interrupt. >> main (ac=3D, av=3D) at = tls_gdb_test.c:16 >> 16 *(char *)NULL =3D 1; >> (gdb) bt >> #0 main (ac=3D, av=3D) at = tls_gdb_test.c:16 >> (gdb) info threads >> Id Target Id Frame=20 >> * 1 LWP 100324 of process 15350 main (ac=3D, = av=3D) at tls_gdb_test.c:16 >> (gdb) p id >> $1 =3D 15350 >> (gdb) p &id >> $2 =3D (int *) 0x810055020 >>=20 >> So it appears one branch of: >>=20 >> static void >> fbsd_fetch_rtld_offsets (struct gdbarch *gdbarch, struct = fbsd_pspace_data *data) >> { >> TRY >> { >> /* Fetch offsets from debug symbols in rtld. */ >> data->off_linkmap =3D parse_and_eval_long ("&((Obj_Entry = *)0)->linkmap"); >> data->off_tlsindex =3D parse_and_eval_long ("&((Obj_Entry = *)0)->tlsindex"); >> data->rtld_offsets_valid =3D true; >> return; >> } >> CATCH (e, RETURN_MASK_ERROR) >> { >> data->off_linkmap =3D -1; >> } >> END_CATCH >>=20 >> TRY >> { >> /* Fetch offsets from global variables in libthr. Note that >> this does not work for single-threaded processes that are not >> linked against libthr. */ >> data->off_linkmap =3D fbsd_read_integer_by_name(gdbarch, >> = "_thread_off_linkmap"); >> data->off_tlsindex =3D fbsd_read_integer_by_name(gdbarch, >> = "_thread_off_tlsindex"); >> data->rtld_offsets_valid =3D true; >> return; >> } >> CATCH (e, RETURN_MASK_ERROR) >> { >> data->off_linkmap =3D -1; >> } >> END_CATCH >> } >>=20 >> is working when -pthread is used. >=20 > Yes. The second one only works for programs linked against -lthr. = Otherwise > you need to have built your system with debug symbols (which is the = default), > and gdb needs to be able to access = /usr/lib/debug/libexec/ld-elf.so.1.debug > to determine the offsets of the two fields in Obj_Entry (this is what = the > first TRY clause does). I buildworld buildkernel with debug symbols for both and install them: # ls -lT /usr/lib/debug/libexec/ld-elf.so.1.debug -r--r--r-- 1 root wheel 576344 Dec 11 22:58:11 2018 = /usr/lib/debug/libexec/ld-elf.so.1.debug # ls -lT /usr/libexec/ld-elf.so.1 /libexec/ld-elf.so.1 -r-xr-xr-x 1 root wheel 184400 Dec 9 02:35:05 2018 = /libexec/ld-elf.so.1 lrwxr-xr-x 1 root wheel 25 Dec 11 22:58:12 2018 = /usr/libexec/ld-elf.so.1 -> ../../libexec/ld-elf.so.1 So I think the first TRY clause does not work. In the tested gdb used on the a.out I'm testing I get: (gdb) p &((Obj_Entry *)0)->linkmap No symbol "Obj_Entry" in current context. gdb does not report reading symbols from or for: /usr/lib/debug/libexec/ld-elf.so.1.debug or: /usr/libexec/ld-elf.so.1 or: /libexec/ld-elf.so.1 It only reports reading them from/for the a.out . = =20 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-ppc@freebsd.org Wed Jan 23 18:10:58 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 5BBE214AEC9D for ; Wed, 23 Jan 2019 18:10:58 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic310-22.consmr.mail.ne1.yahoo.com (sonic310-22.consmr.mail.ne1.yahoo.com [66.163.186.203]) (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 48F8E84F47 for ; Wed, 23 Jan 2019 18:10:57 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: iXLLbXgVM1lzB17Jp2VuPO_vk2gLG_G1AHNs7gRYxvxJrtYfXfrW0sy3xyUuhNd kPk.UB5VLVbcQvu.8jpB3CmGsNlVfxvnsfUBFgvOtmDjlt_fEeNFFL98YJvTT1GTMGhDVdirCGvN dFNzsQERglvypfH6BkUrBitslsXg6MHKtAFTKJ8dSHL_RAKFqSkJqEFdINhG4xVsWNuq6XheEUXH 0XUokxn6P3CpSPeZ856CGkoCa1Yxu9WeO7Zz7RtyI2Fa631.OD13n3kweCWyxV6fa3LcTdE8vN5. ef20anFniAq8bIsoq5v.1_4wfcmDUpbyJDy0gX_23MvobmBlVWyRudeDDOgxeNau.P8vGJxJoH3M tS57tkXyVrjnIcrhCtG22SxCTxpQEI39VNocvOQ4Ehxt14Oh48wAB_508PxOuYia3m3DG5dvcUDj Ri32AkakhJvmnZefs0zqIFlOFw8zoOYD..d_NtNfGTQzqbP0xv8uo_ECsYFa_dNfIbYVm5UkwfjF N1FImghp9Yq1KS.9B5ZcVwjsvtVB4SpESWiXVYdq3D9b1RItZyz6hMNWwmrvqjKzXn0i_jnc.iTm aOgK1iLKCv37hlUtPH61bc6ZOAeIz1MhsTexNaNo9CoXWILNU16cDb_Q4ZlGiRQ3AtpTffa5SfEY NaSCcKxaeyy7v0xN._PMUCwsFvbbVyfgLvKH1zmXvcTZQACBwmJPc0AfggNRXLYeyBqcpGstNQKY BRImONjesYGo.FfA6h3._PkoU46haeoi0N_0LhfooZ4SdYQ0z519bm63zFlY1VbAqVNfgsutrTQc RMx4_FJP8OkT_eGgFx5d24sDQroQ6AomyiLgAO.M4kj7Dy0Ff3R5L3euh6MZZtKz.VsCtyQC_IBu 06A_iYIi9TH2MRfppt61lsTkSsDo1d.GYULTDuCHPZlYENbu1dSDbIbTLg3ELXCSO41VE1a_qN1x WJstxZxcometxiSeWf5mhWJtxHCfRszS9rO65SWk9IjYbBB4noCt2z_sh5IBjZql4IHVPfyYtKxF VpE8b1G82ohN7DLsNHYTGLWs7lVZBvdEHPk3hlDbPrbreq9W.QQdlL2COEZwVJZOUVV3x_Wv_f8E - Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ne1.yahoo.com with HTTP; Wed, 23 Jan 2019 18:10:49 +0000 Received: from c-67-170-167-181.hsd1.or.comcast.net (EHLO [192.168.1.102]) ([67.170.167.181]) by smtp432.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID e379fe9cf0132c93424912ff8e22dd17; Wed, 23 Jan 2019 18:10:44 +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 [actually running some tests finally: a success with -pthread used] From: Mark Millard In-Reply-To: Date: Wed, 23 Jan 2019 10:10:43 -0800 Cc: "freebsd-ppc@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <20B92DA0-33B7-44D1-AB92-E3DD55A8B7CE@yahoo.com> References: <19343397-859C-4629-A4A5-B0DCDE25957B@yahoo.com> <5AA68ED2-2615-438B-A6AE-406CBD8E49F7@yahoo.com> <20027C29-0093-4001-A135-23783F8B87F3@yahoo.com> <4048D2A4-7E14-481C-9B5D-00567BCF4463@yahoo.com> <2AAC9738-73BD-475A-888A-252EE853A5C6@yahoo.com> <493AC0BE-3EC6-42B7-B027-FFB6454761B5@yahoo.com> <52E66D9B-C332-4565-B8E7-F54F6454B062@yahoo.com> To: John Baldwin X-Mailer: Apple Mail (2.3445.102.3) X-Rspamd-Queue-Id: 48F8E84F47 X-Spamd-Bar: / X-Spamd-Result: default: False [-0.46 / 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]; DKIM_TRACE(0.00)[yahoo.com:+]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.03)[-0.032,0]; 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:36646, ipnet:66.163.184.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.58)[-0.579,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.33)[-0.332,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.99)[ip: (3.08), ipnet: 66.163.184.0/21(1.09), asn: 36646(0.88), country: US(-0.08)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[203.186.163.66.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: Wed, 23 Jan 2019 18:10:58 -0000 On 2019-Jan-23, at 09:59, Mark Millard wrote: > On 2019-Jan-23, at 09:02, John Baldwin wrote: >=20 >> On 1/23/19 12:19 AM, Mark Millard wrote: >>>=20 >>>=20 >>> On 2019-Jan-22, at 22:53, Mark Millard wrote: >>>=20 >>>=20 >>>=20 >>>> On 2019-Jan-22, at 19:19, Mark Millard = wrote: >>>>=20 >>>>=20 >>>>=20 >>>>> On 2019-Jan-22, at 18:32, Mark Millard = wrote: >>>>>=20 >>>>>=20 >>>>>=20 >>>>>> On 2019-Jan-22, at 17:06, Mark Millard = wrote: >>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>>> . . . >>>>>> So I'm trying: >>>>>>=20 >>>>>> # git clean -f >>>>>> # rm */config.cache */*/config.cache >>>>>> # env CPATH=3D/usr/local/include ./configure >>>>>> . . . >>>>>> # env CPATH=3D/usr/local/include gmake >>>>>> . . . >>>>>>=20 >>>>>> in order to try to add paths after the command line -I paths. >>>>>>=20 >>>>>> . . . This looks like it built. I've not used the build yet. >>>>>>=20 >>>>>=20 >>>>> Looking at a *.core did not go well for my context: >>>>>=20 >>>>> # cc -g -O2 tls_gdb_test.c=20 >>>>> tls_gdb_test.c:16:2: warning: indirection of non-volatile null = pointer will be deleted, not trap [-Wnull-dereference] >>>>> *(char *)NULL =3D 1; >>>>> ^~~~~~~~~~~~~ >>>>> tls_gdb_test.c:16:2: note: consider using __builtin_trap() or = qualifying pointer with 'volatile' >>>>> 1 warning generated. >>=20 >> For me, builtin_trap didn't DTRT on ppc before, but that was probably = using >> gcc rather than clang (and possibly using gcc4.2). >>=20 >>>>> . . . >>>>=20 >>>>=20 >>>> So far all tried-combinations of using gcc versions for build >>>> the test program and/or building the gdb used do not work for >>>> "p id" and "p &id" in doing the test. clang is not essential >>>> to the behavior observed. >>>=20 >>> Using "-g -O2 -pthread" to build the test program via system >>> clang or gcc8 (for example) did lead to the likes of: >>>=20 >>> (gdb) run=20 >>> Starting program: /root/c_tests/a.out=20 >>> main: PID 15350 >>> id =3D 15350 (0x810055020) >>>=20 >>> ^C >>> Program received signal SIGINT, Interrupt. >>> main (ac=3D, av=3D) at = tls_gdb_test.c:16 >>> 16 *(char *)NULL =3D 1; >>> (gdb) bt >>> #0 main (ac=3D, av=3D) at = tls_gdb_test.c:16 >>> (gdb) info threads >>> Id Target Id Frame=20 >>> * 1 LWP 100324 of process 15350 main (ac=3D, = av=3D) at tls_gdb_test.c:16 >>> (gdb) p id >>> $1 =3D 15350 >>> (gdb) p &id >>> $2 =3D (int *) 0x810055020 >>>=20 >>> So it appears one branch of: >>>=20 >>> static void >>> fbsd_fetch_rtld_offsets (struct gdbarch *gdbarch, struct = fbsd_pspace_data *data) >>> { >>> TRY >>> { >>> /* Fetch offsets from debug symbols in rtld. */ >>> data->off_linkmap =3D parse_and_eval_long ("&((Obj_Entry = *)0)->linkmap"); >>> data->off_tlsindex =3D parse_and_eval_long ("&((Obj_Entry = *)0)->tlsindex"); >>> data->rtld_offsets_valid =3D true; >>> return; >>> } >>> CATCH (e, RETURN_MASK_ERROR) >>> { >>> data->off_linkmap =3D -1; >>> } >>> END_CATCH >>>=20 >>> TRY >>> { >>> /* Fetch offsets from global variables in libthr. Note that >>> this does not work for single-threaded processes that are not >>> linked against libthr. */ >>> data->off_linkmap =3D fbsd_read_integer_by_name(gdbarch, >>> = "_thread_off_linkmap"); >>> data->off_tlsindex =3D fbsd_read_integer_by_name(gdbarch, >>> = "_thread_off_tlsindex"); >>> data->rtld_offsets_valid =3D true; >>> return; >>> } >>> CATCH (e, RETURN_MASK_ERROR) >>> { >>> data->off_linkmap =3D -1; >>> } >>> END_CATCH >>> } >>>=20 >>> is working when -pthread is used. >>=20 >> Yes. The second one only works for programs linked against -lthr. = Otherwise >> you need to have built your system with debug symbols (which is the = default), >> and gdb needs to be able to access = /usr/lib/debug/libexec/ld-elf.so.1.debug >> to determine the offsets of the two fields in Obj_Entry (this is what = the >> first TRY clause does). >=20 > I buildworld buildkernel with debug symbols for both and install them: >=20 > # ls -lT /usr/lib/debug/libexec/ld-elf.so.1.debug > -r--r--r-- 1 root wheel 576344 Dec 11 22:58:11 2018 = /usr/lib/debug/libexec/ld-elf.so.1.debug >=20 > # ls -lT /usr/libexec/ld-elf.so.1 /libexec/ld-elf.so.1 > -r-xr-xr-x 1 root wheel 184400 Dec 9 02:35:05 2018 = /libexec/ld-elf.so.1 > lrwxr-xr-x 1 root wheel 25 Dec 11 22:58:12 2018 = /usr/libexec/ld-elf.so.1 -> ../../libexec/ld-elf.so.1 >=20 > So I think the first TRY clause does not work. >=20 > In the tested gdb used on the a.out I'm testing I get: >=20 > (gdb) p &((Obj_Entry *)0)->linkmap > No symbol "Obj_Entry" in current context. >=20 > gdb does not report reading symbols from or for: >=20 > /usr/lib/debug/libexec/ld-elf.so.1.debug > or: > /usr/libexec/ld-elf.so.1 > or: > /libexec/ld-elf.so.1 >=20 > It only reports reading them from/for the a.out . It neded up that I had a littel time so . . . I tried /usr/local/bin/gdb and for it: (gdb) p &((Obj_Entry *)0)->linkmap $1 =3D (struct link_map *) 0x238 So the lack of finding Obj_Entry via the test gdb seems to be specific to the test gdb, not a problem for devel/gdb . May be the test gdb has some sort of build problem in my context, given that I used CPATH to get things to build? =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-ppc@freebsd.org Wed Jan 23 18:44:34 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 D2A1E14AF6DF for ; Wed, 23 Jan 2019 18:44:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7253285F0C; Wed, 23 Jan 2019 18:44:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 015DD15FC2; Wed, 23 Jan 2019 18:44:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: GDB TLS testing [actually running some tests finally: a success with -pthread used] To: Mark Millard Cc: "freebsd-ppc@freebsd.org" References: <19343397-859C-4629-A4A5-B0DCDE25957B@yahoo.com> <5AA68ED2-2615-438B-A6AE-406CBD8E49F7@yahoo.com> <20027C29-0093-4001-A135-23783F8B87F3@yahoo.com> <4048D2A4-7E14-481C-9B5D-00567BCF4463@yahoo.com> <2AAC9738-73BD-475A-888A-252EE853A5C6@yahoo.com> <493AC0BE-3EC6-42B7-B027-FFB6454761B5@yahoo.com> <52E66D9B-C332-4565-B8E7-F54F6454B062@yahoo.com> <20B92DA0-33B7-44D1-AB92-E3DD55A8B7CE@yahoo.com> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Wed, 23 Jan 2019 10:43:25 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20B92DA0-33B7-44D1-AB92-E3DD55A8B7CE@yahoo.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7253285F0C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.92 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.92)[-0.924,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,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: Wed, 23 Jan 2019 18:44:34 -0000 On 1/23/19 10:10 AM, Mark Millard wrote: > > > On 2019-Jan-23, at 09:59, Mark Millard wrote: > > > >> On 2019-Jan-23, at 09:02, John Baldwin wrote: >> >>> On 1/23/19 12:19 AM, Mark Millard wrote: >>>> >>>> >>>> On 2019-Jan-22, at 22:53, Mark Millard wrote: >>>> >>>> >>>> >>>>> On 2019-Jan-22, at 19:19, Mark Millard wrote: >>>>> >>>>> >>>>> >>>>>> On 2019-Jan-22, at 18:32, Mark Millard wrote: >>>>>> >>>>>> >>>>>> >>>>>>> On 2019-Jan-22, at 17:06, Mark Millard wrote: >>>>>>> >>>>>>> >>>>>>> >>>>>>> . . . >>>>>>> So I'm trying: >>>>>>> >>>>>>> # git clean -f >>>>>>> # rm */config.cache */*/config.cache >>>>>>> # env CPATH=/usr/local/include ./configure >>>>>>> . . . >>>>>>> # env CPATH=/usr/local/include gmake >>>>>>> . . . >>>>>>> >>>>>>> in order to try to add paths after the command line -I paths. >>>>>>> >>>>>>> . . . This looks like it built. I've not used the build yet. >>>>>>> >>>>>> >>>>>> Looking at a *.core did not go well for my context: >>>>>> >>>>>> # cc -g -O2 tls_gdb_test.c >>>>>> tls_gdb_test.c:16:2: warning: indirection of non-volatile null pointer will be deleted, not trap [-Wnull-dereference] >>>>>> *(char *)NULL = 1; >>>>>> ^~~~~~~~~~~~~ >>>>>> tls_gdb_test.c:16:2: note: consider using __builtin_trap() or qualifying pointer with 'volatile' >>>>>> 1 warning generated. >>> >>> For me, builtin_trap didn't DTRT on ppc before, but that was probably using >>> gcc rather than clang (and possibly using gcc4.2). >>> >>>>>> . . . >>>>> >>>>> >>>>> So far all tried-combinations of using gcc versions for build >>>>> the test program and/or building the gdb used do not work for >>>>> "p id" and "p &id" in doing the test. clang is not essential >>>>> to the behavior observed. >>>> >>>> Using "-g -O2 -pthread" to build the test program via system >>>> clang or gcc8 (for example) did lead to the likes of: >>>> >>>> (gdb) run >>>> Starting program: /root/c_tests/a.out >>>> main: PID 15350 >>>> id = 15350 (0x810055020) >>>> >>>> ^C >>>> Program received signal SIGINT, Interrupt. >>>> main (ac=, av=) at tls_gdb_test.c:16 >>>> 16 *(char *)NULL = 1; >>>> (gdb) bt >>>> #0 main (ac=, av=) at tls_gdb_test.c:16 >>>> (gdb) info threads >>>> Id Target Id Frame >>>> * 1 LWP 100324 of process 15350 main (ac=, av=) at tls_gdb_test.c:16 >>>> (gdb) p id >>>> $1 = 15350 >>>> (gdb) p &id >>>> $2 = (int *) 0x810055020 >>>> >>>> So it appears one branch of: >>>> >>>> static void >>>> fbsd_fetch_rtld_offsets (struct gdbarch *gdbarch, struct fbsd_pspace_data *data) >>>> { >>>> TRY >>>> { >>>> /* Fetch offsets from debug symbols in rtld. */ >>>> data->off_linkmap = parse_and_eval_long ("&((Obj_Entry *)0)->linkmap"); >>>> data->off_tlsindex = parse_and_eval_long ("&((Obj_Entry *)0)->tlsindex"); >>>> data->rtld_offsets_valid = true; >>>> return; >>>> } >>>> CATCH (e, RETURN_MASK_ERROR) >>>> { >>>> data->off_linkmap = -1; >>>> } >>>> END_CATCH >>>> >>>> TRY >>>> { >>>> /* Fetch offsets from global variables in libthr. Note that >>>> this does not work for single-threaded processes that are not >>>> linked against libthr. */ >>>> data->off_linkmap = fbsd_read_integer_by_name(gdbarch, >>>> "_thread_off_linkmap"); >>>> data->off_tlsindex = fbsd_read_integer_by_name(gdbarch, >>>> "_thread_off_tlsindex"); >>>> data->rtld_offsets_valid = true; >>>> return; >>>> } >>>> CATCH (e, RETURN_MASK_ERROR) >>>> { >>>> data->off_linkmap = -1; >>>> } >>>> END_CATCH >>>> } >>>> >>>> is working when -pthread is used. >>> >>> Yes. The second one only works for programs linked against -lthr. Otherwise >>> you need to have built your system with debug symbols (which is the default), >>> and gdb needs to be able to access /usr/lib/debug/libexec/ld-elf.so.1.debug >>> to determine the offsets of the two fields in Obj_Entry (this is what the >>> first TRY clause does). >> >> I buildworld buildkernel with debug symbols for both and install them: >> >> # ls -lT /usr/lib/debug/libexec/ld-elf.so.1.debug >> -r--r--r-- 1 root wheel 576344 Dec 11 22:58:11 2018 /usr/lib/debug/libexec/ld-elf.so.1.debug >> >> # ls -lT /usr/libexec/ld-elf.so.1 /libexec/ld-elf.so.1 >> -r-xr-xr-x 1 root wheel 184400 Dec 9 02:35:05 2018 /libexec/ld-elf.so.1 >> lrwxr-xr-x 1 root wheel 25 Dec 11 22:58:12 2018 /usr/libexec/ld-elf.so.1 -> ../../libexec/ld-elf.so.1 >> >> So I think the first TRY clause does not work. >> >> In the tested gdb used on the a.out I'm testing I get: >> >> (gdb) p &((Obj_Entry *)0)->linkmap >> No symbol "Obj_Entry" in current context. >> >> gdb does not report reading symbols from or for: >> >> /usr/lib/debug/libexec/ld-elf.so.1.debug >> or: >> /usr/libexec/ld-elf.so.1 >> or: >> /libexec/ld-elf.so.1 >> >> It only reports reading them from/for the a.out . > > It neded up that I had a littel time so . . . > > I tried /usr/local/bin/gdb and for it: > > (gdb) p &((Obj_Entry *)0)->linkmap > $1 = (struct link_map *) 0x238 > > So the lack of finding Obj_Entry via the test gdb seems to be > specific to the test gdb, not a problem for devel/gdb . > > May be the test gdb has some sort of build problem in my context, > given that I used CPATH to get things to build? Oh, it might not have /usr/lib/debug configured as a debug directory. I usually use a wrapper script (available at github/bsdjhb/kdbg.git/gdb/build) which sets various configure options to match what the port does. One of those is --with-separate-debug-dir=/usr/lib/debug which will probably fix this. -- John Baldwin                                                                              From owner-freebsd-ppc@freebsd.org Wed Jan 23 21:47:00 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 EEE4014B3988 for ; Wed, 23 Jan 2019 21:46:59 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic309-21.consmr.mail.ne1.yahoo.com (sonic309-21.consmr.mail.ne1.yahoo.com [66.163.184.147]) (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 D59C68CC8F for ; Wed, 23 Jan 2019 21:46:58 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: 3CQu5dYVM1nen6bd1efFtCCQczCe4ABpLAZ1tMj1irvdB8pKqVBjEJBhyb78ntz XLYjbHsOY6v6eIPWEPWXTWhnx8wQVA3z1f.2udewV6AMyum4VfUQ_fcixroHEdUcuoQy.Te4gUJP 7nUZnq4RmBgrG7sXSPvMWxbdsrQvKaIliASlUIMvek9C7cuUXoa7Du3JsY3.owQ09jqdCxfRaQiJ DKIwMvfcNCosYNyiI1u0hqCPSqG4P084cgZljV7UPGK5T4C4iHryfpSmnDnfNnFLK7QgX1WxdOoq _FGw67SJWhS70CFUyt5nUkwnqu2MKhixnkSFU8FrGtjywqTuWzO3ICu9nOhRyNk9TKz11h9W.t9r GB.fIJmX7h4Tcpqtfy63kyNFEe5LPYD2SWiFKNEWhZ5p18K0qprpyDD3zgVjXaHjg9QiOXxCS9fx MQo0aaah9UG3WVVXNm_MIV.Fj2i11RoqEHElksPogu9q0pmmhgKMcSvIcjGjiX16MRe0A61sTQu5 3zhvKrdpKSqNdy4eZB7nfGsAz60jF.MesZCuB9E1RgotFraOunhqm4hn6MWsditKtduxco_8pBmy hlugTGcVF_0dYs6JtCBuu0Tq76YyNM.ozfuUMdAP1_eTYw9vtuJDjOfHopWu8GWNezEo2aVgeVDk EPAllpRnZs7lRNxouD.hXg7uHdLMuk6s1PfUlTIgXLNz3DyexkYOs0tIr3W_FH6MazhoQ82rMSYf wESOheUzmv1EFnmirhkwRvhjYTqNRaKmEewPESQD6XXq6lKHk9wyDoGh8R642Ezl6rLdA12bfmQ1 jHQqAz9fAdh7jAA0ln4h5rcbiOCP_MWLCaLQ.BzlMH_iEVu88eXD3VrxOrTTZrzJ7RhdzcwXhILr xV0s0A_lM3fo04tl0b5DmvGKB.ikD_dAnJiJmW6N580F5WushvfV0QvRSS.ZikjygtHDab.IVIxB qgPdbA_88G0hUmMiPq2K2eehBgb_iLts3JdLu1.TkLSI4IIZivGW4r22sTfKF195PAlLwdC8ypzB jT7QnHBbPDvxrWed7Nmwxiv4uOj3iGOqx2mM2DoDsJeJx3Hmsz7Mhu7zChtv8CNv.J3liz64- Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.ne1.yahoo.com with HTTP; Wed, 23 Jan 2019 21:46:51 +0000 Received: from c-67-170-167-181.hsd1.or.comcast.net (EHLO [192.168.1.102]) ([67.170.167.181]) by smtp402.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 333eecb7daa0a92d31ae2e68d29aaa5a; Wed, 23 Jan 2019 21:46:46 +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 [actually running some tests finally: a success with -pthread used] From: Mark Millard In-Reply-To: Date: Wed, 23 Jan 2019 13:46:45 -0800 Cc: "freebsd-ppc@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <0C2BB5BF-F133-4D23-8462-E015CDAC21C7@yahoo.com> References: <19343397-859C-4629-A4A5-B0DCDE25957B@yahoo.com> <5AA68ED2-2615-438B-A6AE-406CBD8E49F7@yahoo.com> <20027C29-0093-4001-A135-23783F8B87F3@yahoo.com> <4048D2A4-7E14-481C-9B5D-00567BCF4463@yahoo.com> <2AAC9738-73BD-475A-888A-252EE853A5C6@yahoo.com> <493AC0BE-3EC6-42B7-B027-FFB6454761B5@yahoo.com> <52E66D9B-C332-4565-B8E7-F54F6454B062@yahoo.com> <20B92DA0-33B7-44D1-AB92-E3DD55A8B7CE@yahoo.com> To: John Baldwin X-Mailer: Apple Mail (2.3445.102.3) X-Rspamd-Queue-Id: D59C68CC8F X-Spamd-Bar: - X-Spamd-Result: default: False [-1.42 / 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]; NEURAL_HAM_SHORT(-0.05)[-0.051,0]; 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:36646, ipnet:66.163.184.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.82)[-0.815,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.78)[-0.785,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.75)[ip: (1.84), ipnet: 66.163.184.0/21(1.09), asn: 36646(0.87), country: US(-0.08)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[147.184.163.66.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: Wed, 23 Jan 2019 21:47:00 -0000 On 2019-Jan-23, at 10:43, John Baldwin wrote: > On 1/23/19 10:10 AM, Mark Millard wrote: >>=20 >>=20 >> On 2019-Jan-23, at 09:59, Mark Millard wrote: >>=20 >>=20 >>=20 >>> On 2019-Jan-23, at 09:02, John Baldwin wrote: >>>=20 >>>>> . . . >>>>=20 >>>> Yes. The second one only works for programs linked against -lthr. = Otherwise >>>> you need to have built your system with debug symbols (which is the = default), >>>> and gdb needs to be able to access = /usr/lib/debug/libexec/ld-elf.so.1.debug >>>> to determine the offsets of the two fields in Obj_Entry (this is = what the >>>> first TRY clause does). >>>=20 >>> I buildworld buildkernel with debug symbols for both and install = them: >>>=20 >>> # ls -lT /usr/lib/debug/libexec/ld-elf.so.1.debug >>> -r--r--r-- 1 root wheel 576344 Dec 11 22:58:11 2018 = /usr/lib/debug/libexec/ld-elf.so.1.debug >>>=20 >>> # ls -lT /usr/libexec/ld-elf.so.1 /libexec/ld-elf.so.1 >>> -r-xr-xr-x 1 root wheel 184400 Dec 9 02:35:05 2018 = /libexec/ld-elf.so.1 >>> lrwxr-xr-x 1 root wheel 25 Dec 11 22:58:12 2018 = /usr/libexec/ld-elf.so.1 -> ../../libexec/ld-elf.so.1 >>>=20 >>> So I think the first TRY clause does not work. >>>=20 >>> In the tested gdb used on the a.out I'm testing I get: >>>=20 >>> (gdb) p &((Obj_Entry *)0)->linkmap >>> No symbol "Obj_Entry" in current context. >>>=20 >>> gdb does not report reading symbols from or for: >>>=20 >>> /usr/lib/debug/libexec/ld-elf.so.1.debug >>> or: >>> /usr/libexec/ld-elf.so.1 >>> or: >>> /libexec/ld-elf.so.1 >>>=20 >>> It only reports reading them from/for the a.out . >>=20 >> It neded up that I had a littel time so . . . >>=20 >> I tried /usr/local/bin/gdb and for it: >>=20 >> (gdb) p &((Obj_Entry *)0)->linkmap >> $1 =3D (struct link_map *) 0x238 >>=20 >> So the lack of finding Obj_Entry via the test gdb seems to be >> specific to the test gdb, not a problem for devel/gdb . >>=20 >> May be the test gdb has some sort of build problem in my context, >> given that I used CPATH to get things to build? >=20 > Oh, it might not have /usr/lib/debug configured as a debug directory. = I > usually use a wrapper script (available at = github/bsdjhb/kdbg.git/gdb/build) > which sets various configure options to match what the port does. One = of > those is --with-separate-debug-dir=3D/usr/lib/debug which will = probably fix > this. The script does things not matching how I'm working but gives me a reference for what you do. So initally I'm trying: # git clean -f # rm */config.cache */*/config.cache # env CPATH=3D/usr/local/include ./configure = --with-separate-debug-dir=3D/usr/lib/debug . . . # env CPATH=3D/usr/local/include gmake . . . I will note that there are oddities like: tree.c:542:45: warning: 'memset' call operates on objects of type = 'device_unit' (aka 'struct _device_unit') while the size is based on a = different type 'device_unit *' (aka 'struct _device_unit *') [-Wsizeof-pointer-memaccess] memset(®s[reg_nr].size, 0, sizeof (®s[reg_nr].size)); ~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~ tree.c:542:45: note: did you mean to remove the addressof in the = argument to 'sizeof' (and multiply it by the number of elements)? memset(®s[reg_nr].size, 0, sizeof (®s[reg_nr].size)); ^~~~~~~~~~~~~~~~~~ There are a fair number of the likes of: warning: format specifies type 'unsigned long' but the argument has type = 'unsigned_word' (aka 'unsigned int') [-Wformat] indicating 32-bit formats for 64 bit values (the context is powerpc64). = There are also examples the reverse. = =20 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-ppc@freebsd.org Thu Jan 24 09: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 E0D8A14A6371 for ; Thu, 24 Jan 2019 09:02:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 17C288868C for ; Thu, 24 Jan 2019 09:02:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by freefall.freebsd.org (Postfix) id B0B6617D57; Thu, 24 Jan 2019 09:02:42 +0000 (UTC) Delivered-To: powerpc@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id AB80A17D55 for ; Thu, 24 Jan 2019 09:02:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 894A98866B for ; Thu, 24 Jan 2019 09:02:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id CB49DD86F for ; Thu, 24 Jan 2019 09:02:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x0O92buS072003 for ; Thu, 24 Jan 2019 09:02:37 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x0O92bwb071993 for powerpc@FreeBSD.org; Thu, 24 Jan 2019 09:02:37 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: powerpc@FreeBSD.org Subject: [Bug 233850] lang/php73: DTRACE option on PowerPC causes ld(1) link probe failures; Relocations in generic ELF Date: Thu, 24 Jan 2019 09:02:37 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: tz@freebsd.org X-Bugzilla-Flags: maintainer-feedback+ X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Rspamd-Queue-Id: 17C288868C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.988,0]; ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,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: Thu, 24 Jan 2019 09:02:44 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D233850 --- Comment #5 from commit-hook@freebsd.org --- A commit references this bug: Author: tz Date: Thu Jan 24 09:02:31 UTC 2019 New revision: 491082 URL: https://svnweb.freebsd.org/changeset/ports/491082 Log: MFH: r491031 lang/php73: disable DTRACE option on PowerPC DTRACE causes ld(1) link probe failures and therefore fails the build. PR: 233850 Submitted by: Chip Cuccio Approved by: ports-secteam (miwi) Changes: _U branches/2019Q1/ branches/2019Q1/lang/php73/Makefile --=20 You are receiving this mail because: You are on the CC list for the bug.= From owner-freebsd-ppc@freebsd.org Thu Jan 24 09:03:17 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 EEDE714A63AD for ; Thu, 24 Jan 2019 09:03:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 95AFC886DB for ; Thu, 24 Jan 2019 09:03:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by freefall.freebsd.org (Postfix) id 7FC5817D87; Thu, 24 Jan 2019 09:03:16 +0000 (UTC) Delivered-To: powerpc@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id 7A56817D86 for ; Thu, 24 Jan 2019 09:03:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B754886D8 for ; Thu, 24 Jan 2019 09:03:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 716BBD874 for ; Thu, 24 Jan 2019 09:03:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x0O93Fwl087997 for ; Thu, 24 Jan 2019 09:03:15 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x0O93Fe4087994 for powerpc@FreeBSD.org; Thu, 24 Jan 2019 09:03:15 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: powerpc@FreeBSD.org Subject: [Bug 233850] lang/php73: DTRACE option on PowerPC causes ld(1) link probe failures; Relocations in generic ELF Date: Thu, 24 Jan 2019 09:03:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: tz@freebsd.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: tz@freebsd.org X-Bugzilla-Flags: maintainer-feedback+ X-Bugzilla-Changed-Fields: resolution bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Rspamd-Queue-Id: 95AFC886DB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.988,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,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: Thu, 24 Jan 2019 09:03:17 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D233850 Torsten Zuehlsdorff changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|In Progress |Closed --- Comment #6 from Torsten Zuehlsdorff --- Merged into quarterly. Thanks for the PR! Greetings, Torsten --=20 You are receiving this mail because: You are on the CC list for the bug.= From owner-freebsd-ppc@freebsd.org Fri Jan 25 08:16:26 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 1694314AC55F for ; Fri, 25 Jan 2019 08:16:26 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic307-10.consmr.mail.ne1.yahoo.com (sonic307-10.consmr.mail.ne1.yahoo.com [66.163.190.33]) (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 3B2636F06E for ; Fri, 25 Jan 2019 08:16:24 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: tFEKTRMVM1k40I3CbUSSlMA1LY3VejVHmNemYJ7hg1NysFQesAtMYsw_TJAICiN NhJski8WMqiuAs7.skqmOK0f3VeIr3r5_jAlIdakedaUm0SoQCE0KlXTvY4rDlizN.7xhsOLFsZp vBtyFpL93GN0dw_qgOPbg.bMe3pVag08W0GXLJD67rB7GIYrAnCZS_uA0rT4aLGyUlXXpCTIjaOx SgXi4SQ8D90vIFOak5Ry7yRlraw3cGyHuqgPBmX9g3DZWzcZ7zEPYs4O11W2EGW1mvQhwDIbRjH8 JZaejhzzjaM2qKcShBWq6v.s8QCMxFbJmck1rCBUaYEDDkDJZjpvrV7tLJ61ExbQgEIE.80XttHT mUf3.teeEoATJV7Zp7O5Bj7U0_FMWM_rtY8v3AxNTlwmlcfi59.URpvdbpf666Vr2VE3ei_5h304 Gha1prVFnhIGi9uY1cwK6n806NhmpRboSWq4_VrL4rrigHGSYR5zXvhXKjRtuKDxlyu94ZSv9hva PttT0_aWOfzoGUlLeTaAfdI_m5RvZti6d1JztuynhVhdAtqK2EPTeAflOs13_NJZ0dLGiPV1mM5b Znmq_.KCSiKTWD9tTRaErSL2cdOR.5sZLWywWzY0h0pSUsC6kr3Xynqfe1fwbnBMe0acy9RL40vz QX_cdXmWSbX5b3QcNU3AMECMwhYa3OsyQOi7lXnzNavEH2VcryJAo7NXhzwx6aNG7l.n443sf7kw _KnksiJtVgo43x8z4JES0eZIgutqIIyYAnz1Xq0u6rgOSsunjYj4Xk6iDY3AzD2qqlzAb3sDGFBm JgmWYZBfaSQDXqGiDxxGXVdhmTg5192LosuaMfV28tVkbMY0tFCuE6FnHK2jV0gjD1p53Rgg0qx2 ZY3j9kX4isRBF.2_vC_uk_q0FztrTW5_H1fGub4m1kvwX_fdsrpC8dev2vkH25vWZmeZQ_YJd7yJ EMjimyUR4vIP_UjakASvKeCZbq2FIc.IfhYi0uDJbs2g8G8AP8MJlM50WpyuQQaaG1HIAAjIdV0y s9IbgkFIWZ6AJZrspIyUdBxSU_Lt1PU2oHxnVA0C1kP5PRkTSPadpKNxvRtmVmenKGRiA Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Fri, 25 Jan 2019 08:16:22 +0000 Received: from c-67-170-167-181.hsd1.or.comcast.net (EHLO [192.168.1.113]) ([67.170.167.181]) by smtp407.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 59793d69934932d4d395014b4e8ab167; Fri, 25 Jan 2019 08:06:11 +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 [actually running some tests finally: a success with -pthread used] From: Mark Millard In-Reply-To: <0C2BB5BF-F133-4D23-8462-E015CDAC21C7@yahoo.com> Date: Fri, 25 Jan 2019 00:06:09 -0800 Cc: "freebsd-ppc@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <19343397-859C-4629-A4A5-B0DCDE25957B@yahoo.com> <5AA68ED2-2615-438B-A6AE-406CBD8E49F7@yahoo.com> <20027C29-0093-4001-A135-23783F8B87F3@yahoo.com> <4048D2A4-7E14-481C-9B5D-00567BCF4463@yahoo.com> <2AAC9738-73BD-475A-888A-252EE853A5C6@yahoo.com> <493AC0BE-3EC6-42B7-B027-FFB6454761B5@yahoo.com> <52E66D9B-C332-4565-B8E7-F54F6454B062@yahoo.com> <20B92DA0-33B7-44D1-AB92-E3DD55A8B7CE@yahoo.com> <0C2BB5BF-F133-4D23-8462-E015CDAC21C7@yahoo.com> To: John Baldwin X-Mailer: Apple Mail (2.3445.102.3) X-Rspamd-Queue-Id: 3B2636F06E X-Spamd-Bar: ++++++++ X-Spamd-Result: default: False [8.61 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ptr:yahoo.com]; MV_CASE(0.50)[]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[yahoo.com:+]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(0.00)[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:36646, ipnet:66.163.184.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.00)[yahoo.com:s=s2048]; RBL_NIXSPAM(4.00)[33.190.163.66.ix.dnsbl.manitu.net]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.81)[0.814,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(1.31)[ip: (4.67), ipnet: 66.163.184.0/21(1.09), asn: 36646(0.87), country: US(-0.08)]; NEURAL_SPAM_MEDIUM(0.99)[0.993,0]; BAD_REP_POLICIES(0.10)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[0.999,0]; RCVD_IN_DNSWL_NONE(0.00)[33.190.163.66.list.dnswl.org : 127.0.5.0]; GREYLIST(0.00)[pass,body] X-Spam: Yes 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: Fri, 25 Jan 2019 08:16:26 -0000 On 2019-Jan-23, at 13:46, Mark Millard wrote: > On 2019-Jan-23, at 10:43, John Baldwin wrote: >=20 >> On 1/23/19 10:10 AM, Mark Millard wrote: >>>=20 >>>=20 >>> On 2019-Jan-23, at 09:59, Mark Millard wrote: >>>=20 >>>=20 >>>=20 >>>> On 2019-Jan-23, at 09:02, John Baldwin wrote: >>>>=20 >>>>>> . . . >>>>>=20 >>>>> Yes. The second one only works for programs linked against -lthr. = Otherwise >>>>> you need to have built your system with debug symbols (which is = the default), >>>>> and gdb needs to be able to access = /usr/lib/debug/libexec/ld-elf.so.1.debug >>>>> to determine the offsets of the two fields in Obj_Entry (this is = what the >>>>> first TRY clause does). >>>>=20 >>>> I buildworld buildkernel with debug symbols for both and install = them: >>>>=20 >>>> # ls -lT /usr/lib/debug/libexec/ld-elf.so.1.debug >>>> -r--r--r-- 1 root wheel 576344 Dec 11 22:58:11 2018 = /usr/lib/debug/libexec/ld-elf.so.1.debug >>>>=20 >>>> # ls -lT /usr/libexec/ld-elf.so.1 /libexec/ld-elf.so.1 >>>> -r-xr-xr-x 1 root wheel 184400 Dec 9 02:35:05 2018 = /libexec/ld-elf.so.1 >>>> lrwxr-xr-x 1 root wheel 25 Dec 11 22:58:12 2018 = /usr/libexec/ld-elf.so.1 -> ../../libexec/ld-elf.so.1 >>>>=20 >>>> So I think the first TRY clause does not work. >>>>=20 >>>> In the tested gdb used on the a.out I'm testing I get: >>>>=20 >>>> (gdb) p &((Obj_Entry *)0)->linkmap >>>> No symbol "Obj_Entry" in current context. >>>>=20 >>>> gdb does not report reading symbols from or for: >>>>=20 >>>> /usr/lib/debug/libexec/ld-elf.so.1.debug >>>> or: >>>> /usr/libexec/ld-elf.so.1 >>>> or: >>>> /libexec/ld-elf.so.1 >>>>=20 >>>> It only reports reading them from/for the a.out . >>>=20 >>> It neded up that I had a littel time so . . . >>>=20 >>> I tried /usr/local/bin/gdb and for it: >>>=20 >>> (gdb) p &((Obj_Entry *)0)->linkmap >>> $1 =3D (struct link_map *) 0x238 >>>=20 >>> So the lack of finding Obj_Entry via the test gdb seems to be >>> specific to the test gdb, not a problem for devel/gdb . >>>=20 >>> May be the test gdb has some sort of build problem in my context, >>> given that I used CPATH to get things to build? >>=20 >> Oh, it might not have /usr/lib/debug configured as a debug directory. = I >> usually use a wrapper script (available at = github/bsdjhb/kdbg.git/gdb/build) >> which sets various configure options to match what the port does. = One of >> those is --with-separate-debug-dir=3D/usr/lib/debug which will = probably fix >> this. >=20 > The script does things not matching how I'm working but gives me a > reference for what you do. >=20 > So initally I'm trying: >=20 > # git clean -f > # rm */config.cache */*/config.cache > # env CPATH=3D/usr/local/include ./configure = --with-separate-debug-dir=3D/usr/lib/debug > . . . > # env CPATH=3D/usr/local/include gmake > . . . >=20 This was sufficient for making the case of a lack of -pthread also "p id" and "p &id" in gdb correctly in for the test program from the original list message in my powerpc64 context. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)