Lines Matching +full:gcc +full:- +full:i686 +full:- +full:linux +full:- +full:gnu
13 Lots of people download binary distributions of c-ares. This document
14 does not describe how to install c-ares using such a binary package.
15 This document describes how to compile, build and install c-ares from
22 release tarball, see the [GIT-INFO](GIT-INFO) file in the root directory
33 ### General Information, works on most Unix Platforms (Linux, FreeBSD, etc.)
45 [GIT-INFO](GIT-INFO) on how to proceed.
49 ./configure --help
51 If you want to install c-ares in a different file hierarchy than /usr/local,
54 ./configure --prefix=/path/to/c-ares/tree
60 ./configure --prefix=$HOME
66 To force configure to use the standard cc compiler if both cc and gcc are
76 ./configure --disable-shared
78 If you're a c-ares developer and use gcc, you might want to enable more
79 debug options with the `--enable-debug` option.
83 Some versions of uClibc require configuring with `CPPFLAGS=-D_GNU_SOURCE=1`
86 The Open Watcom C compiler on Linux requires configuring with the variables:
88 ./configure CC=owcc AR="$WATCOM/binl/wlib" AR_FLAGS=-q \
89 RANLIB=/bin/true STRIP="$WATCOM/binl/wstrip" CFLAGS=-Wextra
97 Download and unpack the c-ares package.
99 `cd` to the new directory. (e.g. `cd c-ares-1.7.6`)
101 Set environment variables to point to the cross-compile toolchain and call
102 configure with any options you need. Be sure and specify the `--host` and
103 `--build` parameters at configuration time. The following script is an
104 example of cross-compiling for the IBM 405GP PowerPC processor using the
105 toolchain from MonteVista for Hardhat Linux.
111 export CPPFLAGS="-I/opt/hardhat/devkit/ppc/405/target/usr/include"
112 export AR=ppc_405-ar
113 export AS=ppc_405-as
114 export LD=ppc_405-ld
115 export RANLIB=ppc_405-ranlib
116 export CC=ppc_405-gcc
117 export NM=ppc_405-nm
119 ./configure --target=powerpc-hardhat-linux \
120 --host=powerpc-hardhat-linux \
121 --build=i586-pc-linux-gnu \
122 --prefix=/opt/hardhat/devkit/ppc/405/target/usr/local \
123 --exec-prefix=/usr/local
126 You may also need to provide a parameter like `--with-random=/dev/urandom`
128 generating device for a target system. The `--prefix` parameter
129 specifies where c-ares will be installed. If `configure` completes
135 ./configure --host=ARCH-OS
141 c-ares root with `sh configure`. Make sure you have the sh executable in
153 to 32. Socket descriptors returned within the c-ares library may exceed this,
157 A good all-round solution to this is to override the default when building
158 c-ares, by overriding `CFLAGS` during configure, example:
160 # configure CFLAGS='-DFD_SETSIZE=64 -g -O2'
165 The library can be cross-compiled using gccsdk as follows:
167 CC=riscos-gcc AR=riscos-ar RANLIB='riscos-ar -s' ./configure \
168 --host=arm-riscos-aof --without-random --disable-shared
171 where `riscos-gcc` and `riscos-ar` are links to the gccsdk tools.
172 You can then link your program with `c-ares/lib/.libs/libcares.a`.
177 Method using a configure cross-compile (tested with Android NDK r7b):
179 - prepare the toolchain of the Android NDK for standalone use; this can
182 ./tools/make-standalone-toolchain.sh
184 which creates a usual cross-compile toolchain. Let's assume that you put
189 export PATH=/opt/arm-linux-androideabi-4.4.3/bin:$PATH
190 ./configure --host=arm-linux-androideabi [more configure options]
193 - if you want to compile directly from our GIT repo you might run into
198 Invalid configuration `arm-linux-androideabi':
200 configure: error: /bin/sh ./config.sub arm-linux-androideabi failed
204 http://git.savannah.gnu.org/gitweb/?p=config.git;a=tree
205 you need to replace your system-own versions which usually can be
207 `find /usr -name config.sub`
213 Current releases of c-ares introduce a CMake v3+ build system that has been
214 tested on most platforms including Windows, Linux, FreeBSD, macOS, AIX and
223 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/cares ..
229 -------
231 Options to CMake are passed on the command line using "-D${OPTION}=${VALUE}".
235 |-----------------------------|--------------------------------------------------------------------…
239 | CARES_STATIC_PIC | Build the static library as position-independent …
241 | CARES_BUILD_CONTAINER_TESTS | Build and run container tests (implies CARES_BUILD_TESTS, Linux onl…
244 | CARES_THREADS | Build with thread-safety support …
247 -----
249 Ninja is the next-generation build system meant for generators like CMake that
256 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/cares -G "Ninja" ..
262 -------------------------
268 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=C:\cares -G "NMake Makefiles" ..
273 Windows MinGW-w64 Command Line via MSYS
274 ---------------------------------------
279 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=C:\cares -G "MSYS Makefiles" ..
285 Platform-specific build systems
289 -----
291 ### Building Windows DLLs and C run-time (CRT) linkage issues
302 …- [Use the C Run-Time](https://learn.microsoft.com/en-us/troubleshoot/developer/visualstudio/cpp/l…
314 version (use `--disable-shared` or `--disable-static`). CMake can build both
326 then run 'make -f Makefile.m32' in the root dir.
332 http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
345 ### Important static c-ares usage note
347 When building an application that uses the static c-ares library, you must
348 add `-DCARES_STATICLIB` to your `CFLAGS`. Otherwise the linker will look for
353 ---
355 c-ares supports building as a 32bit protected mode application via
357 cross compiler from [Andrew Wu](https://github.com/andrewwutw/build-djgpp)
360 It is required to also have [Watt-32](https://www.watt-32.net/) available
365 appropriately before calling `make Makefile.dj` to build c-ares.
368 [GitHub Actions Workflow](https://github.com/c-ares/c-ares/blob/main/.github/workflows/djgpp.yml)
369 for a full build example, including building the latest Watt-32 release.
373 --------
378 - emx 0.9d
379 - GNU make
380 - GNU patch
381 - ksh
382 - GNU bison
383 - GNU file utilities
384 - GNU sed
385 - autoconf 2.13
388 symbol referenced from the text segment, you need to add `-D__ST_MT_ERRNO__`
391 If you're getting huge binaries, probably your makefiles have the `-g` in
396 -------
400 - either any gcc / nlmconv, or CodeWarrior 7 PDK 4 or later.
401 - gnu make and awk running on the platform you compile on;
404 - recent Novell LibC SDK available from:
406 - or recent Novell CLib SDK available from:
409 Set a search path to your compiler, linker and tools; on Linux make
410 sure that the var `OSTYPE` contains the string 'linux'; set the var
412 `make -f Makefile.netware` from the top source directory;
417 You can build and install c-ares using [vcpkg](https://github.com/Microsoft/vcpkg/) dependency mana…
422 ./bootstrap-vcpkg.sh
424 ./vcpkg install c-ares
427 The c-ares port in vcpkg is kept up to date by Microsoft team members and community contributors. I…
432 To build c-ares with OpenWatcom, you need to have at least version 1.9 of OpenWatcom. You can get t…
439 wmake -u -f Makefile.Watcom
448 that c-ares has been compiled for. If you know a system c-ares compiles and
451 - Linux (i686, x86_64, AARCH64, and more)
452 - MacOS 10.4+
453 - iOS
454 - Windows 8+ (i686, x86_64)
455 - Android (ARM, AARCH64, x86_64)
456 - FreeBSD
457 - NetBSD
458 - OpenBSD
459 - Solaris (SPARC, x86_64)
460 - AIX (POWER)
461 - Tru64 (Alpha)
462 - IRIX (MIPS)
463 - Novell NetWare (i386)
469 - c-ares: https://c-ares.org/
470 - MinGW-w64: http://mingw-w64.sourceforge.net/
471 - MSYS2: https://msys2.org
472 - OpenWatcom: http://www.openwatcom.org/