Skip to content

Commit

Permalink
Modify GCC build to use binutils in /opt/gnu.
Browse files Browse the repository at this point in the history
  • Loading branch information
dslm4515 committed Apr 20, 2021
1 parent 902a2ba commit 340af56
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions 3-chroot/Optional-gcc
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ esac &&
# Create symlinks as GCC is not the primary system compiler
ln -sv /usr/include/zconf.h /opt/gnu/include/
ln -sv /usr/include/zlib .h /opt/gnu/include/
ln -sv /lib/libz.so.1.2.11 /opt/gnu/lib/
ln -sv /lib/libz.so.1.2.11 /opt/gnu/lib/libz.so
ln -sv /lib/libz.so.1.2.11 /opt/gnu/lib/libz.so.1
ln -sv /usr/lib/libc.so /opt/gnu/lib/libc.musl-x86_64.so.1
#ln -sv /lib/libz.so.1.2.11 /opt/gnu/lib/
#ln -sv /lib/libz.so.1.2.11 /opt/gnu/lib/libz.so
#ln -sv /lib/libz.so.1.2.11 /opt/gnu/lib/libz.so.1
#ln -sv /usr/lib/libc.so /opt/gnu/lib/libc.musl-x86_64.so.1

# Re-use the cross-toolchain used to build libelf.
# Make sure cross-tools' linker can find libraries in:
Expand Down Expand Up @@ -154,7 +154,7 @@ SED=sed libat_cv_have_ifunc=no \
--disable-sjlj-exceptions \
--disable-werror $EXTRA_CONFIG \
--with-mpc=/opt/gnu --with-gmp=/opt/gnu --with-mpfr=/opt/gnu \
--with-ld=/opt/gnu/bin/ld \
--with-ld=/opt/gnu/bin/ld --with-build-time-tools=/opt/gnu/bin \
--with-pkgversion="CMLFS 1.0" &&

make
Expand Down

2 comments on commit 340af56

@takusuman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just suggesting for the final system: what about doing it like Solaris and putting development tools at /usr/ccs? Or putting them at /usr/gnu, but linking against /usr/ccs?

@dslm4515
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only decided to add GCC to the final system because of libelf and grub. Both require GCC to build and I have not found alternatives.

I figured putting GCC in /opt/gnu would be good as GCC is an optional compiler. It makes it easy to remove GCC later.

Please sign in to comment.