llvm.org GIT mirror llvm / 3c00a83
Add some platform checks. Also fix a typo on a Makefile. Patch by arrowdodger! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123659 91177308-0d34-0410-b5e6-96231b3b80d8 Oscar Fuentes 8 years ago
3 changed file(s) with 27 addition(s) and 13 deletion(s). Raw diff Collapse all Expand all
5454 check_include_file(stdio.h HAVE_STDIO_H)
5555 check_include_file(stdlib.h HAVE_STDLIB_H)
5656 check_include_file(string.h HAVE_STRING_H)
57 check_include_file(strings.h HAVE_STRINGS_H)
5758 check_include_file(sys/dir.h HAVE_SYS_DIR_H)
5859 check_include_file(sys/dl.h HAVE_SYS_DL_H)
5960 check_include_file(sys/ioctl.h HAVE_SYS_IOCTL_H)
7172 check_include_file(valgrind/valgrind.h HAVE_VALGRIND_VALGRIND_H)
7273 check_include_file(windows.h HAVE_WINDOWS_H)
7374 check_include_file(fenv.h HAVE_FENV_H)
75 check_include_file(mach/mach.h HAVE_MACH_MACH_H)
76 check_include_file(mach-o/dyld.h HAVE_MACH_O_DYLD_H)
7477
7578 # library checks
7679 if( NOT LLVM_ON_WIN32 )
105108 check_symbol_exists(getcwd unistd.h HAVE_GETCWD)
106109 check_symbol_exists(gettimeofday sys/time.h HAVE_GETTIMEOFDAY)
107110 check_symbol_exists(getrlimit "sys/types.h;sys/time.h;sys/resource.h" HAVE_GETRLIMIT)
111 check_symbol_exists(strchr string.h HAVE_STRCHR)
112 check_symbol_exists(strcmp string.h HAVE_STRCMP)
113 check_symbol_exists(strdup string.h HAVE_STRDUP)
114 check_symbol_exists(strrchr string.h HAVE_STRRCHR)
108115 if( NOT LLVM_ON_WIN32 )
109116 check_symbol_exists(pthread_mutex_lock pthread.h HAVE_PTHREAD_MUTEX_LOCK)
110117 endif()
126133 check_symbol_exists(argz_next argz.h HAVE_ARGZ_NEXT)
127134 check_symbol_exists(argz_stringify argz.h HAVE_ARGZ_STRINGIFY)
128135 endif()
136 if( HAVE_DLFCN_H AND HAVE_LIBDL )
137 list(APPEND CMAKE_REQUIRED_LIBRARIES dl)
138 check_symbol_exists(dlerror dlfcn.h HAVE_DLERROR)
139 check_symbol_exists(dlopen dlfcn.h HAVE_DLOPEN)
140 list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES dl)
141 endif()
129142
130143 check_symbol_exists(__GLIBC__ stdio.h LLVM_USING_GLIBC)
131144 if( LLVM_USING_GLIBC )
153166 check_type_exists(int64_t "${headers}" HAVE_INT64_T)
154167 check_type_exists(uint64_t "${headers}" HAVE_UINT64_T)
155168 check_type_exists(u_int64_t "${headers}" HAVE_U_INT64_T)
169 check_type_exists(error_t errno.h HAVE_ERROR_T)
156170
157171 # available programs checks
158172 function(llvm_find_program name)
9090 #cmakedefine HAVE_DLD_H ${HAVE_DLD_H}
9191
9292 /* Define to 1 if you have the `dlerror' function. */
93 #undef HAVE_DLERROR
93 #cmakedefine HAVE_DLERROR ${HAVE_DLERROR}
9494
9595 /* Define to 1 if you have the header file. */
9696 #cmakedefine HAVE_DLFCN_H ${HAVE_DLFCN_H}
9797
9898 /* Define if dlopen() is available on this platform. */
99 #undef HAVE_DLOPEN
99 #cmakedefine HAVE_DLOPEN ${HAVE_DLOPEN}
100100
101101 /* Define to 1 if you have the header file. */
102102 #cmakedefine HAVE_DL_H ${HAVE_DL_H}
114114 #cmakedefine HAVE_ERRNO_H ${HAVE_ERRNO_H}
115115
116116 /* Define to 1 if the system has the type `error_t'. */
117 #undef HAVE_ERROR_T
117 #cmakedefine HAVE_ERROR_T ${HAVE_ERROR_T}
118118
119119 /* Define to 1 if you have the header file. */
120120 #cmakedefine HAVE_EXECINFO_H ${HAVE_EXECINFO_H}
192192 #cmakedefine HAVE_ISNAN_IN_MATH_H ${HAVE_ISNAN_IN_MATH_H}
193193
194194 /* Define if you have the libdl library or equivalent. */
195 #undef HAVE_LIBDL
195 #cmakedefine HAVE_LIBDL ${HAVE_LIBDL}
196196
197197 /* Define to 1 if you have the `imagehlp' library (-limagehlp). */
198198 #cmakedefine HAVE_LIBIMAGEHLP ${HAVE_LIBIMAGEHLP}
226226 #undef HAVE_LONGJMP
227227
228228 /* Define to 1 if you have the header file. */
229 #undef HAVE_MACH_MACH_H
229 #cmakedefine HAVE_MACH_MACH_H ${HAVE_MACH_MACH_H}
230230
231231 /* Define to 1 if you have the header file. */
232 #undef HAVE_MACH_O_DYLD_H
232 #cmakedefine HAVE_MACH_O_DYLD_H ${HAVE_MACH_O_DYLD_H}
233233
234234 /* Define if mallinfo() is available on this platform. */
235235 #cmakedefine HAVE_MALLINFO ${HAVE_MALLINFO}
371371 #undef HAVE_STD_ISNAN_IN_CMATH
372372
373373 /* Define to 1 if you have the `strchr' function. */
374 #undef HAVE_STRCHR
374 #cmakedefine HAVE_STRCHR ${HAVE_STRCHR}
375375
376376 /* Define to 1 if you have the `strcmp' function. */
377 #undef HAVE_STRCMP
377 #cmakedefine HAVE_STRCMP ${HAVE_STRCMP}
378378
379379 /* Define to 1 if you have the `strdup' function. */
380 #undef HAVE_STRDUP
380 #cmakedefine HAVE_STRDUP ${HAVE_STRDUP}
381381
382382 /* Define to 1 if you have the `strerror' function. */
383383 #cmakedefine HAVE_STRERROR ${HAVE_STRERROR}
389389 #cmakedefine HAVE_STRERROR_S ${HAVE_STRERROR_S}
390390
391391 /* Define to 1 if you have the header file. */
392 #undef HAVE_STRINGS_H
392 #cmakedefine HAVE_STRINGS_H ${HAVE_STRINGS_H}
393393
394394 /* Define to 1 if you have the header file. */
395395 #cmakedefine HAVE_STRING_H ${HAVE_STRING_H}
396396
397397 /* Define to 1 if you have the `strrchr' function. */
398 #undef HAVE_STRRCHR
398 #cmakedefine HAVE_STRRCHR ${HAVE_STRRCHR}
399399
400400 /* Define to 1 if you have the `strtof' function. */
401401 #cmakedefine HAVE_STRTOF ${HAVE_STRTOF}
None ##===- tools/ed/Makefile -----------------------------------*- Makefile -*-===##
0 ##===- tools/edis/Makefile -----------------------------------*- Makefile -*-===##
11 #
22 # The LLVM Compiler Infrastructure
33 #
2525 LINK_COMPONENTS += x86asmprinter x86disassembler
2626 endif
2727
28 # If the X86 target is enabled, link in the asmprinter and disassembler.
28 # If the ARM target is enabled, link in the asmprinter and disassembler.
2929 ifneq ($(filter $(TARGETS_TO_BUILD), ARM),)
3030 LINK_COMPONENTS += armasmprinter armdisassembler
3131 endif