Skip to content

Commit

Permalink
Add GCC_GNU_SHORT_TRIPLET for packages that use ...-solaris2 instead …
Browse files Browse the repository at this point in the history
…of ...-solaris2.11

Python would like to use this in installed pathnames.  Inspired by
omniosorg/omnios-build#3492
  • Loading branch information
Bill-Sommerfeld committed Feb 21, 2024
1 parent bb5f8fb commit 4184250
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion make-rules/ips.mk
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ PKG_VARS += MACH MACH32 MACH64
PKG_VARS += BUILD_VERSION OS_VERSION PKG_SOLARIS_VERSION
PKG_VARS += GNU_TRIPLET
PKG_VARS += GCC_GNU_TRIPLET
PKG_VARS += GCC_GNU_SHORT_TRIPLET
PKG_VARS += CONSOLIDATION
PKG_VARS += COMPONENT_VERSION IPS_COMPONENT_VERSION HUMAN_VERSION
PKG_VARS += COMPONENT_ARCHIVE_URL COMPONENT_PROJECT_URL COMPONENT_NAME
Expand Down Expand Up @@ -326,7 +327,8 @@ $(GENERATED).p5m: install $(GENERATE_EXTRA_DEPS)
$(PKGMOGRIFY) $(PKG_OPTIONS) /dev/fd/0 $(GENERATE_TRANSFORMS) | \
$(GSED) -e '/^$$/d' -e '/^#.*$$/d' \
-e '/\.la$$/d' \
-e 's/$(subst .,\.,$(GCC_GNU_TRIPLET))/$$(GCC_GNU_TRIPLET)/g' | \
-e 's/$(subst .,\.,$(GCC_GNU_TRIPLET))/$$(GCC_GNU_TRIPLET)/g' \
-e 's/$(subst .,\.,$(GCC_GNU_SHORT_TRIPLET))/$$(GCC_GNU_SHORT_TRIPLET)/g' | \
$(PKGFMT) -u | \
uniq | \
$(PKGFMT) | \
Expand Down
3 changes: 3 additions & 0 deletions make-rules/shared-macros.mk
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,9 @@ FC.gcc.64 = $(GCC_ROOT)/bin/gfortran
GCC_FULL_VERSION = $(shell $(GCC_ROOT)/bin/gcc -dumpversion)
# Since gcc-9 the GNU triplet is x86_64-pc-solaris2.11 instead of i386-pc-solaris2.11
GCC_GNU_TRIPLET = $(shell $(GCC_ROOT)/bin/gcc -dumpmachine)
GCC_GNU_TRIPLET = $(shell $(GCC_ROOT)/bin/gcc -dumpmachine)
# GCC triplet with shorter version ( ..-solaris2 rather than ..-solaris2.11)
GCC_GNU_SHORT_TRIPLET = $(shell $(GCC_ROOT)/bin/gcc -dumpmachine | /usr/bin/sed -E 's/\.[0-9]+$$//')
GCC_BINDIR = $(GCC_ROOT)/bin
GCC_LIBDIR.32 = $(GCC_ROOT)/lib
GCC_LIBDIR.64 = $(GCC_ROOT)/lib/$(MACH64)
Expand Down

0 comments on commit 4184250

Please sign in to comment.