From nobody Wed Jul 26 00:00:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R9Ytr1zSgz4pMjT; Wed, 26 Jul 2023 00:00:20 +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 4R9Ytr1477z44yY; Wed, 26 Jul 2023 00:00:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690329620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6JYlqYzafrl8qUUO16o4r1fVsL3a8OuoKAUIyDBK1vc=; b=Oa+Y4RhlsPpyIXVrdmwPGKQb67FHy3fTqlk0jzPyH6sUFRG2vv6Buvq0jf3I2Xd1LzNwva 1EK2Vemj6/v3f11lsyLdk382ulcgbgsLJTCnAh9buRfzRX2jwhlI3h6W5HN+pxpkEmi28g EtQVNPYOOLnkj39A0J9gbXz5f+ooU80OC/OxK+HTgBy1ca7zRgDEyb85PURB5nn4SXFHZL Df+HzfJhX+8IitSieGjyumNHjslk6KIu3HosRPh4UzGr55G4lJrbAZqUigdMeGy030uZTv glPktKJk/S9zTddvsGRnhtQtrPnIBw6/pMnM7ej0XyRNNMIOC+1eG9Xus//Egw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690329620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6JYlqYzafrl8qUUO16o4r1fVsL3a8OuoKAUIyDBK1vc=; b=wQxwcwRQigtslV8xPwW6+2H0niuOeIRYZI6AJMZwsFoNsnPT6mq31f7VTT57V82IhdSXan mgad+S86TSa1LN/CZ1eNNbLYKDuxFBE3PmVMC/WO8FuIdG/NIKzKDm8s/qY+yTB2ja7idB AOzutOEr8XFCYcokhuru1HlFxIfzWNpGsKP3Hqw31A0ZPiuDv9VxTCsamFw+RqzGsiBcmu ugy9O7z2qT4qlpg6As2bI06Lin9AUn/xaQxAA7VVFmu3K3OEuJNCxbYuB5X3d6Rkywpq99 TzL08LPKv0iKH1QOEcx08FisJiyMru5TvdLxz5eaZfMoaKOMI7pb+bHg0xB77w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690329620; a=rsa-sha256; cv=none; b=SUaJgbO0LuUCG0SDbBmQC+YOqdiRodkYg40+qJ+HVl8UiUFMtJnhhxxT9IBx1qGhsVKXCY 2ydHc9aiBHEgcDGRMNKuTYZDlB6QOF8LZYnfm0fWQnYpmbiU7eRr+TGm1idCQd4bwEBJk7 acULZgjlL97J38Ff1BfjsAYA+bbtWdVV045ZR/3NazyHeAJxabuAtzMhm+sRdnBHK/yW/9 yXPM71C+TdmI2lKLjoPWuZby6HnQPt4ZHNySAss6ply4qQrKR84oz6PpVNcuZE4NoqS5+W 7Y8726IaPgc0JpK8pM4NI2ogkY2kK8aNSu38WZX5v9PA/qOPXo2oJ2/U3z3oYQ== 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 4R9Ytr07pHzLhS; Wed, 26 Jul 2023 00:00:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36Q00JeT087356; Wed, 26 Jul 2023 00:00:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36Q00JLC087355; Wed, 26 Jul 2023 00:00:19 GMT (envelope-from git) Date: Wed, 26 Jul 2023 00:00:19 GMT Message-Id: <202307260000.36Q00JLC087355@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mike Karels Subject: git: 81250b9cc7ce - main - Makefile.inc1: add LIBCOMPAT_INCLUDE_DIRS to reduce arch ifdefs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: karels X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 81250b9cc7ced50d90c79e4000250db7197d2129 Auto-Submitted: auto-generated The branch main has been updated by karels: URL: https://cgit.FreeBSD.org/src/commit/?id=81250b9cc7ced50d90c79e4000250db7197d2129 commit 81250b9cc7ced50d90c79e4000250db7197d2129 Author: Mike Karels AuthorDate: 2023-07-25 23:58:29 +0000 Commit: Mike Karels CommitDate: 2023-07-25 23:58:29 +0000 Makefile.inc1: add LIBCOMPAT_INCLUDE_DIRS to reduce arch ifdefs In preparation for adding support for building lib32 on arm64, add a list of architecture-specific include directories, LIBCOMPAT_INCLUDE_DIRS, then replace the architecture-specific ifdefs throughout the file with simple loops. Another commit will add a definition of LIBCOMPAT_INCLUDE_DIRS for aarch64. Reviewed by: jrtc27 Differential Revision: https://reviews.freebsd.org/D40977 --- Makefile.inc1 | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 1e992b05c859..415bc41a6726 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -161,6 +161,10 @@ _t= ${TARGET_ARCH}/${TARGET} .endif .endfor +.if ${TARGET_ARCH} == "amd64" +LIBCOMPAT_INCLUDE_DIRS+= i386 +.endif + .if ${.MAKE.OS} != "FreeBSD" CROSSBUILD_HOST=${.MAKE.OS} .if ${.MAKE.OS} != "Linux" && ${.MAKE.OS} != "Darwin" @@ -1081,9 +1085,9 @@ _bootstrap-tools: -p ${WORLDTMP}/usr >/dev/null ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${WORLDTMP}/usr/include >/dev/null -.if ${TARGET_ARCH} == "amd64" - mkdir -p ${WORLDTMP}/usr/include/i386 -.endif +.for d in ${LIBCOMPAT_INCLUDE_DIRS} + mkdir -p ${WORLDTMP}/usr/include/${d} +.endfor ln -sf ${.CURDIR}/sys ${WORLDTMP} .if ${MK_DEBUG_FILES} != "no" ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ @@ -1416,9 +1420,9 @@ distributeworld installworld stageworld: _installcheck_world .PHONY -p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${DESTDIR}/${DISTDIR}/${dist}/usr/include >/dev/null -.if ${TARGET_ARCH} == "amd64" - -mkdir ${DESTDIR}/${DISTDIR}/${dist}/usr/include/i386 -.endif +.for d in ${LIBCOMPAT_INCLUDE_DIRS} + -mkdir ${DESTDIR}/${DISTDIR}/${dist}/usr/include/${d} +.endfor .if ${MK_DEBUG_FILES} != "no" ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib >/dev/null @@ -1447,9 +1451,9 @@ distributeworld installworld stageworld: _installcheck_world .PHONY sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG} ${IMAKEENV} ${DISTR_MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.include.dist | \ sed -e 's#^\./#./${dist}/usr/include/#' >> ${METALOG} -.if ${TARGET_ARCH} == "amd64" - echo "./${dist}/usr/include/i386 type=dir uname=root gname=wheel mode=0755" >> ${METALOG} -.endif +.for d in ${LIBCOMPAT_INCLUDE_DIRS} + echo "./${dist}/usr/include/${d} type=dir uname=root gname=wheel mode=0755" >> ${METALOG} +.endfor .for libcompat in ${libcompats} ${IMAKEENV} ${DISTR_MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist | \ sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG} @@ -2901,9 +2905,9 @@ native-xtools-install: .PHONY -p ${NXBDESTDIR}/usr >/dev/null ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${NXBDESTDIR}/usr/include >/dev/null -.if ${TARGET_ARCH} == "amd64" - mkdir -p ${NXBDESTDIR}/usr/include/i386 -.endif +.for d in ${LIBCOMPAT_INCLUDE_DIRS} + mkdir -p ${NXBDESTDIR}/usr/include/${d} +.endfor ${_+_}cd ${.CURDIR}; ${NXBMAKE} \ DESTDIR=${NXBDESTDIR} \ -DNO_ROOT \ @@ -3589,9 +3593,9 @@ _xi-mtree: .PHONY -p ${XDDESTDIR}/usr >/dev/null ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${XDDESTDIR}/usr/include >/dev/null -.if ${TARGET_ARCH} == "amd64" - mkdir -p ${XDDESTDIR}/usr/include/i386 -.endif +.for d in ${LIBCOMPAT_INCLUDE_DIRS} + mkdir -p ${XDDESTDIR}/usr/include/${d} +.endfor .for libcompat in ${libcompats} ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \ -p ${XDDESTDIR}/usr >/dev/null