On 11/11/21 4:10 AM, Mike Shal wrote:
> On Wed, Nov 10, 2021 at 8:32 AM Jose Quinteiro <[email protected]
> <mailto:[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.
> 
That looks /much/ better than what I was proposing. I'll give it a shot
and get back to you.

What I'm doing now is creating a link clang->gcc in a directory that's
in my PATH. Unfortunately that requires a link to /usr/lib in the parent
directory for reasons I don't understand.

Thanks,
Jose

-- 
-- 
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/ab186cd0-7953-ad1d-2962-fd9277b6960a%40quinteiro.org.

Reply via email to