From patchwork Mon Aug 24 15:55:01 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: 510137 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 3409E1401C7 for ; Tue, 25 Aug 2015 01:56:04 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=B7mzwEvs; 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=K/B X2JNFkxiKWuzNxysbZFv61NJfgBA89S4C+KAxcSG5szfQ+sFaR7BMAqNqYwcoZGU Vz0fA0HN2z+UdJaXEUQiu80wtCGSnOS3yaEk+E1j3givXbtaQm6GovzGI+fbB6ob ccTSlWdH2YJcXoBj9qtpoSpjXCghEN8J1IKnTV7s= 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=lf3wUOeTd 8OTrutskLbDElhjjc8=; b=B7mzwEvsMwFPSLVsd78MG/8zeRUaGMhHoG9lJm1UY ZYtmcy4GYtuoOzW48BsNMw96Y/Vlic6+ajVDbqyvjT0x0Sn4xya0x9TeiBygCFc1 FWFzmScTv0qWCH5p/Oey+HJYWncXncyCum/kuySXc+AloCxsvjbSHkpirb6Hv1tO y0= Received: (qmail 76797 invoked by alias); 24 Aug 2015 15:55:12 -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 76683 invoked by uid 89); 24 Aug 2015 15:55:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS, URIBL_BLACK autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients 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 15:55:05 +0000 Received: from localhost (localhost [127.0.0.1]) by bes.se.axis.com (Postfix) with ESMTP id B37812E0DC; Mon, 24 Aug 2015 17:55: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 V9QFcoH9UGNr; Mon, 24 Aug 2015 17:55: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 341952E0D5; Mon, 24 Aug 2015 17:55:02 +0200 (CEST) Received: from boulder.se.axis.com (localhost [127.0.0.1]) by postfix.imss71 (Postfix) with ESMTP id E406F144D; Mon, 24 Aug 2015 17:55:01 +0200 (CEST) Received: from thoth.se.axis.com (thoth.se.axis.com [10.0.2.173]) by boulder.se.axis.com (Postfix) with ESMTP id D6ACC1330; Mon, 24 Aug 2015 17:55:01 +0200 (CEST) Received: from ignucius.se.axis.com (ignucius.se.axis.com [10.88.21.50]) by thoth.se.axis.com (Postfix) with ESMTP id D3E8934005; Mon, 24 Aug 2015 17:55: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 t7OFt1Bc015338; Mon, 24 Aug 2015 17:55:01 +0200 Received: (from hp@localhost) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) id t7OFt1VI015330; Mon, 24 Aug 2015 17:55:01 +0200 Date: Mon, 24 Aug 2015 17:55:01 +0200 Message-Id: <201508241555.t7OFt1VI015330@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 (Goofed on the CC line, sorry for the dup.) 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,