From owner-dev-commits-src-all@freebsd.org Mon Jul 26 19:28:36 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E3C1A673A02; Mon, 26 Jul 2021 19:28:36 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GYVMm5qbQz3l72; Mon, 26 Jul 2021 19:28:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AE5161C7EF; Mon, 26 Jul 2021 19:28:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 16QJSaIL061079; Mon, 26 Jul 2021 19:28:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 16QJSaMw061078; Mon, 26 Jul 2021 19:28:36 GMT (envelope-from git) Date: Mon, 26 Jul 2021 19:28:36 GMT Message-Id: <202107261928.16QJSaMw061078@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: b0fa09a0a7e3 - main - linux(4): Fix amd64 gcc build. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b0fa09a0a7e30f301cc58750dedb3d88ec39992d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2021 19:28:37 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=b0fa09a0a7e30f301cc58750dedb3d88ec39992d commit b0fa09a0a7e30f301cc58750dedb3d88ec39992d Author: Dmitry Chagin AuthorDate: 2021-07-26 19:28:21 +0000 Commit: Dmitry Chagin CommitDate: 2021-07-26 19:28:21 +0000 linux(4): Fix amd64 gcc build. Do not specify memory model and mregparm for amd64, it's only available on IA-32 architecture. Reported by: jhb, jrtc27 MFC after: 2 weeks --- sys/modules/linux/Makefile | 8 +++++--- sys/modules/linux64/Makefile | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile index bf4449e0012e..373ec3dcae91 100644 --- a/sys/modules/linux/Makefile +++ b/sys/modules/linux/Makefile @@ -60,19 +60,21 @@ linux${SFX}_assym.h: linux${SFX}_genassym.o sh ${SYSDIR}/kern/genassym.sh linux${SFX}_genassym.o > ${.TARGET} .if ${MACHINE_CPUARCH} == "amd64" -VDSOFLAGS=-DCOMPAT_FREEBSD32 -DCOMPAT_LINUX32 -m32 -mcmodel=small +VDSOFLAGS=-DCOMPAT_FREEBSD32 -DCOMPAT_LINUX32 -m32 +.else +VDSOFLAGS=-mregparm=0 .endif linux${SFX}_locore.o: linux${SFX}_assym.h assym.inc ${CC} -c -x assembler-with-cpp -DLOCORE -fPIC -pipe -O2 -Werror \ - -msoft-float -mregparm=0 \ + -msoft-float \ -fno-common -nostdinc -fasynchronous-unwind-tables \ -fno-omit-frame-pointer -foptimize-sibling-calls ${VDSOFLAGS} \ -fno-stack-protector -I. -I${SYSDIR} -I${SRCTOP}/include \ ${.IMPSRC} -o ${.TARGET} linux${SFX}_vdso_gtod.o: linux_vdso_gtod.inc ${VDSODEPS} - ${CC} -c -fPIC -pipe -O2 -Werror -msoft-float -mregparm=0 \ + ${CC} -c -fPIC -pipe -O2 -Werror -msoft-float \ -fno-common -nostdinc -fasynchronous-unwind-tables \ -fno-omit-frame-pointer -foptimize-sibling-calls ${VDSOFLAGS} \ -fno-stack-protector -I. -I${SYSDIR} -I${SRCTOP}/include \ diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux64/Makefile index b85203a9ce93..17192b4f18aa 100644 --- a/sys/modules/linux64/Makefile +++ b/sys/modules/linux64/Makefile @@ -31,7 +31,7 @@ linux_assym.h: linux_genassym.o sh ${SYSDIR}/kern/genassym.sh linux_genassym.o > ${.TARGET} .if ${MACHINE_CPUARCH} == "amd64" -VDSOFLAGS=-mregparm=0 -mcmodel=small -msoft-float +VDSOFLAGS=-mcmodel=small -msoft-float VDSODEPS=linux_vdso_gettc_x86.inc .elif ${MACHINE_CPUARCH} == "aarch64" # The Linux uses tiny memory model, but our ld does not know about