From owner-svn-ports-all@freebsd.org Wed Nov 25 17:49:36 2020 Return-Path: Delivered-To: svn-ports-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 D27824705B4; Wed, 25 Nov 2020 17:49:36 +0000 (UTC) (envelope-from pkubaj@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ch7gh5byFz3ntZ; Wed, 25 Nov 2020 17:49:36 +0000 (UTC) (envelope-from pkubaj@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 B352215254; Wed, 25 Nov 2020 17:49:36 +0000 (UTC) (envelope-from pkubaj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0APHnaV4021764; Wed, 25 Nov 2020 17:49:36 GMT (envelope-from pkubaj@FreeBSD.org) Received: (from pkubaj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0APHnaMr021761; Wed, 25 Nov 2020 17:49:36 GMT (envelope-from pkubaj@FreeBSD.org) Message-Id: <202011251749.0APHnaMr021761@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkubaj set sender to pkubaj@FreeBSD.org using -f From: Piotr Kubaj Date: Wed, 25 Nov 2020 17:49:36 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r556299 - in head/lang/quickjs: . files X-SVN-Group: ports-head X-SVN-Commit-Author: pkubaj X-SVN-Commit-Paths: in head/lang/quickjs: . files X-SVN-Commit-Revision: 556299 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.34 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: Wed, 25 Nov 2020 17:49:36 -0000 Author: pkubaj Date: Wed Nov 25 17:49:35 2020 New Revision: 556299 URL: https://svnweb.freebsd.org/changeset/ports/556299 Log: lang/quickjs: fix build on GCC architectures Don't use Clang if we need to use GCC PR: 251030 Approved by: yuri (maintainer timeout) MFH: 2020Q4 (fix build blanket) Added: head/lang/quickjs/files/extra-clang-patch-Makefile - copied unchanged from r556298, head/lang/quickjs/files/patch-Makefile head/lang/quickjs/files/extra-gcc-patch-Makefile - copied, changed from r554856, head/lang/quickjs/files/patch-Makefile Deleted: head/lang/quickjs/files/patch-Makefile Modified: head/lang/quickjs/Makefile Modified: head/lang/quickjs/Makefile ============================================================================== --- head/lang/quickjs/Makefile Wed Nov 25 17:43:33 2020 (r556298) +++ head/lang/quickjs/Makefile Wed Nov 25 17:49:35 2020 (r556299) @@ -11,6 +11,16 @@ COMMENT= Embeddable Javascript interpreter in C LICENSE= MIT -USES= gmake tar:xz +USES= compiler:c11 gmake tar:xz -.include +EXTRA_PATCHES= ${FILESDIR}/extra-${CHOSEN_COMPILER_TYPE}-patch-Makefile + +.include + +.if ${CHOSEN_COMPILER_TYPE} == gcc +post-patch: + @${REINPLACE_CMD} -e 's/%%GCC_DEFAULT%%/${GCC_DEFAULT}/' \ + ${WRKSRC}/Makefile +.endif + +.include Copied: head/lang/quickjs/files/extra-clang-patch-Makefile (from r556298, head/lang/quickjs/files/patch-Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/quickjs/files/extra-clang-patch-Makefile Wed Nov 25 17:49:35 2020 (r556299, copy of r556298, head/lang/quickjs/files/patch-Makefile) @@ -0,0 +1,25 @@ +--- Makefile.orig 2019-09-18 18:34:20 UTC ++++ Makefile +@@ -25,6 +25,9 @@ + ifeq ($(shell uname -s),Darwin) + CONFIG_DARWIN=y + endif ++ifeq ($(shell uname -s),FreeBSD) ++CONFIG_FREEBSD=y ++endif + # Windows cross compilation from Linux + #CONFIG_WIN32=y + # use link time optimization (smaller and faster executables but slower build) +@@ -38,6 +41,12 @@ ifdef CONFIG_DARWIN + # use clang instead of gcc + CONFIG_CLANG=y + CONFIG_DEFAULT_AR=y ++endif ++ifdef CONFIG_FREEBSD ++# use clang instead of gcc ++CONFIG_CLANG=y ++CONFIG_DEFAULT_AR=y ++CONFIG_LTO= + endif + + # installation directory Copied and modified: head/lang/quickjs/files/extra-gcc-patch-Makefile (from r554856, head/lang/quickjs/files/patch-Makefile) ============================================================================== --- head/lang/quickjs/files/patch-Makefile Tue Nov 10 20:04:49 2020 (r554856, copy source) +++ head/lang/quickjs/files/extra-gcc-patch-Makefile Wed Nov 25 17:49:35 2020 (r556299) @@ -1,4 +1,4 @@ ---- Makefile.orig 2019-09-18 18:34:20 UTC +--- Makefile.orig 2020-09-06 09:31:51 UTC +++ Makefile @@ -25,6 +25,9 @@ ifeq ($(shell uname -s),Darwin) @@ -10,16 +10,27 @@ # Windows cross compilation from Linux #CONFIG_WIN32=y # use link time optimization (smaller and faster executables but slower build) -@@ -38,6 +41,12 @@ ifdef CONFIG_DARWIN - # use clang instead of gcc +@@ -39,6 +42,12 @@ ifdef CONFIG_DARWIN CONFIG_CLANG=y CONFIG_DEFAULT_AR=y -+endif + endif +ifdef CONFIG_FREEBSD +# use clang instead of gcc -+CONFIG_CLANG=y ++CONFIG_CLANG= +CONFIG_DEFAULT_AR=y +CONFIG_LTO= - endif ++endif # installation directory + prefix=/usr/local +@@ -81,8 +90,8 @@ ifdef CONFIG_CLANG + endif + endif + else +- HOST_CC=gcc +- CC=$(CROSS_PREFIX)gcc ++ HOST_CC=gcc%%GCC_DEFAULT%% ++ CC=$(CROSS_PREFIX)gcc%%GCC_DEFAULT%% + CFLAGS=-g -Wall -MMD -MF $(OBJDIR)/$(@F).d + CFLAGS += -Wno-array-bounds -Wno-format-truncation + ifdef CONFIG_LTO