On Wed, Nov 10, 2021 at 8:32 AM Jose Quinteiro <[email protected]>
wrote:

> Hello,
>
> I'm trying to get all the tests working on Freebsd. I'm currently using
> symlink hacks to work around the fact that "gcc" is hard coded into a
> lot of tests.
>
> If I were to come up with a mega patch that introduced a "CC" variable
> that could be set to clang or gcc, would it be considered?
>
>
Thanks for trying to get that working! Would it be easier to add some
wrapper scripts to PATH? Or is that basically what your symlinks are?

Eg:
diff --git a/test/tup.sh b/test/tup.sh
index 6b56d900..d3a36ffc 100755
--- a/test/tup.sh
+++ b/test/tup.sh
@@ -29,11 +29,6 @@ tuptestdir="tuptesttmp-$testname"
 # avoid extra forks in win32
 : ${tupos:=`uname -s`}

-rm -rf $tuptestdir
-mkdir $tuptestdir
-cd $tuptestdir
-tup init --no-sync --force
-
 generate_script_name="build.sh"
 case $tupos in
 CYGWIN*)
@@ -42,8 +37,17 @@ CYGWIN*)
        in_windows=1
        generate_script_name="build.bat"
 ;;
+FreeBSD*)
+       PATH=$PWD/freebsd_wrappers:$PATH
+       export PATH
+;;
 esac

+rm -rf $tuptestdir
+mkdir $tuptestdir
+cd $tuptestdir
+tup init --no-sync --force
+
 # override any user settings for grep
 GREP_OPTIONS=""
 export GREP_OPTIONS


And in test/freebsd_wrappers/gcc:
clang "$@"

But if that or some other simple solution isn't feasible, I'd rather have
working FreeBSD tests with the CC patch than non-working tests and keeping
hard-coded gcc.

-Mike

-- 
-- 
tup-users mailing list
email: [email protected]
unsubscribe: [email protected]
options: http://groups.google.com/group/tup-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tup-users/CA%2B6x0LVTVs6VCb3m26tc13SjbU2gurav_8sixj-F7rerpdV24w%40mail.gmail.com.

Reply via email to