Skip to content

Commit 4184250

Browse files
Add GCC_GNU_SHORT_TRIPLET for packages that use ...-solaris2 instead of ...-solaris2.11
Python would like to use this in installed pathnames. Inspired by omniosorg/omnios-build#3492
1 parent bb5f8fb commit 4184250

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

make-rules/ips.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ PKG_VARS += MACH MACH32 MACH64
104104
PKG_VARS += BUILD_VERSION OS_VERSION PKG_SOLARIS_VERSION
105105
PKG_VARS += GNU_TRIPLET
106106
PKG_VARS += GCC_GNU_TRIPLET
107+
PKG_VARS += GCC_GNU_SHORT_TRIPLET
107108
PKG_VARS += CONSOLIDATION
108109
PKG_VARS += COMPONENT_VERSION IPS_COMPONENT_VERSION HUMAN_VERSION
109110
PKG_VARS += COMPONENT_ARCHIVE_URL COMPONENT_PROJECT_URL COMPONENT_NAME
@@ -326,7 +327,8 @@ $(GENERATED).p5m: install $(GENERATE_EXTRA_DEPS)
326327
$(PKGMOGRIFY) $(PKG_OPTIONS) /dev/fd/0 $(GENERATE_TRANSFORMS) | \
327328
$(GSED) -e '/^$$/d' -e '/^#.*$$/d' \
328329
-e '/\.la$$/d' \
329-
-e 's/$(subst .,\.,$(GCC_GNU_TRIPLET))/$$(GCC_GNU_TRIPLET)/g' | \
330+
-e 's/$(subst .,\.,$(GCC_GNU_TRIPLET))/$$(GCC_GNU_TRIPLET)/g' \
331+
-e 's/$(subst .,\.,$(GCC_GNU_SHORT_TRIPLET))/$$(GCC_GNU_SHORT_TRIPLET)/g' | \
330332
$(PKGFMT) -u | \
331333
uniq | \
332334
$(PKGFMT) | \

make-rules/shared-macros.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,9 @@ FC.gcc.64 = $(GCC_ROOT)/bin/gfortran
650650
GCC_FULL_VERSION = $(shell $(GCC_ROOT)/bin/gcc -dumpversion)
651651
# Since gcc-9 the GNU triplet is x86_64-pc-solaris2.11 instead of i386-pc-solaris2.11
652652
GCC_GNU_TRIPLET = $(shell $(GCC_ROOT)/bin/gcc -dumpmachine)
653+
GCC_GNU_TRIPLET = $(shell $(GCC_ROOT)/bin/gcc -dumpmachine)
654+
# GCC triplet with shorter version ( ..-solaris2 rather than ..-solaris2.11)
655+
GCC_GNU_SHORT_TRIPLET = $(shell $(GCC_ROOT)/bin/gcc -dumpmachine | /usr/bin/sed -E 's/\.[0-9]+$$//')
653656
GCC_BINDIR = $(GCC_ROOT)/bin
654657
GCC_LIBDIR.32 = $(GCC_ROOT)/lib
655658
GCC_LIBDIR.64 = $(GCC_ROOT)/lib/$(MACH64)

0 commit comments

Comments
 (0)