llvm.org GIT mirror llvm / f512281
Make LLVM compile on DragonFly BSD (PR2499). Patch by Hasso Tepper! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52781 91177308-0d34-0410-b5e6-96231b3b80d8 Matthijs Kooijman 12 years ago
5 changed file(s) with 37 addition(s) and 27 deletion(s). Raw diff Collapse all Expand all
138138 llvm_cv_link_all_option="-Wl,--whole-archive"
139139 llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
140140 llvm_cv_os_type="NetBSD"
141 llvm_cv_platform_type="Unix" ;;
142 *-*-dragonfly*)
143 llvm_cv_link_all_option="-Wl,--whole-archive"
144 llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
145 llvm_cv_os_type="DragonFly"
141146 llvm_cv_platform_type="Unix" ;;
142147 *-*-hpux*)
143148 llvm_cv_link_all_option="-Wl,--whole-archive"
22862286 llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
22872287 llvm_cv_os_type="NetBSD"
22882288 llvm_cv_platform_type="Unix" ;;
2289 *-*-dragonfly*)
2290 llvm_cv_link_all_option="-Wl,--whole-archive"
2291 llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
2292 llvm_cv_os_type="DragonFly"
2293 llvm_cv_platform_type="Unix" ;;
22892294 *-*-hpux*)
22902295 llvm_cv_link_all_option="-Wl,--whole-archive"
22912296 llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
1064010645 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1064110646 lt_status=$lt_dlunknown
1064210647 cat > conftest.$ac_ext <
10643 #line 10644 "configure"
10648 #line 10649 "configure"
1064410649 #include "confdefs.h"
1064510650
1064610651 #if HAVE_DLFCN_H
1278412789 ;;
1278512790 *-*-irix6*)
1278612791 # Find out which ABI we are using.
12787 echo '#line 12788 "configure"' > conftest.$ac_ext
12792 echo '#line 12793 "configure"' > conftest.$ac_ext
1278812793 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1278912794 (eval $ac_compile) 2>&5
1279012795 ac_status=$?
1450214507 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1450314508 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1450414509 -e 's:$: $lt_compiler_flag:'`
14505 (eval echo "\"\$as_me:14506: $lt_compile\"" >&5)
14510 (eval echo "\"\$as_me:14511: $lt_compile\"" >&5)
1450614511 (eval "$lt_compile" 2>conftest.err)
1450714512 ac_status=$?
1450814513 cat conftest.err >&5
14509 echo "$as_me:14510: \$? = $ac_status" >&5
14514 echo "$as_me:14515: \$? = $ac_status" >&5
1451014515 if (exit $ac_status) && test -s "$ac_outfile"; then
1451114516 # The compiler can only warn and ignore the option if not recognized
1451214517 # So say no if there are warnings other than the usual output.
1477014775 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1477114776 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1477214777 -e 's:$: $lt_compiler_flag:'`
14773 (eval echo "\"\$as_me:14774: $lt_compile\"" >&5)
14778 (eval echo "\"\$as_me:14779: $lt_compile\"" >&5)
1477414779 (eval "$lt_compile" 2>conftest.err)
1477514780 ac_status=$?
1477614781 cat conftest.err >&5
14777 echo "$as_me:14778: \$? = $ac_status" >&5
14782 echo "$as_me:14783: \$? = $ac_status" >&5
1477814783 if (exit $ac_status) && test -s "$ac_outfile"; then
1477914784 # The compiler can only warn and ignore the option if not recognized
1478014785 # So say no if there are warnings other than the usual output.
1487414879 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1487514880 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1487614881 -e 's:$: $lt_compiler_flag:'`
14877 (eval echo "\"\$as_me:14878: $lt_compile\"" >&5)
14882 (eval echo "\"\$as_me:14883: $lt_compile\"" >&5)
1487814883 (eval "$lt_compile" 2>out/conftest.err)
1487914884 ac_status=$?
1488014885 cat out/conftest.err >&5
14881 echo "$as_me:14882: \$? = $ac_status" >&5
14886 echo "$as_me:14887: \$? = $ac_status" >&5
1488214887 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1488314888 then
1488414889 # The compiler can only warn and ignore the option if not recognized
1732617331 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1732717332 lt_status=$lt_dlunknown
1732817333 cat > conftest.$ac_ext <
17329 #line 17330 "configure"
17334 #line 17335 "configure"
1733017335 #include "confdefs.h"
1733117336
1733217337 #if HAVE_DLFCN_H
1742617431 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1742717432 lt_status=$lt_dlunknown
1742817433 cat > conftest.$ac_ext <
17429 #line 17430 "configure"
17434 #line 17435 "configure"
1743017435 #include "confdefs.h"
1743117436
1743217437 #if HAVE_DLFCN_H
1979419799 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1979519800 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1979619801 -e 's:$: $lt_compiler_flag:'`
19797 (eval echo "\"\$as_me:19798: $lt_compile\"" >&5)
19802 (eval echo "\"\$as_me:19803: $lt_compile\"" >&5)
1979819803 (eval "$lt_compile" 2>conftest.err)
1979919804 ac_status=$?
1980019805 cat conftest.err >&5
19801 echo "$as_me:19802: \$? = $ac_status" >&5
19806 echo "$as_me:19807: \$? = $ac_status" >&5
1980219807 if (exit $ac_status) && test -s "$ac_outfile"; then
1980319808 # The compiler can only warn and ignore the option if not recognized
1980419809 # So say no if there are warnings other than the usual output.
1989819903 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1989919904 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1990019905 -e 's:$: $lt_compiler_flag:'`
19901 (eval echo "\"\$as_me:19902: $lt_compile\"" >&5)
19906 (eval echo "\"\$as_me:19907: $lt_compile\"" >&5)
1990219907 (eval "$lt_compile" 2>out/conftest.err)
1990319908 ac_status=$?
1990419909 cat out/conftest.err >&5
19905 echo "$as_me:19906: \$? = $ac_status" >&5
19910 echo "$as_me:19911: \$? = $ac_status" >&5
1990619911 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1990719912 then
1990819913 # The compiler can only warn and ignore the option if not recognized
2146821473 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2146921474 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2147021475 -e 's:$: $lt_compiler_flag:'`
21471 (eval echo "\"\$as_me:21472: $lt_compile\"" >&5)
21476 (eval echo "\"\$as_me:21477: $lt_compile\"" >&5)
2147221477 (eval "$lt_compile" 2>conftest.err)
2147321478 ac_status=$?
2147421479 cat conftest.err >&5
21475 echo "$as_me:21476: \$? = $ac_status" >&5
21480 echo "$as_me:21481: \$? = $ac_status" >&5
2147621481 if (exit $ac_status) && test -s "$ac_outfile"; then
2147721482 # The compiler can only warn and ignore the option if not recognized
2147821483 # So say no if there are warnings other than the usual output.
2157221577 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2157321578 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2157421579 -e 's:$: $lt_compiler_flag:'`
21575 (eval echo "\"\$as_me:21576: $lt_compile\"" >&5)
21580 (eval echo "\"\$as_me:21581: $lt_compile\"" >&5)
2157621581 (eval "$lt_compile" 2>out/conftest.err)
2157721582 ac_status=$?
2157821583 cat out/conftest.err >&5
21579 echo "$as_me:21580: \$? = $ac_status" >&5
21584 echo "$as_me:21585: \$? = $ac_status" >&5
2158021585 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2158121586 then
2158221587 # The compiler can only warn and ignore the option if not recognized
2380723812 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2380823813 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2380923814 -e 's:$: $lt_compiler_flag:'`
23810 (eval echo "\"\$as_me:23811: $lt_compile\"" >&5)
23815 (eval echo "\"\$as_me:23816: $lt_compile\"" >&5)
2381123816 (eval "$lt_compile" 2>conftest.err)
2381223817 ac_status=$?
2381323818 cat conftest.err >&5
23814 echo "$as_me:23815: \$? = $ac_status" >&5
23819 echo "$as_me:23820: \$? = $ac_status" >&5
2381523820 if (exit $ac_status) && test -s "$ac_outfile"; then
2381623821 # The compiler can only warn and ignore the option if not recognized
2381723822 # So say no if there are warnings other than the usual output.
2407524080 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2407624081 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2407724082 -e 's:$: $lt_compiler_flag:'`
24078 (eval echo "\"\$as_me:24079: $lt_compile\"" >&5)
24083 (eval echo "\"\$as_me:24084: $lt_compile\"" >&5)
2407924084 (eval "$lt_compile" 2>conftest.err)
2408024085 ac_status=$?
2408124086 cat conftest.err >&5
24082 echo "$as_me:24083: \$? = $ac_status" >&5
24087 echo "$as_me:24088: \$? = $ac_status" >&5
2408324088 if (exit $ac_status) && test -s "$ac_outfile"; then
2408424089 # The compiler can only warn and ignore the option if not recognized
2408524090 # So say no if there are warnings other than the usual output.
2417924184 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2418024185 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2418124186 -e 's:$: $lt_compiler_flag:'`
24182 (eval echo "\"\$as_me:24183: $lt_compile\"" >&5)
24187 (eval echo "\"\$as_me:24188: $lt_compile\"" >&5)
2418324188 (eval "$lt_compile" 2>out/conftest.err)
2418424189 ac_status=$?
2418524190 cat out/conftest.err >&5
24186 echo "$as_me:24187: \$? = $ac_status" >&5
24191 echo "$as_me:24192: \$? = $ac_status" >&5
2418724192 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2418824193 then
2418924194 # The compiler can only warn and ignore the option if not recognized
7474 errorcode = pthread_mutexattr_settype(&attr, kind);
7575 assert(errorcode == 0);
7676
77 #if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
77 #if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__)
7878 // Make it a process local mutex
7979 errorcode = pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_PRIVATE);
8080 #endif
14141414 << "extern void *__builtin_alloca(unsigned int);\n"
14151415 << "#endif\n"
14161416 << "#define alloca(x) __builtin_alloca(x)\n"
1417 << "#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)\n"
1417 << "#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)\n"
14181418 << "#define alloca(x) __builtin_alloca(x)\n"
14191419 << "#elif defined(_MSC_VER)\n"
14201420 << "#define inline _inline\n"
11 // RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | llvm-as | llc
22
33 #if !defined(__linux__) && !defined(__FreeBSD__) && \
4 !defined(__OpenBSD__) && !defined(__CYGWIN__)
4 !defined(__OpenBSD__) && !defined(__CYGWIN__) && !defined(__DragonFly__)
55 void foo() __attribute__((weak_import));
66 #else
77 void foo() __attribute__((weak));