From patchwork Mon Aug 24 15:54:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Peter Nilsson X-Patchwork-Id: 510139 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 17C321401C7 for ; Tue, 25 Aug 2015 02:00:14 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=aN6ozd/u; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :message-id:from:to:cc:in-reply-to:subject:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=gbY d1sD/LUKPV+pdaTMw7IKgx58m1dJmaN8Lydg3HqlpRqHOcYLTQA0TCA/SkuwTcRc RYAz+X7RdKWmBbv6ffK/eG6mAY9IuX9XEOoPL15klfKc9G/+Y062EHDEByNzEngJ lhOof1hTn8f+O0TNaWBCgGiAJzqgomfx7w909RQ0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :message-id:from:to:cc:in-reply-to:subject:mime-version :content-type:content-transfer-encoding; s=default; bh=ozTddMNYn wKzTOJD8fHEOgTH+lY=; b=aN6ozd/uVvyTFqPi9VESQb79DhizIIYAudII+Fce3 HPwxb4NCsvXAf93HPpahl9OevVaht+Z+lcRcKnWRt46wX/9GXgOEX1hmemGkK5// +ucAeMb70tlUekObDbXHvv9ARbVUv0V8exn5y/PFO9g/y2lblAT6olqWcx3DonyG 8E= Received: (qmail 118714 invoked by alias); 24 Aug 2015 16:00:06 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 118686 invoked by uid 89); 24 Aug 2015 16:00:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL, BAYES_50, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS, URIBL_BLACK autolearn=no version=3.3.2 X-HELO: bes.se.axis.com Received: from bes.se.axis.com (HELO bes.se.axis.com) (195.60.68.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 24 Aug 2015 16:00:04 +0000 Received: from localhost (localhost [127.0.0.1]) by bes.se.axis.com (Postfix) with ESMTP id 4A6CE2E0D8; Mon, 24 Aug 2015 18:00:02 +0200 (CEST) Received: from bes.se.axis.com ([IPv6:::ffff:127.0.0.1]) by localhost (bes.se.axis.com [::ffff:127.0.0.1]) (amavisd-new, port 10024) with LMTP id gTd+9sr401Yy; Mon, 24 Aug 2015 18:00:02 +0200 (CEST) Received: from boulder.se.axis.com (boulder.se.axis.com [10.0.2.104]) by bes.se.axis.com (Postfix) with ESMTP id ECDC12E0AC; Mon, 24 Aug 2015 18:00:01 +0200 (CEST) Received: from boulder.se.axis.com (localhost [127.0.0.1]) by postfix.imss71 (Postfix) with ESMTP id CC9FE1452; Mon, 24 Aug 2015 18:00:01 +0200 (CEST) Received: from seth.se.axis.com (seth.se.axis.com [10.0.2.172]) by boulder.se.axis.com (Postfix) with ESMTP id BCA95607; Mon, 24 Aug 2015 18:00:01 +0200 (CEST) Received: from ignucius.se.axis.com (ignucius.se.axis.com [10.88.21.50]) by seth.se.axis.com (Postfix) with ESMTP id B9CCA3E049; Mon, 24 Aug 2015 18:00:01 +0200 (CEST) Received: from ignucius.se.axis.com (localhost [127.0.0.1]) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) with ESMTP id t7OG01Bc015489; Mon, 24 Aug 2015 18:00:01 +0200 Received: (from hp@localhost) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) id t7OFsAPI015257; Mon, 24 Aug 2015 17:54:10 +0200 Date: Mon, 24 Aug 2015 17:54:10 +0200 Message-Id: <201508241554.t7OFsAPI015257@ignucius.se.axis.com> From: Hans-Peter Nilsson To: gcc-patches@gcc.gnu.org CC: ubizjak@gmail.com, "ian@airs.com.fortran"@gcc.gnu.org In-reply-to: (message from FX on Fri, 14 Aug 2015 16:18:54 +0200) Subject: Fix libbacktrace -fPIC breakage from "Use libbacktrace in libgfortran" MIME-Version: 1.0 There exists targets that support fortran but error on -fPIC, for example cris-elf, which broke with the libbacktrace thingy. (Emitting an error for -fPIC is a conscious choice; a compilation error is better than e.g. to silently ignoring it.) This fix causes build to pass the point of error for cris-elf. Borderline obvious, but... Ok to regtest passes on a native x86_64-linux? libbacktrace: configure.ac: Only compile with -fPIC if the target supports it. brgds, H-P diff -upr /expvol/pp_slask/hp/checkout/gcchead/gcc/libbacktrace/configure.ac libbacktrace/configure.ac --- /expvol/pp_slask/hp/checkout/gcchead/gcc/libbacktrace/configure.ac 2015-05-29 17:23:20.000000000 +0200 +++ libbacktrace/configure.ac 2015-08-24 17:31:18.000000000 +0200 @@ -163,10 +163,11 @@ fi # When building as a target library, shared libraries may want to link # this in. We don't want to provide another shared library to -# complicate dependencies. Instead, we just compile with -fPIC. +# complicate dependencies. Instead, we just compile with -fPIC, if +# the target supports compiling a function with that option. PIC_FLAG= if test -n "${with_target_subdir}"; then - PIC_FLAG=-fPIC + AC_TRY_COMPILE([void foo(void){}], [PIC_FLAG=-fPIC]) fi # Similarly, use -fPIC with --enable-host-shared: AC_ARG_ENABLE(host-shared,