From patchwork Wed Sep 20 23:31:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 816606 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-462659-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="sfHyCtax"; dkim-atps=neutral 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 3xyGGQ67Ncz9sPk for ; Thu, 21 Sep 2017 09:31:22 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=g+szTudk+2F4R4s/d2IgkOu2QtuDwWMvcO+9ozOlYDcoVk JYkUZHQgheTXIWaMSTA3TlJ8l+VmhU/WFdLxXyz+n93Iu+SWphM1iykbFzZAJwqT K5EbSvHRklP6YE/Yuy5BYTAwoJkrXb5X3w3piGFz/GJNHoYOpfiWgGPcPLv0s= 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 :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=E5o7/JsjR5M7MgqT8Aifx6PuMe8=; b=sfHyCtaxmIJi6weip4Oz ADvy0FEt8A+oBPZBKLCnn0Q0U7mHIEgVGTER+htPJV/XQibuggnVP5+IDPMWoptY h+Qig7tCEfT5tcDRrZxNEwSIlsGtc4S7LbGagFlgl/mElCTHYkxBUF4APwqj/djD rdDKsnWNHGT17GTfvUVqANA= Received: (qmail 59978 invoked by alias); 20 Sep 2017 23:31:13 -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 58168 invoked by uid 89); 20 Sep 2017 23:31:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=stamp, _, o X-HELO: mail-wm0-f45.google.com Received: from mail-wm0-f45.google.com (HELO mail-wm0-f45.google.com) (74.125.82.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 20 Sep 2017 23:31:09 +0000 Received: by mail-wm0-f45.google.com with SMTP id v142so11109464wmv.5 for ; Wed, 20 Sep 2017 16:31:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=fGZ68hdkizzkhgRfYWY+ZMLjtqAmBdQ9fHQV9u8iWyk=; b=LGK4KsswoSz1KM6RiopDBwveqSNknhVHWpUSTF2grSrSv2/a3O6DOyvoooDHwFrLK5 Q9817WgeGYJdh345K3c9qAvW3UO/Rgzu2rO9+ti/nP9HUKf2BKTEfr24VeUTlJYSuljt awa+BrJoyxNggf5VyrAER9OXdUaNTMQcE5dLKzi6FxzDx80PhaGrH0OI4fcPLPhHf0Ny Fsb0c1kj/rOkPlyS8Xp1VURKINxJz2Vt5rrBli15JYhvcS8VDJ8tE1EeQ4/Uh4w3J3Bx J8ao9dWSN8Zowj3x/3BRx3CKFRpXO4X/5FqvzbcsnFMqtATbnJPZL7eXTNWI/ck0Fw5b PuEQ== X-Gm-Message-State: AHPjjUgF7mO4FTumANvqM4GcW5biFZ1JYZNZx6mOEt+sOsQQxDLLUfAU rErVbWAJTznkMvsmhQJjEvx0Hw32+kZJbSNvIcd8kQ== X-Google-Smtp-Source: AOwi7QB27Ca98keHiMLVHMzwFB8nWlkzYGugx8c2kwQ6BJoWBpEsrbaVqHOJBwJt/aF2FGSF4VwiPt0xNtbJexWmEJE= X-Received: by 10.80.153.213 with SMTP id n21mr335372edb.28.1505950266791; Wed, 20 Sep 2017 16:31:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.179.240 with HTTP; Wed, 20 Sep 2017 16:31:05 -0700 (PDT) From: Ian Lance Taylor Date: Wed, 20 Sep 2017 16:31:05 -0700 Message-ID: Subject: libgo patch committed: Fix build with --enable-static=no To: gcc-patches , "gofrontend-dev@googlegroups.com" This patch to libgo fixes the build when configuring with --enable-static=no. It also ensures that a couple of .gox files that are only used for testing are built. Since they are only used for testing, nothing depends on them, so adding them to noinst_DATA makes sure they are built for the gotools tests. Bootstrapped and ran Go tests on x86_64-pc-linux-gnu both with and without --enable-static=no. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE =================================================================== --- gcc/go/gofrontend/MERGE (revision 253025) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -5deeab42b0e5fdf2721773ce7fdaf61716599d4d +1fcb9bb3cefb97cfab1e623826a1cc3f6aadd5f7 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: libgo/Makefile.am =================================================================== --- libgo/Makefile.am (revision 253025) +++ libgo/Makefile.am (working copy) @@ -395,6 +395,13 @@ toolexeclibgounicode_DATA = \ unicode/utf16.gox \ unicode/utf8.gox +# Some packages are only needed for tests, so unlike the other +# internal packages nothing will explicitly depend on them. +# Force them to be built. +noinst_DATA = \ + internal/testenv.gox \ + net/internal/socktest.gox + if LIBGO_IS_RTEMS rtems_task_variable_add_file = runtime/rtems-task-variable-add.c else @@ -573,7 +580,7 @@ s-runtime-inc: runtime.lo Makefile rm -f runtime.inc.tmp2 runtime.inc.tmp3 $(STAMP) $@ -noinst_DATA = zstdpkglist.go zdefaultcc.go +noinst_DATA += zstdpkglist.go zdefaultcc.go # Generate the list of go std packages that were included in libgo zstdpkglist.go: s-zstdpkglist; @true @@ -924,6 +931,12 @@ libgotool_a_SOURCES = libgotool_a_DEPENDENCIES = $(addsuffix .lo,$(GOTOOL_PACKAGES)) libgotool_a_LIBADD = $(addsuffix .o,$(GOTOOL_PACKAGES)) +define STATIC_template +$(subst -,_,$(subst .,_,$(subst /,_,$(1))))_GOCFLAGS = -static +endef + +$(foreach package,$(GOTOOL_PACKAGES),$(eval $(call STATIC_template,$(package).lo))) + # Make sure runtime.inc is built before compiling any .c file. $(libgo_la_OBJECTS): runtime.inc $(libgo_llgo_la_OBJECTS): runtime.inc