augment USE_GCC description in the porter's handbook

Matt Penna matthew.penna at gmail.com
Sun Sep 15 06:24:08 UTC 2013


On Sep 12, 2013, at 11:24 PM, Alexey Dokuchaev <danfe at nsu.ru> wrote:

> hi,
> 
> cooked something up, so people would get less confused about proper
> USE_GCC usage.  diff attached.

> 

> -	  <programlisting>USE_GCC=3.4</programlisting>
> +	  <programlisting>USE_GCC=X.Y</programlisting>
>  
> -	  <para>would add a dependency on gcc34 for every port,
> -	    including gcc34 itself!</para>
> +	  <para>(where X.Y is version number) would add a dependency on
> +	    gccXY for every port, including <literal>lang/gccXY</literal>
> +	    itself!</para>

I am unsure about this change. I understand the value in generalizing it, but I think leaving it with a specific version number provides a clearer example. So, it might be better as it is currently written?


>  		<entry><makevar>USE_GCC</makevar></entry>
> -		<entry>The port requires a specific version of
> -		  <command>gcc</command> to build.  The exact version
> -		  can be specified with value such as
> -		  <literal>3.4</literal>.  The minimal required
> -		  version can be specified as <literal>3.4+</literal>.
> -		  The <command>gcc</command> from the base system is
> -		  used when it satisfies the requested version,
> -		  otherwise an appropriate <command>gcc</command> is
> -		  compiled from ports and the <makevar>CC</makevar>
> -		  and <makevar>CXX</makevar> variables are
> -		  adjusted.</entry>
> +		<entry>The port requires GCC (<command>gcc</command> or
> +		  <command>g++</command>) to build.  Some ports need any
> +		  GCC version, some require modern, recent versions.  It
> +		  is typically set to <literal>any</literal> (in this
> +		  case, GCC from base would be used on versions of &os;
> +		  that still have it, or <literal>lang/gcc</literal> port
> +		  would be installed when default C/C++ compiler is Clang);
> +		  or <literal>yes</literal> (means always use stable, modern
> +		  GCC from <literal>lang/gcc</literal> port).  The exact
> +		  version can be also specified, with a value such as
> +		  <literal>4.7</literal>.  The minimal required
> +		  version can be specified as <literal>4.6+</literal>.
> +		  The GCC from the base system is used when it satisfies
> +		  the requested version, otherwise an appropriate compiler
> +		  in built from the port, and the <makevar>CC</makevar>
> +		  and <makevar>CXX</makevar> variables are adjusted
> +		  accordingly.</entry>

I have some ideas about clarifying this, but I would like to better understand the final point because "appropriate compiler" is a little vague. Is lang/gcc the compiler that is always used in this situation as long as it satisfies the minimal version requirement? Or is it possible that a version older than lang/gcc will be used?

Example: USE_GCC is set to "4.2+". Would lang/gcc (currently at 4.6, I believe) always be built and installed? Or would 4.2 potentially be built, as this is also available in the ports tree? If I should get clarification on another list, I would be glad to do that.

	Matt


More information about the freebsd-doc mailing list