From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9697 Path: news.gmane.org!not-for-mail From: Michael McConville Newsgroups: gmane.linux.lib.musl.general Subject: Re: Add support for amd64 target Date: Sat, 19 Mar 2016 00:32:58 -0400 Message-ID: <20160319043258.GA10192@thinkpad.swarthmore.edu> References: <20160318023341.GB71208@thinkpad.swarthmore.edu> <20160318034622.GM21636@brightrain.aerifal.cx> <20160318035447.GB19612@thinkpad.swarthmore.edu> <20160318050823.GB8521@newbook> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: ger.gmane.org 1458362004 6402 80.91.229.3 (19 Mar 2016 04:33:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Mar 2016 04:33:24 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9710-gllmg-musl=m.gmane.org@lists.openwall.com Sat Mar 19 05:33:19 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1ah8Zi-000704-FP for gllmg-musl@m.gmane.org; Sat, 19 Mar 2016 05:33:18 +0100 Original-Received: (qmail 26415 invoked by uid 550); 19 Mar 2016 04:33:15 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 26392 invoked from network); 19 Mar 2016 04:33:14 -0000 X-Virus-Scanned: amavisd-new at kolabnow.com X-Spam-Flag: NO X-Spam-Score: -2.9 X-Spam-Level: X-Spam-Status: No, score=-2.9 tagged_above=-10 required=6.31 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, FREEMAIL_FROM=0.001, RP_MATCHES_RCVD=-0.001] autolearn=ham Content-Disposition: inline In-Reply-To: <20160318050823.GB8521@newbook> Xref: news.gmane.org gmane.linux.lib.musl.general:9697 Archived-At: Isaac Dunham wrote: > > On what seems to be the final link command (judged from the number of > > object files involved), I get this: > > > > > obj/src/aio/aio.lo: In function `aio_cancel64': > > > aio.c:(.text.aio_cancel+0x19): undefined reference to `__guard_local' > > > /usr/bin/ld: obj/src/aio/aio.lo: relocation R_X86_64_PC32 against `__guard_local' can not be used when making a shared object; recompile with -fPIC > > > /usr/bin/ld: final link failed: Bad value > > > collect2: ld returned 1 exit status > > > Makefile:163: recipe for target 'lib/libc.so' failed > > > gmake: *** [lib/libc.so] Error 1 > > > > We have some unique PIE features on by default, so this doesn't surprise > > me. > > This means that you've got OpenBSD SSP turned on. > > It's no surprise that this doesn't work; for an overview of some trouble > spots, I'll mention this link: > > http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20130603/176378.html > > Try turning it off (-fno-stack-protector or equivalent) for starters. > Long-term, a proper port might require patching musl to support OpenBSD > SSP. Thanks for the input! The LLVM mail is very useful. musl links and completes the build successfully with -fno-stack-protector. I was hesitant to even try that because (IIUC) a libc port with the stack protector disabled definitely wouldn't fly. A cursory grep suggests that we only build four ports with -fno-stack-protector. > By the way, is this the stock OpenBSD GCC 4.2? It is. For ports, we use it whenever possible, switching to the Clang or GCC 4.9 port when something build no longer works with the base compiler.