From owner-freebsd-arm@freebsd.org Tue Aug 4 23:52:48 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5CD403A3673 for ; Tue, 4 Aug 2020 23:52:48 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic311-25.consmr.mail.gq1.yahoo.com (sonic311-25.consmr.mail.gq1.yahoo.com [98.137.65.206]) (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 4BLs4v1zdvz43Yq for ; Tue, 4 Aug 2020 23:52:46 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: 6rr5W18VM1mlGrYb14v4HEO7v3FVY.S95OihNvM_Fa4MCsT.XzBzvM8L7PQ7vw6 YgUiz0tLuIZrwIIeWL2IdG07AHCY9FZgW6wt.qIMh36hURNV2jXBnZ9mYlgrr94wYihPdUxRzvRN 3U5yHDCCgRUKaJPD9gN60yZUvvpC29kPEDckCFFGF_VDauDQ8RvtebN.tscObmzztHMgsgza.KGt wVXsmws.UAdwUn6pqxXB3eyQUMiCwh_IyBCXXgUxJKK4Ug1SPW5vy0ZfqZ9w6K8sexgIsXf3JMI1 JlKBT0gaFa8vV.o2XpXOJouqCqQR8dzN7LZ773kF.aaTJvuFLBaLoBKZ6KhwJoT4v6kP_TqkXOPj RvrBErDwKJrrxNE2tIOT98FZ.I3tVEwVLAAnmc3iKPftkLYI_Ti3QIMU59Ob9sxkBM5IVPAiydWh _Z6rsbTXA6r0Ja2j5lwP2Z627xUlQ9cdxz4kyJIh_epdbKQ75GRacvoKf2MozRgp1I3vxMAERWVW 8t6NewsG0SXCJYBD5.owhnZilxIE5Wdp3OvdM1htCV4e3YEC_GyximZQcVcI0ncpSPb5AXtvguGZ avnKPzoMOgmsy6Q6VXCnHf7B4nbHVC8tN8K4CD5OVw7WVGuYLfuXLAxvS.79LnPivFUsJG8SOJ61 2YdZTHerlAut5SPhSrnvsZv8DLVHRxwjrwwspyLB.evnWc.XIDTFMlRsB.PhLeqV74IzTNTxDRZN qTqnCz4APtNkvi3MrWR7ADizh9P35C4PjF7TiNpOsr05ngceK.cd_SETxBm7MBuUG5gWQ77Grj4I zOWn28ZxydWLM1ynUgmuyGyKoAceCdsPFjug42jM_.DD3aM94SqfIIF9XSsCfvTgFS.Z47SVV_Ck FQwYtEV8FcXBWzZSgfrej8cO_G4jQhLo_pZAzNVp_0utQpu6Iz9.W9qsKqrOsiDsumO5ARhbfdny 21bF5vT2GMfhM9nb07VKYiscH3eOC3pQODzfNMNBO0XBlGp7yY6.gssKfOWfwuxybYGsFlGDt3ts XjGfmVVGQWjtWYlPo0NqJS19t_3DwFS0wOSN.l5jj87SQoqedKBH5FER1QIruQ.KIMZNZxOLvYs6 1ZB53_1YHBxc5MHkkQYeH.W8Lcsp2KUNQjNL8CzhTSWZdyH08.gq38JjYXITDGYoPok5lDW5R9WW dZ4phJDGN.BecjSrgEySDoLzWjNLPMuqtDFWAXvuQBCgOagU4jyjb8BZT35PXZ9Xnd9QcyHS.5O1 RbGNpxIHaw1qpDsEJNVyd6S1lfrFJXqlb8lfemv6q6EjsQDbEP567BsEZNl2KEEJ9Bzprc4AoQxN iIJKi_SdesWgAZIgSzSUIv9vYkocNcOSAPzsAQcj52RoyNqCi1dcgmKml7Wt5AjSDWhq4cCD6u.Q SW5AoD6lxRq4uraF1sgE- Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.gq1.yahoo.com with HTTP; Tue, 4 Aug 2020 23:52:45 +0000 Received: by smtp405.mail.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID b8817d404b5fc70bc236906a5de4c3dc; Tue, 04 Aug 2020 23:52:42 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: Re: aarch64: unable to use lang/gcc10 to use system libc++, unlike back with lang/gcc9, failure: __aarch64_ldadd8_acq_rel missing Date: Tue, 4 Aug 2020 16:52:42 -0700 References: To: freebsd-arm , FreeBSD Toolchain , FreeBSD Hackers In-Reply-To: Message-Id: <94FBD6B8-87E7-45E9-84F7-3F17D42F4BED@yahoo.com> X-Mailer: Apple Mail (2.3608.120.23.2.1) X-Rspamd-Queue-Id: 4BLs4v1zdvz43Yq X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.19 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.65.206:from]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; NEURAL_HAM_LONG(-1.01)[-1.008]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.206:from]; NEURAL_HAM_SHORT(-0.64)[-0.637]; NEURAL_HAM_MEDIUM(-1.04)[-1.044]; FROM_EQ_ENVFROM(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]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Aug 2020 23:52:48 -0000 On 2020-Aug-4, at 14:27, Mark Millard wrote: >=20 > Historically I've been able to use lang/gcc9 to build personal > aarch64 c++17 applications that used head's libc++ and the > like (other than some floating point support code for aarch64). > The redirection of g++9 to system libraries and such looks > like: >=20 > . . . > CXX+=3D -Wno-psabi -nostdinc -nostdinc++ = -I/usr/include/c++/v1 -I/usr/include > . . . > LDCXX=3D -nodefaultlibs -lc++ -lcxxrt -lthr -lm -lc -lgcc_s \ > -Wl,-rpath=3D/usr/local/lib/gcc9 > . . . > # Note: FreeBSD's libgcc_s were missing at least a floating point = routine. > # The -Wl,-rpath=3D/usr/local/lib/gcc9 causes use of gcc9's = libgcc_s . > # So far I've only had the issue for targeting aarch64 and = armv7. > . . . >=20 > I do not know if there is an intention to allow such things vs. if > I was just lucky that it worked at the time. Historically I've done > the same on powerpc64, 32-bit powerpc, and amd64 as well. On those no > -Wl,-rpath=3D... was required. Targeting armv7 did require use of > -Wl,-rpath=3D/usr/local/lib/gcc9 . >=20 >=20 >=20 > I've just tried the same sort of thing for using lang/gcc10 and > targeting aarch64 and it fails to build: >=20 > CXX+=3D -Wno-psabi -nostdinc -nostdinc++ = -I/usr/include/c++/v1 -I/usr/include > . . . > LDCXX=3D -nodefaultlibs -lc++ -lcxxrt -lthr -lm -lc -lgcc_s \ > -Wl,-rpath=3D/usr/local/lib/gcc10 >=20 > It ended up failing for: >=20 > /usr/local/bin/ld: ../objs/cpp_clockinfo-g++_10_O3-libc++.o: in = function `long = std::__1::__libcpp_atomic_refcount_decrement(long&)': > /usr/include/c++/v1/memory:3386: undefined reference to = `__aarch64_ldadd8_acq_rel' > /usr/local/bin/ld: ../objs/cpp_clockinfo-g++_10_O3-libc++.o: in = function `long = std::__1::__libcpp_atomic_refcount_increment(long&)': > /usr/include/c++/v1/memory:3375: undefined reference to = `__aarch64_ldadd8_relax' > /usr/local/bin/ld: ../objs/cpp_clockinfo-g++_10_O3-libc++.o: in = function `long = std::__1::__libcpp_atomic_refcount_decrement(long&)': > /usr/include/c++/v1/memory:3386: undefined reference to = `__aarch64_ldadd8_acq_rel' > /usr/local/bin/ld: /usr/include/c++/v1/memory:3386: undefined = reference to `__aarch64_ldadd8_acq_rel' > /usr/local/bin/ld: /usr/include/c++/v1/memory:3386: undefined = reference to `__aarch64_ldadd8_acq_rel' > /usr/local/bin/ld: /usr/include/c++/v1/memory:3386: undefined = reference to `__aarch64_ldadd8_acq_rel' > /usr/local/bin/ld: /usr/include/c++/v1/memory:3386: undefined = reference to `__aarch64_ldadd8_acq_rel' > /usr/local/bin/ld: = ../objs/cpp_clockinfo-g++_10_O3-libc++.o:/usr/include/c++/v1/memory:3386: = more undefined references to `__aarch64_ldadd8_acq_rel' follow > collect2: error: ld returned 1 exit status > *** Error code 1 >=20 > Stop. > make: stopped in /root/acpphint/acpphint_src >=20 > (Omitting -Wl,-rpath=3D/usr/local/lib/gcc10 made no difference.) >=20 > I did not have such an issue for powerpc64. I've not tried the > other platforms yet. >=20 >=20 > Anyone know if I'm out in "if it hurts, then do not do that" > land? Or is this something that should be possible but is > currently broken? >=20 >=20 > Note: The C++ source in question tries to be pure C++17 compliant > code for normal builds. (And I was doing a normal build: no FreeBSD > specific code or the like enabled.) I just tried lang/gcc9 ( -r543890 ports ) on a head -r363590 aarch64 based system, without -Wl,-rpath=3D/usr/local/lib/gcc9 used, and it still builds but at run-time programs get the likes of: ld-elf.so.1: = /root/acpphint/acpphint_kernelsurveyors_main-RPi4B-4096MiB-threads_4-LP64-= FreeBSD_13_r363590M_64bit-g++_9_O3-libc++: Undefined symbol = "__floatunditf@GCC_4.2.0" So that has not changed. This is a very different issue than what attempting to use lang/gcc10 gets. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)