Skip to content

Commit

Permalink
Merge pull request #3726 from citrus-it/gccfixed
Browse files Browse the repository at this point in the history
Stop shipping include-fixed with gcc
  • Loading branch information
oetiker authored Nov 11, 2024
2 parents ffce7b9 + de50c3b commit d0c792b
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 78 deletions.
5 changes: 1 addition & 4 deletions build/gcc10/local.mog
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,5 @@ link path=usr/share/man/man1/gfortran-$(MAJOR).1 \
link path=usr/share/man/man1/gccgo-$(MAJOR).1 \
target=/$(OPT)/share/man/man1/gccgo.1

# We do not want to ship gcc's "fixed" headers for aarch64 since they are
# broken there (for example, PATH_MAX is stripped from limits.h)
$(aarch64_ONLY)<transform path=$(OPT)/lib/gcc/[^/]+/$(GCCVER)/include-fixed \
-> drop>
<transform path=$(OPT)/lib/gcc/[^/]+/$(GCCVER)/include-fixed -> drop>

2 changes: 1 addition & 1 deletion build/gcc13/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ DESC="The GNU Compiler Collection"
GCCMAJOR=${VER%%.*}
OPT=/opt/gcc-$GCCMAJOR

XFORM_ARGS="-D MAJOR=$GCCMAJOR -D OPT=$OPT -D GCCVER=$VER"
XFORM_ARGS="-D MAJOR=$GCCMAJOR -D OPT=${OPT#/} -D GCCVER=$VER"
BMI_EXPECTED=1

PREFIX=$OPT
Expand Down
46 changes: 24 additions & 22 deletions build/gcc13/local.mog
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ license COPYING3 license=GPLv3
license COPYING3.LIB license=LGPLv3

# Mediated symlinks
<transform link target=$(OPT)/ -> default mediator gcc>
<transform link target=$(OPT)/ -> default mediator-version $(MAJOR)>
<transform link target=/$(OPT)/ -> default mediator gcc>
<transform link target=/$(OPT)/ -> default mediator-version $(MAJOR)>

link path=usr/bin/g++ target=$(OPT)/bin/g++
link path=usr/bin/gcc target=$(OPT)/bin/gcc
link path=usr/bin/gcov target=$(OPT)/bin/gcov
link path=usr/bin/gcpp target=$(OPT)/bin/cpp
link path=usr/bin/gfortran target=$(OPT)/bin/gfortran
link path=usr/bin/g++ target=/$(OPT)/bin/g++
link path=usr/bin/gcc target=/$(OPT)/bin/gcc
link path=usr/bin/gcov target=/$(OPT)/bin/gcov
link path=usr/bin/gcpp target=/$(OPT)/bin/cpp
link path=usr/bin/gfortran target=/$(OPT)/bin/gfortran

link path=usr/share/man/man1/g++.1 target=$(OPT)/share/man/man1/g++.1
link path=usr/share/man/man1/gcc.1 target=$(OPT)/share/man/man1/gcc.1
link path=usr/share/man/man1/gcov.1 target=$(OPT)/share/man/man1/gcov.1
link path=usr/share/man/man1/gcpp.1 target=$(OPT)/share/man/man1/cpp.1
link path=usr/share/man/man1/gfortran.1 target=$(OPT)/share/man/man1/gfortran.1
link path=usr/share/man/man1/g++.1 target=/$(OPT)/share/man/man1/g++.1
link path=usr/share/man/man1/gcc.1 target=/$(OPT)/share/man/man1/gcc.1
link path=usr/share/man/man1/gcov.1 target=/$(OPT)/share/man/man1/gcov.1
link path=usr/share/man/man1/gcpp.1 target=/$(OPT)/share/man/man1/cpp.1
link path=usr/share/man/man1/gfortran.1 target=/$(OPT)/share/man/man1/gfortran.1

# Symlinks to make the compiler tools available as xxx-13.
# These are not mediated.
Expand All @@ -39,16 +39,18 @@ link path=usr/share/man/man1/gfortran.1 target=$(OPT)/share/man/man1/gfortran.1
<transform link path=usr/.*-$(MAJOR)(\.1)?$ -> delete mediator-version .>
<transform link path=usr/.*-$(MAJOR)(\.1)?$ -> delete mediator-priority .>

link path=usr/bin/g++-$(MAJOR) target=$(OPT)/bin/g++
link path=usr/bin/gcc-$(MAJOR) target=$(OPT)/bin/gcc
link path=usr/bin/gcov-$(MAJOR) target=$(OPT)/bin/gcov
link path=usr/bin/gcpp-$(MAJOR) target=$(OPT)/bin/cpp
link path=usr/bin/gfortran-$(MAJOR) target=$(OPT)/bin/gfortran
link path=usr/bin/g++-$(MAJOR) target=/$(OPT)/bin/g++
link path=usr/bin/gcc-$(MAJOR) target=/$(OPT)/bin/gcc
link path=usr/bin/gcov-$(MAJOR) target=/$(OPT)/bin/gcov
link path=usr/bin/gcpp-$(MAJOR) target=/$(OPT)/bin/cpp
link path=usr/bin/gfortran-$(MAJOR) target=/$(OPT)/bin/gfortran

link path=usr/share/man/man1/g++-$(MAJOR).1 target=$(OPT)/share/man/man1/g++.1
link path=usr/share/man/man1/gcc-$(MAJOR).1 target=$(OPT)/share/man/man1/gcc.1
link path=usr/share/man/man1/gcov-$(MAJOR).1 target=$(OPT)/share/man/man1/gcov.1
link path=usr/share/man/man1/gcpp-$(MAJOR).1 target=$(OPT)/share/man/man1/cpp.1
link path=usr/share/man/man1/g++-$(MAJOR).1 target=/$(OPT)/share/man/man1/g++.1
link path=usr/share/man/man1/gcc-$(MAJOR).1 target=/$(OPT)/share/man/man1/gcc.1
link path=usr/share/man/man1/gcov-$(MAJOR).1 target=/$(OPT)/share/man/man1/gcov.1
link path=usr/share/man/man1/gcpp-$(MAJOR).1 target=/$(OPT)/share/man/man1/cpp.1
link path=usr/share/man/man1/gfortran-$(MAJOR).1 \
target=$(OPT)/share/man/man1/gfortran.1
target=/$(OPT)/share/man/man1/gfortran.1

<transform path=$(OPT)/lib/gcc/[^/]+/$(GCCVER)/include-fixed -> drop>

2 changes: 1 addition & 1 deletion build/gcc14/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ set_arch 64
set_ssp none
ARCH=${TRIPLETS[amd64]}

XFORM_ARGS="-D MAJOR=$GCCMAJOR -D OPT=$OPT -D GCCVER=$VER -D TRIPLET=$ARCH"
XFORM_ARGS="-D MAJOR=$GCCMAJOR -D OPT=${OPT#/} -D GCCVER=$VER -D TRIPLET=$ARCH"

# We're building the 64-bit version of the compiler and tools but we want
# to install it in the standard bin/lib locations. Gcc will take care of
Expand Down
55 changes: 29 additions & 26 deletions build/gcc14/local.mog
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ license COPYING3 license=GPLv3
license COPYING3.LIB license=LGPLv3

# Mediated symlinks
<transform link target=$(OPT)/ -> default mediator gcc>
<transform link target=$(OPT)/ -> default mediator-version $(MAJOR)>
<transform link target=$(OPT)/ -> default mediator-priority vendor>

link path=usr/bin/g++ target=$(OPT)/bin/g++
link path=usr/bin/gcc target=$(OPT)/bin/gcc
link path=usr/bin/gcov target=$(OPT)/bin/gcov
link path=usr/bin/gcpp target=$(OPT)/bin/cpp
link path=usr/bin/gfortran target=$(OPT)/bin/gfortran

link path=usr/share/man/man1/g++.1 target=$(OPT)/share/man/man1/g++.1
link path=usr/share/man/man1/gcc.1 target=$(OPT)/share/man/man1/gcc.1
link path=usr/share/man/man1/gcov.1 target=$(OPT)/share/man/man1/gcov.1
link path=usr/share/man/man1/gcpp.1 target=$(OPT)/share/man/man1/cpp.1
link path=usr/share/man/man1/gfortran.1 target=$(OPT)/share/man/man1/gfortran.1
<transform link target=/$(OPT)/ -> default mediator gcc>
<transform link target=/$(OPT)/ -> default mediator-version $(MAJOR)>
<transform link target=/$(OPT)/ -> default mediator-priority vendor>

link path=usr/bin/g++ target=/$(OPT)/bin/g++
link path=usr/bin/gcc target=/$(OPT)/bin/gcc
link path=usr/bin/gcov target=/$(OPT)/bin/gcov
link path=usr/bin/gcpp target=/$(OPT)/bin/cpp
link path=usr/bin/gfortran target=/$(OPT)/bin/gfortran

link path=usr/share/man/man1/g++.1 target=/$(OPT)/share/man/man1/g++.1
link path=usr/share/man/man1/gcc.1 target=/$(OPT)/share/man/man1/gcc.1
link path=usr/share/man/man1/gcov.1 target=/$(OPT)/share/man/man1/gcov.1
link path=usr/share/man/man1/gcpp.1 target=/$(OPT)/share/man/man1/cpp.1
link path=usr/share/man/man1/gfortran.1 target=/$(OPT)/share/man/man1/gfortran.1

# Symlinks to make the compiler tools available as xxx-14.
# These are not mediated.
Expand All @@ -40,19 +40,22 @@ link path=usr/share/man/man1/gfortran.1 target=$(OPT)/share/man/man1/gfortran.1
<transform link path=usr/.*-$(MAJOR)(\.1)?$ -> delete mediator-version .>
<transform link path=usr/.*-$(MAJOR)(\.1)?$ -> delete mediator-priority .>

link path=usr/bin/g++-$(MAJOR) target=$(OPT)/bin/g++
link path=usr/bin/gcc-$(MAJOR) target=$(OPT)/bin/gcc
link path=usr/bin/gcov-$(MAJOR) target=$(OPT)/bin/gcov
link path=usr/bin/gcpp-$(MAJOR) target=$(OPT)/bin/cpp
link path=usr/bin/gfortran-$(MAJOR) target=$(OPT)/bin/gfortran

link path=usr/share/man/man1/g++-$(MAJOR).1 target=$(OPT)/share/man/man1/g++.1
link path=usr/share/man/man1/gcc-$(MAJOR).1 target=$(OPT)/share/man/man1/gcc.1
link path=usr/share/man/man1/gcov-$(MAJOR).1 target=$(OPT)/share/man/man1/gcov.1
link path=usr/share/man/man1/gcpp-$(MAJOR).1 target=$(OPT)/share/man/man1/cpp.1
link path=usr/bin/g++-$(MAJOR) target=/$(OPT)/bin/g++
link path=usr/bin/gcc-$(MAJOR) target=/$(OPT)/bin/gcc
link path=usr/bin/gcov-$(MAJOR) target=/$(OPT)/bin/gcov
link path=usr/bin/gcpp-$(MAJOR) target=/$(OPT)/bin/cpp
link path=usr/bin/gfortran-$(MAJOR) target=/$(OPT)/bin/gfortran

link path=usr/share/man/man1/g++-$(MAJOR).1 target=/$(OPT)/share/man/man1/g++.1
link path=usr/share/man/man1/gcc-$(MAJOR).1 target=/$(OPT)/share/man/man1/gcc.1
link path=usr/share/man/man1/gcov-$(MAJOR).1 \
target=/$(OPT)/share/man/man1/gcov.1
link path=usr/share/man/man1/gcpp-$(MAJOR).1 target=/$(OPT)/share/man/man1/cpp.1
link path=usr/share/man/man1/gfortran-$(MAJOR).1 \
target=$(OPT)/share/man/man1/gfortran.1
target=/$(OPT)/share/man/man1/gfortran.1

link path=$(OPT)/lib/gcc/$(TRIPLET)/$(MAJOR) target=$(GCCVER)
link path=$(OPT)/include/c++/$(MAJOR) target=$(GCCVER)

<transform path=$(OPT)/lib/gcc/$(TRIPLET)/$(GCCVER)/include-fixed -> drop>

4 changes: 2 additions & 2 deletions build/gcc7/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# }}}
#
# Copyright 2014 OmniTI Computer Consulting, Inc. All rights reserved.
# Copyright 2023 OmniOS Community Edition (OmniOSce) Association.
# Copyright 2024 OmniOS Community Edition (OmniOSce) Association.

. ../../lib/build.sh

Expand All @@ -27,7 +27,7 @@ DESC="The GNU Compiler Collection"
GCCMAJOR=${VER%%.*}
OPT=/opt/gcc-$GCCMAJOR

XFORM_ARGS="-D MAJOR=$GCCMAJOR -D OPT=$OPT -D GCCVER=$VER"
XFORM_ARGS="-D MAJOR=$GCCMAJOR -D OPT=${OPT#/} -D GCCVER=$VER"
BMI_EXPECTED=1

# Build gcc with itself
Expand Down
46 changes: 24 additions & 22 deletions build/gcc7/local.mog
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ license COPYING3.LIB license=LGPLv3
<transform file path=$(OPT)/share/info -> drop>

# Mediated symlinks
<transform link target=$(OPT)/ -> default mediator gcc>
<transform link target=$(OPT)/ -> default mediator-version $(MAJOR)>
<transform link target=/$(OPT)/ -> default mediator gcc>
<transform link target=/$(OPT)/ -> default mediator-version $(MAJOR)>

link path=usr/bin/g++ target=$(OPT)/bin/g++
link path=usr/bin/gcc target=$(OPT)/bin/gcc
link path=usr/bin/gcov target=$(OPT)/bin/gcov
link path=usr/bin/gcpp target=$(OPT)/bin/cpp
link path=usr/bin/gfortran target=$(OPT)/bin/gfortran
link path=usr/bin/g++ target=/$(OPT)/bin/g++
link path=usr/bin/gcc target=/$(OPT)/bin/gcc
link path=usr/bin/gcov target=/$(OPT)/bin/gcov
link path=usr/bin/gcpp target=/$(OPT)/bin/cpp
link path=usr/bin/gfortran target=/$(OPT)/bin/gfortran

link path=usr/share/man/man1/g++.1 target=$(OPT)/share/man/man1/g++.1
link path=usr/share/man/man1/gcc.1 target=$(OPT)/share/man/man1/gcc.1
link path=usr/share/man/man1/gcov.1 target=$(OPT)/share/man/man1/gcov.1
link path=usr/share/man/man1/gcpp.1 target=$(OPT)/share/man/man1/cpp.1
link path=usr/share/man/man1/gfortran.1 target=$(OPT)/share/man/man1/gfortran.1
link path=usr/share/man/man1/g++.1 target=/$(OPT)/share/man/man1/g++.1
link path=usr/share/man/man1/gcc.1 target=/$(OPT)/share/man/man1/gcc.1
link path=usr/share/man/man1/gcov.1 target=/$(OPT)/share/man/man1/gcov.1
link path=usr/share/man/man1/gcpp.1 target=/$(OPT)/share/man/man1/cpp.1
link path=usr/share/man/man1/gfortran.1 target=/$(OPT)/share/man/man1/gfortran.1

# Symlinks to make the compiler tools available as xxx-7.
# These are not mediated.
Expand All @@ -42,16 +42,18 @@ link path=usr/share/man/man1/gfortran.1 target=$(OPT)/share/man/man1/gfortran.1
<transform link path=usr/.*-$(MAJOR)(\.1)?$ -> delete mediator-version .>
<transform link path=usr/.*-$(MAJOR)(\.1)?$ -> delete mediator-priority .>

link path=usr/bin/g++-$(MAJOR) target=$(OPT)/bin/g++
link path=usr/bin/gcc-$(MAJOR) target=$(OPT)/bin/gcc
link path=usr/bin/gcov-$(MAJOR) target=$(OPT)/bin/gcov
link path=usr/bin/gcpp-$(MAJOR) target=$(OPT)/bin/cpp
link path=usr/bin/gfortran-$(MAJOR) target=$(OPT)/bin/gfortran
link path=usr/bin/g++-$(MAJOR) target=/$(OPT)/bin/g++
link path=usr/bin/gcc-$(MAJOR) target=/$(OPT)/bin/gcc
link path=usr/bin/gcov-$(MAJOR) target=/$(OPT)/bin/gcov
link path=usr/bin/gcpp-$(MAJOR) target=/$(OPT)/bin/cpp
link path=usr/bin/gfortran-$(MAJOR) target=/$(OPT)/bin/gfortran

link path=usr/share/man/man1/g++-$(MAJOR).1 target=$(OPT)/share/man/man1/g++.1
link path=usr/share/man/man1/gcc-$(MAJOR).1 target=$(OPT)/share/man/man1/gcc.1
link path=usr/share/man/man1/gcov-$(MAJOR).1 target=$(OPT)/share/man/man1/gcov.1
link path=usr/share/man/man1/gcpp-$(MAJOR).1 target=$(OPT)/share/man/man1/cpp.1
link path=usr/share/man/man1/g++-$(MAJOR).1 target=/$(OPT)/share/man/man1/g++.1
link path=usr/share/man/man1/gcc-$(MAJOR).1 target=/$(OPT)/share/man/man1/gcc.1
link path=usr/share/man/man1/gcov-$(MAJOR).1 target=/$(OPT)/share/man/man1/gcov.1
link path=usr/share/man/man1/gcpp-$(MAJOR).1 target=/$(OPT)/share/man/man1/cpp.1
link path=usr/share/man/man1/gfortran-$(MAJOR).1 \
target=$(OPT)/share/man/man1/gfortran.1
target=/$(OPT)/share/man/man1/gfortran.1

<transform path=$(OPT)/lib/gcc/[^/]+/$(GCCVER)/include-fixed -> drop>

0 comments on commit d0c792b

Please sign in to comment.