From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E91CB38A817F; Wed, 7 Dec 2022 12:50:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E91CB38A817F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670417440; bh=1BD0ft1GH+BZLf5o2DpaB4S7YB198nKVMHZ4D+0XA+g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eo5iOj37RyB+RAzglf3rmuySYxUIY7ZjPXrmbVYxAbcoWWcMdoqW8U15nt4NYFOIM KETxu39d4x5AmHDM60W/xAYz6P4InznHMBBJUvK1JYDuZ7Y2WaNVT72a80z6Dqw+AK u6niXqvKaK4qJTEEpHUE3h6G6UjvaE3BjQyWienM= From: "linzhuorong at huawei dot com" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/29835] Error compiling glibc multilib with --enable-static-pie option turned on Date: Wed, 07 Dec 2022 12:50:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: dynamic-link X-Bugzilla-Version: 2.38 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: linzhuorong at huawei dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29835 lin zhuorong changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|INVALID |--- --- Comment #8 from lin zhuorong --- (In reply to Fangrui Song from comment #3) > How do you configure your build? >=20 >=20 > mkdir -p out/arm && cd out/arm > ../../configure --prefix=3D/tmp/glibc/arm --host=3Darm-linux-gnueabihf > --enable-static-pie --enable-hardcoded-path-in-tests > make -j 60 # good >=20 > % grep pie_supported config.log > libc_cv_pie_supported=3Dyes > libc_cv_static_pie_supported=3Dno >=20 > Note that sysdeps/arm/configure.ac doesn't say > `AC_DEFINE(SUPPORT_STATIC_PIE)`, so I think static-pie for sysdeps/arm is > unsupported. >=20 >=20 > % cat a.c > const char *foo (void) > { > extern const char _DYNAMIC[] __attribute__((visibility("hidden"))); > return _DYNAMIC; > } > % arm-linux-gnueabihf-gcc -fpic -nostdlib -static-pie a.c > # good. Both -shared and -pie have .dynamic and define _DYNAMIC What version of gcc are you using? I used gcc 10.3.0 to compile the above a.c and also got the error undefined reference to '_DYNAMIC' --=20 You are receiving this mail because: You are on the CC list for the bug.=