From patchwork Sat Dec 7 19:51:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Stewart X-Patchwork-Id: 1205516 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=paral.in Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47Vg8N61Qqz9sPK for ; Sun, 8 Dec 2019 06:52:04 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id A8ED9203AF; Sat, 7 Dec 2019 19:52:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KRU-qimAkqGK; Sat, 7 Dec 2019 19:51:58 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 7FBEA20337; Sat, 7 Dec 2019 19:51:58 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 949CC1BF379 for ; Sat, 7 Dec 2019 19:51:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8FA35875BC for ; Sat, 7 Dec 2019 19:51:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C-2EUOWuuWDf for ; Sat, 7 Dec 2019 19:51:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by hemlock.osuosl.org (Postfix) with ESMTPS id 112988738B for ; Sat, 7 Dec 2019 19:51:57 +0000 (UTC) Received: by mail-pg1-f193.google.com with SMTP id z124so5024657pgb.13 for ; Sat, 07 Dec 2019 11:51:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dlRxCPiqJhrSwGuz85ZMZVJ9L8M5UFelv1vWqs/i11Y=; b=bSeT3DwjWqAwHjaFe0VdKcRON2+IRvp+i5a0J+mHHYMMvtzX2Qcz0pDwe20uNTA66W GAzKRknYkO7mBPfB8Hzt1EBb1S7wTCUioHU7gxyT2c4txQ1BgjdzMsR+P64pIqhj9i4X PhGafqJFL7cWpcH2mua3lMjPmdwS9TQlgIf2lwNVI07AhA/SeSPq9NDOnEqsYmfrbQ7l KdpQL440ZA6eoiwgupGydaLvGzxoihQzuvZ7HKvEpFhOvJhEvrS5vYhLkMErnRJ4H2tJ MK+xfCoYP2oO4WSSkSyjPRXGyHhkxwW9SmAkRKG+qBqrh4j8ahHv6PqZb2C1exR8PZqf C+sw== X-Gm-Message-State: APjAAAWf4QwabEg7CrA3eK0X0BhTr13SMq81aZRNXKCYGP3jwoidZ5XC 5woeiLPgtVuPfs3bdtW8rdAl+Md0rRk= X-Google-Smtp-Source: APXvYqxQy0J9Wk6UfFHIDt7INEntDeZTAgC8XIEKo4ihhYhuGvN54nBLAPBtmMl1NiQqO2/aCxwPjw== X-Received: by 2002:a63:1119:: with SMTP id g25mr2844998pgl.359.1575748315957; Sat, 07 Dec 2019 11:51:55 -0800 (PST) Received: from localhost.localdomain (c-24-4-44-62.hsd1.ca.comcast.net. [24.4.44.62]) by smtp.gmail.com with ESMTPSA id z10sm19673207pgg.39.2019.12.07.11.51.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Dec 2019 11:51:54 -0800 (PST) From: Christian Stewart To: buildroot@buildroot.org Date: Sat, 7 Dec 2019 11:51:52 -0800 Message-Id: <20191207195152.3781664-1-christian@paral.in> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v1 1/1] package/pkg-golang: enable trimpath option for reproducible builds X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Korsgaard , Christian Stewart , Anisse Astier , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The -trimpath option removes absolute build paths from the target binary. This results in more consistent / reproducible builds across different systems with varying paths to Buildroot. Signed-off-by: Christian Stewart --- package/pkg-golang.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/pkg-golang.mk b/package/pkg-golang.mk index e47de17aba..98f903604c 100644 --- a/package/pkg-golang.mk +++ b/package/pkg-golang.mk @@ -61,6 +61,7 @@ $(2)_WORKSPACE ?= _gopath $(2)_BUILD_OPTS += \ -ldflags "$$($(2)_LDFLAGS)" \ -tags "$$($(2)_TAGS)" \ + -trimpath \ -p $(PARALLEL_JOBS) # Target packages need the Go compiler on the host.