From owner-svn-ports-all@freebsd.org Sat Mar 30 14:59:36 2019 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BCE61553F5D; Sat, 30 Mar 2019 14:59:36 +0000 (UTC) (envelope-from gerald@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B39B38B59A; Sat, 30 Mar 2019 14:59:35 +0000 (UTC) (envelope-from gerald@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8F53A186B9; Sat, 30 Mar 2019 14:59:35 +0000 (UTC) (envelope-from gerald@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2UExZit027005; Sat, 30 Mar 2019 14:59:35 GMT (envelope-from gerald@FreeBSD.org) Received: (from gerald@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2UExZot027004; Sat, 30 Mar 2019 14:59:35 GMT (envelope-from gerald@FreeBSD.org) Message-Id: <201903301459.x2UExZot027004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gerald set sender to gerald@FreeBSD.org using -f From: Gerald Pfeifer Date: Sat, 30 Mar 2019 14:59:35 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r497254 - in head/lang/gcc8: . files X-SVN-Group: ports-head X-SVN-Commit-Author: gerald X-SVN-Commit-Paths: in head/lang/gcc8: . files X-SVN-Commit-Revision: 497254 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B39B38B59A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Mar 2019 14:59:36 -0000 Author: gerald Date: Sat Mar 30 14:59:34 2019 New Revision: 497254 URL: https://svnweb.freebsd.org/changeset/ports/497254 Log: Backport r496295 | andreast | 2019-03-19 22:03:17 from lang/gcc8-devel: This commit brings multilib support for gcc on amd64. This means you can compile and execute 32-bit binaries with gcc. The gcc part will be upstreamed as soon as gcc trunk opens for new commits. On the release front, gcc8, we will merge this commit after a week or so. Added: head/lang/gcc8/files/patch-amd64-gcc-multilib-support (contents, props changed) Modified: head/lang/gcc8/Makefile Modified: head/lang/gcc8/Makefile ============================================================================== --- head/lang/gcc8/Makefile Sat Mar 30 14:42:52 2019 (r497253) +++ head/lang/gcc8/Makefile Sat Mar 30 14:59:34 2019 (r497254) @@ -3,6 +3,7 @@ PORTNAME= gcc PORTVERSION= 8.3.0 +PORTREVISION= 1 CATEGORIES= lang MASTER_SITES= GCC PKGNAMESUFFIX= ${SUFFIX} @@ -44,6 +45,8 @@ BOOTSTRAP_DESC= Build using a full bootstrap GRAPHITE_DESC= Support for Graphite loop optimizations .if exists(/usr/lib32/libc.so) +OPTIONS_DEFINE_amd64+= MULTILIB +OPTIONS_DEFAULT_amd64+= MULTILIB OPTIONS_DEFINE_powerpc64+= MULTILIB OPTIONS_DEFAULT_powerpc64+= MULTILIB MULTILIB_DESC= Build support for 32-bit and 64-bit targets @@ -137,7 +140,7 @@ post-stage: # Add target libraries and include files to packaging list. ${RM} ${WRKDIR}/PLIST.lib -.if ${ARCH} == powerpc64 && ${PORT_OPTIONS:MMULTILIB} +.if (${ARCH} == amd64 || ${ARCH} == powerpc64) && ${PORT_OPTIONS:MMULTILIB} ${MKDIR} ${STAGEDIR}${TARGLIB32} ${MV} ${STAGEDIR}${PREFIX}/lib/lib32 ${STAGEDIR}${TARGLIB32}/gcc${SUFFIX} .endif Added: head/lang/gcc8/files/patch-amd64-gcc-multilib-support ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/gcc8/files/patch-amd64-gcc-multilib-support Sat Mar 30 14:59:34 2019 (r497254) @@ -0,0 +1,73 @@ +--- UTC +Index: gcc/config.gcc +=================================================================== +--- gcc/config.gcc (revision 269726) ++++ gcc/config.gcc (working copy) +@@ -4925,8 +4925,11 @@ + ;; + i[34567]86-*-dragonfly* | x86_64-*-dragonfly*) + ;; +- i[34567]86-*-freebsd* | x86_64-*-freebsd*) ++ i[34567]86-*-freebsd*) + ;; ++ x86_64-*-freebsd*) ++ tmake_file="${tmake_file} i386/t-freebsd64" ++ ;; + ia64*-*-linux*) + ;; + +Index: gcc/config/i386/freebsd64.h +=================================================================== +--- gcc/config/i386/freebsd64.h (revision 269733) ++++ gcc/config/i386/freebsd64.h (working copy) +@@ -31,7 +31,7 @@ + + #undef LINK_SPEC + #define LINK_SPEC "\ +- %{m32:-m elf_i386_fbsd} \ ++ %{m32:-m elf_i386_fbsd}%{!m32:-m elf_x86_64_fbsd} \ + %{p:%nconsider using '-pg' instead of '-p' with gprof(1)} \ + %{v:-V} \ + %{assert*} %{R*} %{rpath*} %{defsym*} \ +@@ -42,3 +42,6 @@ + -dynamic-linker %(fbsd_dynamic_linker) } \ + %{static:-Bstatic}} \ + %{symbolic:-Bsymbolic}" ++ ++#undef MULTILIB_DEFAULTS ++#define MULTILIB_DEFAULTS { "m64" } +Index: gcc/config/i386/t-freebsd64 +=================================================================== +--- gcc/config/i386/t-freebsd64 (nonexistent) ++++ gcc/config/i386/t-freebsd64 (working copy) +@@ -0,0 +1,30 @@ ++# Copyright (C) 2019 Free Software Foundation, Inc. ++# ++# This file is part of GCC. ++# ++# GCC is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3, or (at your option) ++# any later version. ++# ++# GCC is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with GCC; see the file COPYING3. If not see ++# . ++ ++# The 32-bit libraries are found in /usr/lib32 ++ ++# To support i386 and x86-64, the directory structrue ++# should be: ++# ++# /lib has x86-64 libraries. ++# /lib32 has i386 libraries. ++# ++ ++MULTILIB_OPTIONS = m32 ++MULTILIB_DIRNAMES = 32 ++MULTILIB_OSDIRNAMES = ../lib32