Changeset e81ef51 in rtems
- Timestamp:
- 02/17/98 14:12:01 (25 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 9646d5be
- Parents:
- aa8a8c72
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
README.configure
raa8a8c72 re81ef51 24 24 --disable-tests 25 25 --disable-ka9q 26 --enable-c pp26 --enable-cxx 27 27 --enable-gcc28 (also use enable-libcdir when disabled) 28 28 --enable-gmake-print-directory … … 43 43 44 44 By default, the RTEMS support of C++ is disabled. It can be enabled 45 with the --enable-c ppoption. If the rtems++ C++ library is installed45 with the --enable-cxx option. If the rtems++ C++ library is installed 46 46 it will also be build. 47 47 -
aclocal.m4
raa8a8c72 re81ef51 1 dnl some macros for rtems host configuration checks 2 dnl 3 dnl Author: Ralf Corsepius (corsepiu@faw.uni-ulm.de), 97/11/29 4 dnl 5 dnl Last Modified: 98/01/10 6 dnl 7 dnl $Id$ 8 dnl 1 dnl aclocal.m4 generated automatically by aclocal 1.2 2 3 dnl $Id$ 9 4 10 5 dnl macro to detect mkdir … … 45 40 ]) 46 41 42 43 dnl $Id$ 44 45 dnl canonicalize target name 46 dnl NOTE: Most rtems targets do not fullfil autoconf's 47 dnl target naming conventions "processor-vendor-os" 48 dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them 49 dnl and we have to fix it for rtems ourselves 50 51 AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU, 52 [AC_MSG_CHECKING(rtems target cpu) 53 changequote(<<, >>)dnl 54 target_cpu=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'` 55 changequote([, ])dnl 56 AC_MSG_RESULT($target_cpu) 57 ]) 58 59 dnl 60 dnl $Id$ 61 dnl 62 dnl Check for target gcc 63 dnl 64 dnl Adaptation of autoconf-2.12's AC_PROG_CC to rtems 65 dnl 66 dnl 98/02/10 Ralf Corsepius (corsepiu@faw.uni-ulm.de) 67 dnl 68 69 AC_DEFUN(RTEMS_PROG_CC, 70 [ 71 AC_BEFORE([$0], [AC_PROG_CPP])dnl 72 AC_BEFORE([$0], [AC_PROG_CC])dnl 73 AC_CHECK_PROG(CC, gcc, gcc) 74 if test -z "$CC"; then 75 AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc) 76 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH]) 77 fi 78 79 RTEMS_PROG_CC_WORKS 80 AC_PROG_CC_GNU 81 82 if test $ac_cv_prog_gcc = yes; then 83 GCC=yes 84 dnl Check whether -g works, even if CFLAGS is set, in case the package 85 dnl plays around with CFLAGS (such as to build both debugging and 86 dnl normal versions of a library), tasteless as that idea is. 87 ac_test_CFLAGS="${CFLAGS+set}" 88 ac_save_CFLAGS="$CFLAGS" 89 CFLAGS= 90 AC_PROG_CC_G 91 if test "$ac_test_CFLAGS" = set; then 92 CFLAGS="$ac_save_CFLAGS" 93 elif test $ac_cv_prog_cc_g = yes; then 94 CFLAGS="-g -O2" 95 else 96 CFLAGS="-O2" 97 fi 98 else 99 GCC= 100 test "${CFLAGS+set}" = set || CFLAGS="-g" 101 fi 102 103 CC_FOR_TARGET=$CC 104 rtems_cv_prog_gcc=$ac_cv_prog_gcc 105 rtems_cv_prog_cc_g=$ac_cv_prog_cc_g 106 107 dnl restore initial values 108 unset CC 109 unset ac_cv_prog_gcc 110 unset ac_cv_prog_cc_g 111 unset ac_cv_prog_CC 112 ]) 113 114 115 dnl Almost identical to AC_PROG_CC_WORKS 116 dnl added malloc to program fragment, because rtems has its own malloc 117 dnl which is not available while bootstrapping rtems 118 119 AC_DEFUN(RTEMS_PROG_CC_WORKS, 120 [AC_MSG_CHECKING([whether the target C compiler ($CC $CFLAGS $LDFLAGS) works]) 121 AC_LANG_SAVE 122 AC_LANG_C 123 AC_TRY_COMPILER( 124 [void *malloc() { return 0; } 125 main(){return(0);}], 126 rtems_cv_prog_cc_works, rtems_cv_prog_cc_cross) 127 AC_LANG_RESTORE 128 AC_MSG_RESULT($rtems_cv_prog_cc_works) 129 if test $rtems_cv_prog_cc_works = no; then 130 AC_MSG_ERROR([installation or configuration problem: target C compiler cannot create executables.]) 131 fi 132 AC_MSG_CHECKING([whether the target C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler]) 133 AC_MSG_RESULT($rtems_cv_prog_cc_cross) 134 ]) 135 136 dnl 137 dnl $Id$ 138 dnl 139 dnl Check whether the target compiler accepts -specs 140 dnl 141 dnl 98/02/11 Ralf Corsepius corsepiu@faw.uni-ulm.de 142 dnl 143 144 AC_DEFUN(RTEMS_GCC_SPECS, 145 [AC_REQUIRE([RTEMS_PROG_CC]) 146 AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts -specs,rtems_cv_gcc_specs, 147 [touch confspec 148 echo 'void f(){}' >conftest.c 149 if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then 150 rtems_cv_gcc_specs=yes 151 else 152 rtems_cv_gcc_specs=no 153 fi 154 rm -f confspec conftest* 155 ])]) 156 157 dnl 158 dnl $Id$ 159 dnl 160 dnl Check whether the target compiler accepts -pipe 161 dnl 162 dnl 98/02/11 Ralf Corsepius corsepiu@faw.uni-ulm.de 163 dnl 164 165 AC_DEFUN(RTEMS_GCC_PIPE, 166 [AC_REQUIRE([RTEMS_PROG_CC]) 167 AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts --pipe,rtems_cv_gcc_pipe, 168 [ 169 echo 'void f(){}' >conftest.c 170 if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then 171 rtems_cv_gcc_pipe=yes 172 else 173 rtems_cv_gcc_pipe=no 174 fi 175 rm -f conftest* 176 ])]) 177 178 dnl 179 dnl $Id$ 180 dnl 181 dnl Check for target g++ 182 dnl 183 dnl Adaptation of autoconf-2.12's AC_PROG_CXX to rtems 184 dnl 185 dnl 98/02/10 Ralf Corsepius (corsepiu@faw.uni-ulm.de) 186 dnl 187 188 AC_DEFUN(RTEMS_PROG_CXX, 189 [ 190 AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl 191 AC_BEFORE([$0], [AC_PROG_CXX])dnl 192 AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++, gcc) 193 194 RTEMS_PROG_CXX_WORKS 195 AC_PROG_CXX_GNU 196 197 if test $ac_cv_prog_gxx = yes; then 198 GXX=yes 199 dnl Check whether -g works, even if CXXFLAGS is set, in case the package 200 dnl plays around with CXXFLAGS (such as to build both debugging and 201 dnl normal versions of a library), tasteless as that idea is. 202 ac_test_CXXFLAGS="${CXXFLAGS+set}" 203 ac_save_CXXFLAGS="$CXXFLAGS" 204 CXXFLAGS= 205 AC_PROG_CXX_G 206 if test "$ac_test_CXXFLAGS" = set; then 207 CXXFLAGS="$ac_save_CXXFLAGS" 208 elif test $ac_cv_prog_cxx_g = yes; then 209 CXXFLAGS="-g -O2" 210 else 211 CXXFLAGS="-O2" 212 fi 213 else 214 GXX= 215 test "${CXXFLAGS+set}" = set || CXXFLAGS="-g" 216 fi 217 CXX_FOR_TARGET=$CXX 218 219 dnl restore initial values 220 unset CXX 221 unset ac_cv_prog_gxx 222 ]) 223 224 225 dnl Almost identical to AC_PROG_CXX_WORKS 226 dnl Additional handling of malloc 227 dnl NOTE: using newlib with a native compiler is cross-compiling, indeed. 228 AC_DEFUN(RTEMS_PROG_CXX_WORKS, 229 [AC_MSG_CHECKING([whether the target C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works]) 230 AC_LANG_SAVE 231 AC_LANG_CPLUSPLUS 232 233 dnl this fails if rtems uses newlib, because rtems has its own malloc which 234 dnl is not available at bootstrap 235 AC_TRY_COMPILER( 236 [main(){return(0);}], 237 rtems_cv_prog_cxx_works, rtems_cv_prog_cxx_cross) 238 if test "$rtems_cv_prog_cxx_works" = "no"; then 239 dnl now retry with our own version of malloc 240 AC_TRY_COMPILER( 241 [extern "C" void *malloc(); 242 void *malloc() { return (0); } 243 main(){return(0);}], 244 rtems_cv_prog_cxx_works, rtems_cv_prog_cxx_cross) 245 fi 246 AC_LANG_RESTORE 247 AC_MSG_RESULT($rtems_cv_prog_cxx_works) 248 if test $rtems_cv_prog_cxx_works = no; then 249 AC_MSG_ERROR([installation or configuration problem: target C++ compiler cannot create executables.]) 250 fi 251 AC_MSG_CHECKING([whether the target C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler]) 252 AC_MSG_RESULT($rtems_cv_prog_cxx_cross) 253 ]) 254 255 dnl $Id$ 256 dnl 257 dnl Set target tools 258 dnl 259 dnl 98/02/12 Ralf Corsepius (corsepiu@faw.uni-ulm.de) 260 dnl 261 262 AC_DEFUN(RTEMS_CANONICALIZE_TOOLS, 263 [AC_REQUIRE([RTEMS_PROG_CC])dnl 264 if test "$rtems_cv_prog_gcc" = "yes" ; then 265 dnl We are using gcc, now ask it about its tools 266 dnl Necessary if gcc was configured to use the target's native tools 267 dnl or uses prefixes for gnutools (e.g. gas instead of as) 268 AR_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ar` 269 AS_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=as` 270 LD_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ld` 271 NM_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=nm` 272 RANLIB_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ranlib` 273 fi 274 275 dnl check whether the tools exist 276 dnl FIXME: What shall be done if they don't exist? 277 278 dnl NOTE: CC_FOR_TARGET should always be valid at this point, 279 dnl cf. RTEMS_PROG_CC 280 AC_PATH_PROG(CC_FOR_TARGET,"$program_prefix"gcc,no) 281 282 dnl FIXME: This may fail if the compiler has not been recognized as gcc 283 dnl and uses tools with different names 284 AC_PATH_PROG(AR_FOR_TARGET,"$program_prefix"ar,no) 285 AC_PATH_PROG(AS_FOR_TARGET,"$program_prefix"as,no) 286 AC_PATH_PROG(NM_FOR_TARGET,"$program_prefix"nm,no) 287 AC_PATH_PROG(LD_FOR_TARGET,"$program_prefix"ld,no) 288 289 dnl NOTE: This is doubtful, but should not disturb all current rtems' 290 dnl targets (remark: solaris fakes ranlib!!) 291 AC_PATH_PROG(RANLIB_FOR_TARGET,"$program_prefix"ranlib,no) 292 293 dnl NOTE: These may not be available, if not using gnutools 294 AC_PATH_PROG(OBJCOPY_FOR_TARGET,"$program_prefix"objcopy,no) 295 AC_PATH_PROG(SIZE_FOR_TARGET,"$program_prefix"size,no) 296 ]) 297 298 dnl $Id$ 299 300 dnl RTEMS_CHECK_MAKEFILE(path) 301 dnl Search for Makefile.in's within the directory starting 302 dnl at path and append an entry for Makefile to global variable 303 dnl "makefiles" (from configure.in) for each Makefile.in found 304 dnl 305 AC_DEFUN(RTEMS_CHECK_MAKEFILE, 306 [RTEMS_CHECK_FILES_IN($1,Makefile,makefiles) 307 ]) 308 309 dnl $Id$ 310 47 311 dnl RTEMS_CHECK_FILES_IN(path,file,var) 48 312 dnl path .. path relative to srcdir, where to start searching for files 49 313 dnl file .. name of the files to search for 50 dnl var .. shell variable to append f ound files314 dnl var .. shell variable to append files found 51 315 AC_DEFUN(RTEMS_CHECK_FILES_IN, 52 316 [ … … 64 328 ]) 65 329 66 dnl RTEMS_CHECK_MAKEFILE(path) 67 dnl Search for Makefile.in's within the directory starting 68 dnl at path and append an entry for Makefile to global variable 69 dnl "makefiles" (from configure.in) for each Makefile.in found 70 dnl 71 AC_DEFUN(RTEMS_CHECK_MAKEFILE, 72 [RTEMS_CHECK_FILES_IN($1,Makefile,makefiles) 73 ]) 74 75 dnl canonicalize target name 76 dnl NOTE: Most rtems targets do not fullfil autoconf's 77 dnl target naming conventions "processor-vendor-os" 78 dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them 79 dnl and we have to fix it for rtems ourselves 80 81 AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU, 82 [AC_MSG_CHECKING(rtems target cpu) 83 changequote(<<, >>)dnl 84 target_cpu=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'` 85 changequote([, ])dnl 86 AC_MSG_RESULT($target_cpu) 87 ]) 330 -
c/src/make/compilers/gcc-target-default.cfg
raa8a8c72 re81ef51 159 159 # NOTE: we override COMPILE.c 160 160 # 161 # NOTE: Remove -pipe if it causes you problems. Using it can decrease162 # compile time.163 #164 161 165 162 COMPILE.c=$(CC) $(CFLAGS) $(XCFLAGS) -c 166 163 167 164 ${ARCH}/%.o: %.c 168 ${COMPILE.c} - pipe -o $@ $<165 ${COMPILE.c} -o $@ $< 169 166 170 167 ${ARCH}/%.o: %.cc 171 ${COMPILE.c} - pipe -o $@ $<168 ${COMPILE.c} -o $@ $< 172 169 173 170 ${ARCH}/%.o: %.S 174 ${COMPILE.c} - pipe -DASM -o $@ $<171 ${COMPILE.c} -DASM -o $@ $< 175 172 176 173 # strip out C++ style comments. … … 225 222 endif 226 223 227 228 # List (possibly empty) of required managers229 # We require:230 # region -- used by lib/libcsupport for malloc()231 # ext -- used by libc for libc reentrancy hooks232 233 MANAGERS_REQUIRED=region ext sem234 235 # Create a RTEMS executable based on MANAGERS which was set in236 # app's Makefile237 238 MANAGERS_NOT_WANTED=$(filter-out $(MANAGERS), $(MANAGER_LIST))239 MANAGERS_NOT_WANTED:=$(filter-out $(MANAGERS_REQUIRED), $(MANAGERS_NOT_WANTED))240 241 224 # spell out all the LINK_FILE's, rather than using -lbsp, so 242 225 # that $(LINK_FILES) can be a dependency -
make/compilers/gcc-portsw.cfg
raa8a8c72 re81ef51 229 229 endif 230 230 231 # List (possibly empty) of required managers232 # We require:233 # region -- used by lib/libcsupport for malloc()234 # ext -- used by libc for libc reentrancy hooks235 236 MANAGERS_REQUIRED=region ext sem237 238 # Create a RTEMS executable based on MANAGERS which was set in239 # app's Makefile240 241 MANAGERS_NOT_WANTED=$(filter-out $(MANAGERS), $(MANAGER_LIST))242 MANAGERS_NOT_WANTED:=$(filter-out $(MANAGERS_REQUIRED), $(MANAGERS_NOT_WANTED))243 231 244 232 # spell out all the LINK_FILE's, rather than using -lbsp, so -
make/compilers/gcc-target-default.cfg
raa8a8c72 re81ef51 159 159 # NOTE: we override COMPILE.c 160 160 # 161 # NOTE: Remove -pipe if it causes you problems. Using it can decrease162 # compile time.163 #164 161 165 162 COMPILE.c=$(CC) $(CFLAGS) $(XCFLAGS) -c 166 163 167 164 ${ARCH}/%.o: %.c 168 ${COMPILE.c} - pipe -o $@ $<165 ${COMPILE.c} -o $@ $< 169 166 170 167 ${ARCH}/%.o: %.cc 171 ${COMPILE.c} - pipe -o $@ $<168 ${COMPILE.c} -o $@ $< 172 169 173 170 ${ARCH}/%.o: %.S 174 ${COMPILE.c} - pipe -DASM -o $@ $<171 ${COMPILE.c} -DASM -o $@ $< 175 172 176 173 # strip out C++ style comments. … … 225 222 endif 226 223 227 228 # List (possibly empty) of required managers229 # We require:230 # region -- used by lib/libcsupport for malloc()231 # ext -- used by libc for libc reentrancy hooks232 233 MANAGERS_REQUIRED=region ext sem234 235 # Create a RTEMS executable based on MANAGERS which was set in236 # app's Makefile237 238 MANAGERS_NOT_WANTED=$(filter-out $(MANAGERS), $(MANAGER_LIST))239 MANAGERS_NOT_WANTED:=$(filter-out $(MANAGERS_REQUIRED), $(MANAGERS_NOT_WANTED))240 241 224 # spell out all the LINK_FILE's, rather than using -lbsp, so 242 225 # that $(LINK_FILES) can be a dependency
Note: See TracChangeset
for help on using the changeset viewer.