Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 595878 - amd64-fbsd/clang profile: pure clang support.
Summary: amd64-fbsd/clang profile: pure clang support.
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: Normal enhancement (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-02 08:57 UTC by Yuta SATOH
Modified: 2019-10-11 17:37 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
sample patch for profiles/arch/amd64-fbsd/clang/profile.bashrc (bug595878_profile.patch,755 bytes, patch)
2016-10-02 09:26 UTC, Yuta SATOH
Details | Diff
sample patch for eclass/freebsd.eclass (bug595878_freebsdeclass.patch,755 bytes, patch)
2016-10-02 09:27 UTC, Yuta SATOH
Details | Diff
sample patch for sys-auth/pambase-20101024-r2.ebuild (bug595878_pambase.patch,462 bytes, patch)
2016-10-02 10:24 UTC, Yuta SATOH
Details | Diff
sample patch for catalyst/targets/stage2/stage2-chroot.sh (bug595878_catalyst.patch,504 bytes, patch)
2016-10-02 12:29 UTC, Yuta SATOH
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuta SATOH 2016-10-02 08:57:09 UTC
You can create stages that does not contain sys-devel/gcc in the future.
Comment 1 Yuta SATOH 2016-10-02 09:26:55 UTC
Created attachment 448802 [details, diff]
sample patch for profiles/arch/amd64-fbsd/clang/profile.bashrc

Some packages will require more variables. e.g.) sys-libs/ncurses
BUILD_CC=clang
BUILD_CXX=clang++

error log)
>>> Compiling source in /var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0 ...
 * abi_x86_64.amd64_fbsd: running multilib-minimal_abi_src_compile
gmake -j5 -j1 sources
cd man && gmake DESTDIR="" RPATH_LIST="/usr/lib" sources
gmake[1]: Entering directory '/var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0-abi_x86_64.amd64_fbsd/ncurses/man'
/bin/bash /var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0/man/MKterminfo.sh /var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0/man/terminfo.head /var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0/man/../include/Caps /var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0/man/terminfo.tail >terminfo.5
gmake[1]: Leaving directory '/var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0-abi_x86_64.amd64_fbsd/ncurses/man'
cd include && gmake DESTDIR="" RPATH_LIST="/usr/lib" sources
gmake[1]: Entering directory '/var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0-abi_x86_64.amd64_fbsd/ncurses/include'
cat curses.head >curses.h
AWK=gawk /bin/bash /var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0/include/MKkey_defs.sh /var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0/include/Caps >>curses.h
/bin/bash -c 'if test "chtype" = "cchar_t" ; then cat /var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0/include/curses.wide >>curses.h ; fi'
cat /var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0/include/curses.tail >>curses.h
/bin/bash /var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0/include/MKhashsize.sh /var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0/include/Caps >hashsize.h
AWK=gawk /bin/bash /var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0/include/MKncurses_def.sh /var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0/include/ncurses_defs >ncurses_def.h
AWK=gawk /bin/bash /var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0/include/MKparametrized.sh /var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0/include/Caps >parametrized.h
touch config.h
gawk -f MKterm.h.awk /var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0/include/Caps > term.h
/bin/bash /var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0/include/edit_cfg.sh ../include/ncurses_cfg.h term.h
** edit: HAVE_TCGETATTR 1
** edit: HAVE_TERMIOS_H 1
** edit: HAVE_TERMIO_H 0
** edit: BROKEN_LINKER 0
gmake[1]: Leaving directory '/var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0-abi_x86_64.amd64_fbsd/ncurses/include'
cd ncurses && gmake DESTDIR="" RPATH_LIST="/usr/lib" sources
gmake[1]: Entering directory '/var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0-abi_x86_64.amd64_fbsd/ncurses/ncurses'
gawk -f /var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0/ncurses/tinfo/MKcodes.awk bigstrings=1 /var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0/ncurses/../include/Caps >codes.c
gcc -o make_hash -DHAVE_CONFIG_H -DUSE_BUILD_CC -I../ncurses -I/var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0/ncurses -I../include -I/var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0/ncurses/../include   -D_GNU_SOURCE  -O1 -pipe /var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0/ncurses/tinfo/make_hash.c
/bin/bash: gcc: command not found
gmake[1]: *** [Makefile:238: make_hash] Error 127
gmake[1]: Leaving directory '/var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0-abi_x86_64.amd64_fbsd/ncurses/ncurses'
gmake: *** [Makefile:115: sources] Error 2
 * ERROR: sys-libs/ncurses-6.0-r1::gentoo failed (compile phase):
 *   emake failed
Comment 2 Yuta SATOH 2016-10-02 09:27:54 UTC
Created attachment 448804 [details, diff]
sample patch for eclass/freebsd.eclass

sys-freebsd/* requires clang-cpp.
details please see https://bugs.gentoo.org/show_bug.cgi?id=478810#c6
Comment 3 Yuta SATOH 2016-10-02 10:24:01 UTC
Created attachment 448810 [details, diff]
sample patch for sys-auth/pambase-20101024-r2.ebuild

CPP=cpp is included in Makefile.
In order to use preprocessor of clang is a need to change.

Fix
Change to CPP=clang-cpp (need clang-cpp symlink)
Or set CPP=clang -E -x -c

Error log)
>>> Compiling source in /var/tmp/portage/sys-auth/pambase-20101024-r2/work/pambase-20101024 ...
gmake -j1 GIT=true DEBUG=no CRACKLIB=no PASSWDQC=yes CONSOLEKIT=no GNOME_KEYRING=no SELINUX=no MKTEMP=no PAM_SSH=no SHA512=no KRB5=no MINIMAL=no IMPLEMENTATION=openpam LINUX_PAM_VERSION=
cpp -traditional-cpp -P -include openpam-conf -include basic-conf -DLINUX_PAM_VERSION= -DHAVE_PASSWDQC=1 system-auth.in -o system-auth
gmake: cpp: Command not found
gmake: *** [Makefile:81: system-auth] Error 127
 * ERROR: sys-auth/pambase-20101024-r2::gentoo failed (compile phase):
 *   emake failed
Comment 4 Yuta SATOH 2016-10-02 12:29:00 UTC
Created attachment 448824 [details, diff]
sample patch for catalyst/targets/stage2/stage2-chroot.sh

You can make stages without gcc NOW.
Several steps are required.

echo '-*sys-devel/gcc' >> /usr/portage/profiles/arch/amd64-fbsd/clang/packages
gsed -i '/sys-devel\/gcc/d' /usr/portage/profiles/default/bsd/fbsd/packages.build

Apply attachment patch to catalyst.
And apply attachment patch to sys-auth/pambase...


In the future, I think that good solution as virtual/system-compiler than this bad way.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-10-11 17:37:20 UTC
*-fbsd is gone.