pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: building with ccache w/gcc4.8



Le 14/08/13 14:11, Jonathan Perkin a écrit :

In the meanwhile I noticed in mk/transform-gcc that both
`-specs filename` and `-specs=filename` are passed through.

I'm curious as whether the former should now invoke `transform_fail`
instead of passing it in?  Are there any real world cases where this
is necessary?

We definitely shouldn't fail, '-specs file' is perfectly legitimate
GCC syntax.  What we could do is transform '-specs ' to '-specs='.

However, the real bug is in ccache, which should be fixed to correctly
handle the '-specs file' case.

There is also transform_pass_with_warning...
But that seems to only put a warning into .work.log

But this is exactly the reason I ask, in other words, I cannot seem to find anything but specifically '-specs=' as the correct syntax, in particular as found in the "Using the GNU Compiler Collection"

Doesn't seem to me that pkgsrc should inverse the portability exigence if not totally warranted.

Do you happen to have a reference of something with '-specs filename' other than these aforementioned pkgsrc buildlink3.mk files?

If so, then I'll make a bug report upstream to ccache.samba.org.

As for pkgsrc, couldn't seem to find a way safely pop the next arg in transform-gcc, but the following seems to do the trick:
diff --git a/mk/wrapper/arg-source b/mk/wrapper/arg-source
index 111bb4d..b3aa952 100644
--- a/mk/wrapper/arg-source
+++ b/mk/wrapper/arg-source
@@ -61,6 +61,17 @@ while $test $# -gt 0; do
                $debug_log $wrapperlog "    (arg-source) push: $arg$nextarg"
                ;;
        ##############################################################
+       # Merge "-specs filename" into a single "-specs=filename".
+       ##############################################################
+       -specs)
+       nextarg="$1"; shift
+       case "$nextarg" in
+       -*) msg_log $wrapperlog "WARNING: [arg-source] An $arg option must not be 
followed by another option, $nextarg." ;;
+       esac
+       append_queue argbuf "$arg=$nextarg"
+       $debug_log $wrapperlog "    (arg-source) push: $arg=$nextarg"
+       ;;
+       ##############################################################




Home | Main Index | Thread Index | Old Index