File tree Expand file tree Collapse file tree 4 files changed +23
-3
lines changed Expand file tree Collapse file tree 4 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 1+ 0.3.8 2025-04-02 20:04:34+01:00 Europe/London
2+ - Added support for FreeBSD, using FreeBSD 14
3+ and clang version 16.0.6
4+
150.3.7 2022-05-14 20:04:34+01:00 Europe/London
26- Fixing build that breaks when CNAME is a path to
37 gcc and not just "gcc" (or "cc")
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ use parent 'Alien::Base';
66use Config ();
77use Alien::OpenMP::configure ();
88
9- our $VERSION = ' 0.3.7 ' ;
9+ our $VERSION = ' 0.3.8 ' ;
1010
1111# "public" Alien::Base method implementations
1212
Original file line number Diff line number Diff line change @@ -144,6 +144,9 @@ sub _update_supported {
144144 unshift @{$supported -> {darwin }{libs }}, " -L/usr/local/lib" , " -L/opt/homebrew/opt/libomp/lib" ;
145145 }
146146 }
147+ elsif ($OS eq ' freebsd' ) {
148+ $CCNAME = ' clang' ;
149+ }
147150 # covers case where "CCNAME" is "cc" but it's still "gcc"; the alternative is to add
148151 # 'cc' to the supported hash above, which seems to restrictive
149152 elsif ($CCNAME eq " cc" ) {
Original file line number Diff line number Diff line change @@ -24,9 +24,22 @@ subtest 'gcc' => sub {
2424 is +Alien::OpenMP::configure-> lddlflags, $omp_flag , q{ Found expected OpenMP linker switch for gcc.} ;
2525};
2626
27+ subtest ' FreeBSD clang/gcc' => sub {
28+ if ($^O eq ' MSWin32' ) {
29+ plan skip_all => ' Mocking does not work on MSWin32'
30+ }
31+ local $Alien::OpenMP::configure::CCNAME = ' gcc' ;
32+ local $Alien::OpenMP::configure::OS = ' freebsd' ;
33+ Alien::OpenMP::configure-> _reset;
34+ is +Alien::OpenMP::configure-> is_known, 1, q{ known} ;
35+ like +Alien::OpenMP::configure-> cflags, qr { -Xclang -fopenmp} , q{ Found expected OpenMP compiler switch for gcc/clang.} ;
36+ like +Alien::OpenMP::configure-> lddlflags, qr { -lomp} , q{ Found expected OpenMP linker switch for gcc/clang.} ;
37+ };
38+
2739subtest ' darwin clang/gcc homebrew' => sub {
28- plan skip_all => ' Mocking does not work on MSWin32'
29- if $^O eq ' MSWin32' ;
40+ if ($^O eq ' MSWin32' ) {
41+ plan skip_all => ' Mocking does not work on MSWin32'
42+ }
3043 local $Alien::OpenMP::configure::CCNAME = ' gcc' ;
3144 local $Alien::OpenMP::configure::OS = ' darwin' ;
3245 local $ENV {PATH } = " /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" ;
You can’t perform that action at this time.
0 commit comments