[Bug 258811] print/texinfo: respect CC

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 30 Sep 2021 16:47:13 UTC

            Bug ID: 258811
           Summary: print/texinfo: respect CC
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: sunpoet@FreeBSD.org
          Reporter: evgeniy@khramtsov.org
             Flags: maintainer-feedback?(sunpoet@FreeBSD.org)
          Assignee: sunpoet@FreeBSD.org

Created attachment 228290
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=228290&action=edit
v1 (use "git am")

print/texinfo uses both CC values by default:

1. For itself, taken from $CC:

2. For Perl extension (XS) modules, taken from Perl, unless PERL_EXT_CC is

If one wants to build a compiler (e.g. devel/llvm13) from ports while not
having base compiler (cc)
and using Perl built using older compiler which no longer exists (or, while
having no base cc when using devel/llvm12 and Perl bootstrapped from
pkg.FreeBSD.org), then a mismatch will happen, e.g.:

checking whether the compiler supports GNU C... yes
checking whether /usr/local/llvm13/bin/clang accepts -g... yes
checking for /usr/local/llvm13/bin/clang option to enable C11 features... none
checking whether /usr/local/llvm13/bin/clang understands -c and -o together...
checking whether the compiler is clang... yes

checking for perl... (cached) /usr/local/bin/perl
checking Perl configuration value cc... /usr/local/llvm12/bin/clang
checking Perl configuration value ccflags... -DHAS_FPSETMASK
-fstack-protector-strong -I/usr/local/include
checking Perl configuration value cccdlflags... -DPIC -fPIC
checking Perl configuration value optimize... -O2 -pipe -O3 -mtune=skylake
-mbranches-within-32B-boundaries -fstack-protector-all -fPIE -fPIC
checking Perl configuration value ccdlflags... 
checking Perl configuration value libperl... libperl.so.5.32.1
checking Perl configuration value archlibexp... /usr/local/lib/perl5/5.32/mach
checking Perl configuration value privlibexp... /usr/local/lib/perl5/5.32
checking for gcc... /usr/local/llvm12/bin/clang
checking whether the C compiler works... no
configure: error: in
configure: error: C compiler cannot create executables
See `config.log' for more details
configure: error: ./configure failed for tp/Texinfo/XS
configure: building Perl extension (XS) modules will be disabled

Respect CC using PERL_EXT_CC environment variable to avoid chicken and egg

Sorry for not leaving a short reproducer, I'll get back to submitting a
reproducer later after finishing some of my other tasks. I leave this PR here
so the community can find this.

You are receiving this mail because:
You are the assignee for the bug.