From owner-freebsd-arm@freebsd.org Sat Oct 7 18:40:52 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92094E3EDC9 for ; Sat, 7 Oct 2017 18:40:52 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22c.google.com (mail-it0-x22c.google.com [IPv6:2607:f8b0:4001:c0b::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 20BB77CC31 for ; Sat, 7 Oct 2017 18:40:51 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22c.google.com with SMTP id 72so4984176itl.5 for ; Sat, 07 Oct 2017 11:40:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=leUO1kk6G4L2+9qM+BOYgDMY3zcfauHi4U09Dwj333o=; b=wzA56He8oZ5bTo2kY9pSwReXpDU99dPZVul7P4/9zQNlflD4D6mhySfhk9DmIcbJvz PnISaxGI2cZkqVu5edP73GQYgMTIV+vPcFZ1pkHbrJyAakm1ihd6KkJTI0K0kzQdO3xV cF5bLUZiZiFN19lRjE8I0pL2yodNeFTkXgll9Bij+OMOOdMZLCJiD2QfQ1pGOkz8ZKRu YPDRisgDA54u/QxwA2ildQqXVpWWUXbVmB69SADFki780Sgke4phG5RXsYmfnU5QV9hq 4xUT2ju1t6/UZ9rbSfsKOF1UidFUg8uuoSGAVlGctUocuvkh9oWOBVHSdJcy9j/6lXnA b4LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=leUO1kk6G4L2+9qM+BOYgDMY3zcfauHi4U09Dwj333o=; b=JW0RB2JEDr3FPhJYzRMFWNrgBaSFSLE3Rod5qMRwNu8ulRHw8Kmd+Q/2TdC29+Sgyz LHgISsHv2QoNTHpwC1z27JN6fL6t1xvUgYGen1WLPci5D0zAE4NOltMpFKQ+iKK+SIHg VXTeb3uQmlr8WTXUxKCKL9gU3TrnJX9EDu0pzD4Ij2gFVf8Pd6jmmDXCwAdLR6ljXtsI KHbaQ0vliqENGYyiWyGvXHihckRB9oLT3x6g1Ue5Vrqe2LqwtNbKnRv3L/mGNczqp34w usjpZarQIiV2hTZXwa8QNxZ9vt6bXgRE7fRDiuk31qc8XWWJ5WO/ZDJ3sWX+zvCmeqTQ fZQQ== X-Gm-Message-State: AMCzsaWUqeK+7yiio9N6FIS0aH3rA+OneL7O74REASj392w/5yBDylF6 xuiwYK4hf8kRHMBCGYoK8UG9XN5zii56FkpAMFykJQ== X-Google-Smtp-Source: AOwi7QDQBt5R5OGk+zo9AjoJ7gn1exKjQjwi6EWObnVb6wRCgfZrlRCA7AhT/KSB8d6I4FViGRsMbeZrsQXAkJ4mO34= X-Received: by 10.36.19.207 with SMTP id 198mr7247281itz.130.1507401651151; Sat, 07 Oct 2017 11:40:51 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.94.130 with HTTP; Sat, 7 Oct 2017 11:40:50 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:43b:1393:6fda:6aaa] In-Reply-To: References: From: Warner Losh Date: Sat, 7 Oct 2017 11:40:50 -0700 X-Google-Sender-Auth: 2fuiXFMmDPz5PdPgnGF4HcpEk0M Message-ID: Subject: Re: armv7, building p7zip and -fPIC To: Guy Yur Cc: freebsd-arm Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Oct 2017 18:40:52 -0000 On Sat, Oct 7, 2017 at 11:24 AM, Guy Yur wrote: > Hi, > > Does armv7 need -fPIC when compiling? > > Building archivers/p7zip fails with: > /usr/bin/ld: 7zEncode.o(.text+0x2d04): unresolvable R_ARM_MOVW_ABS_NC > relocation against symbol `_ZTIi@@CXXABI_1.3' > /usr/bin/ld: final link failed: Nonrepresentable section on output > c++: error: linker command failed with exit code 1 (use -v to see > invocation) > *** [../../../../bin/7z.so] Error code 1 > > make[3]: stopped in > /usr/wrkdir/usr/ports/archivers/p7zip/work/p7zip_16.02/CPP/7zip/Bundles/ > Format7zFree > 1 error > > If I add "CFLAGS_armv7= -fPIC" in the port Makefile it builds fine. > The port has -fPIC for aarch64, amd64, powerpc and sparc64. > > Is it a difference from armv6? > When I previously built for armv6 it worked without the option. > armv7 is new in FreeBSD (two days old), and maybe you are tripping over something inside the port that optimized for it? Is there a CFLAGS+armv6=-fPIC? I don't see it with a quick grep, but you never know... If that's what it takes to fix it, maybe you should submit that to the port maintainer? Warner