OSDN Git Service

gcc/
[pf3gnuchains/gcc-fork.git] / libffi / configure
index aaf3b81..a1ec40b 100755 (executable)
@@ -4192,7 +4192,7 @@ irix5* | irix6* | nonstopux*)
   ;;
 
 # This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -6846,7 +6846,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
       lt_prog_compiler_static='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
       case $cc_basename in
       # old Intel for x86_64 which still supported -KPIC.
       ecc*)
@@ -7407,7 +7407,7 @@ _LT_EOF
       archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
-    gnu* | linux* | tpf* | k*bsd*-gnu)
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
       tmp_diet=no
       if test "$host_os" = linux-dietlibc; then
        case $cc_basename in
@@ -8956,7 +8956,7 @@ linux*oldld* | linux*aout* | linux*coff*)
   ;;
 
 # This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -13263,6 +13263,31 @@ _ACEOF
     fi
 fi
 
+if test x$TARGET = xX86 || test x$TARGET = xX86_64; then
+    echo "$as_me:$LINENO: checking assembler supports pc related relocs" >&5
+echo $ECHO_N "checking assembler supports pc related relocs... $ECHO_C" >&6
+if test "${libffi_cv_as_x86_pcrel+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+       libffi_cv_as_x86_pcrel=yes
+       echo '.text; foo: nop; .data; .long foo-.; .text' > conftest.s
+       if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then
+           libffi_cv_as_x86_pcrel=no
+       fi
+
+fi
+echo "$as_me:$LINENO: result: $libffi_cv_as_x86_pcrel" >&5
+echo "${ECHO_T}$libffi_cv_as_x86_pcrel" >&6
+    if test "x$libffi_cv_as_x86_pcrel" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AS_X86_PCREL 1
+_ACEOF
+
+    fi
+fi
+
 echo "$as_me:$LINENO: checking whether .eh_frame section should be read-only" >&5
 echo $ECHO_N "checking whether .eh_frame section should be read-only... $ECHO_C" >&6
 if test "${libffi_cv_ro_eh_frame+set}" = set; then