mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-22 20:41:26 +00:00
Simplify compiler name and version gathering code.
This commit is contained in:
parent
0a72f77185
commit
e411bd1889
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=320464
@ -9,7 +9,7 @@
|
||||
}
|
||||
|
||||
# Use this to echo the results of a check
|
||||
@@ -493,20 +493,21 @@
|
||||
@@ -493,20 +493,20 @@
|
||||
echores "$_target_system"
|
||||
|
||||
|
||||
@ -21,8 +21,7 @@
|
||||
-cc_name=`$_cc -v 2>&1 | tail -n 1 | cut -d ' ' -f 1`
|
||||
-cc_version=`$_cc -dumpversion`
|
||||
+eval `$_cc -v 2>&1 | sed -En \
|
||||
+ '/version/s,(FreeBSD )?(.*) version ([0-9.]*).*,\2 \3,p' | (read cc_name \
|
||||
+ cc_version ; echo cc_name=$cc_name \; cc_version=$cc_version)`
|
||||
+ '/version/s,(.* )?(.*) version ([0-9.]*).*,cc_name=\2 ; cc_version=\3,p'`
|
||||
|
||||
echocheck "C compiler name"
|
||||
echores $cc_name
|
||||
@ -36,7 +35,7 @@
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -583,10 +584,10 @@
|
||||
@@ -583,10 +583,10 @@
|
||||
_osldef="$_debug $_profile $_osldef"
|
||||
elif test -z "$CFLAGS" ; then
|
||||
_cdefos="-DNDEBUG=1 -O2 -ffast-math -fomit-frame-pointer $_cdefos"
|
||||
@ -48,7 +47,7 @@
|
||||
test -n "$LDFLAGS" && _osldef="$LDFLAGS $_osldef"
|
||||
test -n "$LIBS" && _osldef="$LIBS $_osldef"
|
||||
|
||||
@@ -656,10 +657,10 @@
|
||||
@@ -656,10 +656,10 @@
|
||||
echocheck "slang.h"
|
||||
check_header slang.h
|
||||
enabled slang_h && _cdefos="-D_SLANG_ -D__OS_NAME__='\"Unix/Slang\"' $_cdefos"
|
||||
@ -61,7 +60,7 @@
|
||||
echocheck "curses.h"
|
||||
cat > $TMPC << EOF
|
||||
#include <curses.h>
|
||||
@@ -678,8 +679,10 @@
|
||||
@@ -678,8 +678,10 @@
|
||||
fi
|
||||
echores "$_curses"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user