The port I'm putting together requires GCC later than version 4.3(*) to compile. In FreeBSD 9.2, GCC version 4.2 is in the base system. From reading the porter's handbook and /usr/ports/bsd.port.mk I believe what I need is to set the USE_GCC variable in my makefile. From /usr/ports/bsd.port.mk:
Is this an indication that the FreeBSD 9.2 native version of gcc is being called rather than /usr/local/bin/gcc48 as I wanted? How can I be sure? When running the build from the shell with
Ad (*) Since specifying what I actually need (GCC 4.3 or later) generates the error "Unknown version of GCC specified (USE_GCC=4.3+)", I instead chose the earliest version in ports that is greater than 4.3; version 4.6:
To make sure that the flag was being honoured, I set the value to 4.8, which should use /usr/local/bin/gcc48. However, when I look at the output of# USE_GCC - If set, this port requires this version of gcc, either in
# the system or installed from a port.
make stage
, I see it is calling gcc
, for example:
Code:
gcc -c -MD -fshort-wchar -fno-strict-aliasing -fno-merge-constants -nostdlib -Wall -Werror -c -g -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . GnuGenBootSector.c -o GnuGenBootSector.o
gmake CC=/usr/local/bin/gcc48
, I can see that the correct executable is used. As per the post title, the software uses recursive make. Could this be the issue and if so how can I fix it?Ad (*) Since specifying what I actually need (GCC 4.3 or later) generates the error "Unknown version of GCC specified (USE_GCC=4.3+)", I instead chose the earliest version in ports that is greater than 4.3; version 4.6:
Code:
USE_GCC= 4.6+