diff options
author | Mans Rullgard <mans@mansr.com> | 2012-10-23 03:05:44 +0400 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-11-23 16:07:11 +0400 |
commit | 457cc333b424994ecf80a82369325771e0397fd9 (patch) | |
tree | b7cc13693f447df033998c0039526c02e883e247 | |
parent | 4a606c830ae664013cea33800094d4d0f4ec62da (diff) |
configure: properly support DEC/Compaq compiler
Signed-off-by: Mans Rullgard <mans@mansr.com>
-rwxr-xr-x | configure | 40 |
1 files changed, 31 insertions, 9 deletions
@@ -2114,6 +2114,24 @@ EOF die "Sanity test failed." fi +ccc_flags(){ + for flag; do + case $flag in + -std=c99) echo -c99 ;; + -mcpu=*) echo -arch ${flag#*=} ;; + -mieee) echo -ieee ;; + -O*|-fast) echo $flag ;; + -fno-math-errno) echo -assume nomath_errno ;; + -g) echo -g3 ;; + -Wall) echo -msg_enable level2 ;; + -Wno-pointer-sign) echo -msg_disable ptrmismatch1 ;; + -Wl,*) echo $flag ;; + -f*|-W*) ;; + *) echo $flag ;; + esac + done +} + msvc_flags(){ for flag; do case $flag in @@ -2254,10 +2272,9 @@ probe_cc(){ _type=ccc _ident=$($_cc -V | head -n1 | cut -d' ' -f1-3) _DEPFLAGS='-M' - debuglevel=3 - _ldflags='-Wl,-z,now' # calls to libots crash without this _cflags_speed='-fast' _cflags_size='-O1' + _flags_filter=ccc_flags elif $_cc --vsn 2>/dev/null | grep -q "ARM C/C++ Compiler"; then test -d "$sysroot" || die "No valid sysroot specified." _type=armcc @@ -2608,7 +2625,7 @@ elif enabled arm; then elif enabled alpha; then - enabled ccc && cpuflags="-arch $cpu" || cpuflags="-mcpu=$cpu" + cpuflags="-mcpu=$cpu" elif enabled bfin; then @@ -2970,6 +2987,10 @@ if enabled_all tms470 glibc; then add_cflags -pds=48 # incompatible redefinition of macro fi +if enabled_all ccc glibc; then + add_ldflags -Wl,-z,now # calls to libots crash without this +fi + esc(){ echo "$*" | sed 's/%/%25/g;s/:/%3a/g' } @@ -3555,12 +3576,10 @@ if enabled icc; then fi elif enabled ccc; then # disable some annoying warnings - add_cflags -msg_disable cvtu32to64 - add_cflags -msg_disable embedcomment - add_cflags -msg_disable needconstext - add_cflags -msg_disable nomainieee - add_cflags -msg_disable ptrmismatch1 - add_cflags -msg_disable unreachcode + add_cflags -msg_disable bitnotint + add_cflags -msg_disable mixfuncvoid + add_cflags -msg_disable nonstandcast + add_cflags -msg_disable unsupieee elif enabled gcc; then check_optflags -fno-tree-vectorize check_cflags -Werror=implicit-function-declaration @@ -3591,6 +3610,9 @@ elif enabled msvc; then fi case $target_os in + osf1) + enabled ccc && add_ldflags '-Wl,-expect_unresolved,*' + ;; plan9) add_cppflags -Dmain=plan9_main ;; |