mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
2. "make profile" doesn't work. It aborts when building host-tools
for embedded targets. I didn't yet have enough time to fix this
problem. AFAIS this problem is related to handling of
LDFLAGS_PROFILE[|_V] in gcc.cfg.in. For host applications, we use
gcc for linking host applications, too. With profiling enabled
CFLAGS_PROFILE_V contains -pg and is used to compile, but
LDFLAGS_PROFILE_V is empty, hence -pg will not be passed to the
linker causing gcc to fail to link, because it can't resolve some
symbols introduced by compiling with -pg.
I am not sure if I can provide a patch for this - Ether it is trivial
to fix or requires basic work on host configuration ;-
Fixing this one was trivial - But hard to trace.
LDFLAGS_PROFILE_V needs to contain the same flags as CFLAGS_PROFILE_V,
if gcc is used for linking (What else should have been expected ?,
:-). The same problem was present for *_DEBUG_V, but apparently wasn't
noticed by anybody, because things didn't break, but were silently
ignored.
I fixed these problems by setting these flags in configure.in whenever
gcc is reported to be the host-compiler. For non-gcc host compilers
"make debug" and "make profile" now becomes the same as an ordinary
"make". This is a hack and addressing this problen could be more
sophisticated, but I don't think it gives much sense to support
compile variants for any host program (Who will ever try to
profile/debug host tools?). Therefore I don't think it's useful
to invest more effort into this problem.
This commit is contained in:
97
configure
vendored
97
configure
vendored
@@ -2725,18 +2725,23 @@ case $host_os in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
test "$ac_cv_prog_gcc" = "yes" && CC_CFLAGS_DEFAULT=-Wall
|
if test "$ac_cv_prog_gcc" = "yes"; then
|
||||||
test "$ac_cv_prog_cc_g" = "yes" && CC_CFLAGS_DEBUG_V=-g
|
CC_CFLAGS_DEFAULT=-Wall
|
||||||
|
CC_CFLAGS_PROFILE_V=${CC_CFLAGS_PROFILE_V-"-pg"}
|
||||||
|
CC_LDFLAGS_PROFILE_V=${CC_LDFLAGS_PROFILE_V-$CC_CFLAGS_PROFILE_V}
|
||||||
|
fi
|
||||||
|
|
||||||
|
test "$ac_cv_prog_cc_g" = "yes" && CC_CFLAGS_DEBUG_V=${CC_CFLAGS_DEBUG_V-"-g"}
|
||||||
|
|
||||||
for ac_func in strerror
|
for ac_func in strerror
|
||||||
do
|
do
|
||||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
echo "configure:2735: checking for $ac_func" >&5
|
echo "configure:2740: checking for $ac_func" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 2740 "configure"
|
#line 2745 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char $ac_func(); below. */
|
which can conflict with char $ac_func(); below. */
|
||||||
@@ -2759,7 +2764,7 @@ $ac_func();
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:2763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
if { (eval echo configure:2768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_$ac_func=yes"
|
eval "ac_cv_func_$ac_func=yes"
|
||||||
else
|
else
|
||||||
@@ -2788,7 +2793,7 @@ if test "$target_cpu" = "unix" ; then
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking whether $RTEMS_HOST supports System V semaphores""... $ac_c" 1>&6
|
echo $ac_n "checking whether $RTEMS_HOST supports System V semaphores""... $ac_c" 1>&6
|
||||||
echo "configure:2792: checking whether $RTEMS_HOST supports System V semaphores" >&5
|
echo "configure:2797: checking whether $RTEMS_HOST supports System V semaphores" >&5
|
||||||
if eval "test \"`echo '$''{'rtems_cv_sysv_sem'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'rtems_cv_sysv_sem'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@@ -2797,7 +2802,7 @@ if test "$cross_compiling" = yes; then
|
|||||||
:
|
:
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 2801 "configure"
|
#line 2806 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@@ -2823,7 +2828,7 @@ int main () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:2827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
if { (eval echo configure:2832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||||
then
|
then
|
||||||
rtems_cv_sysv_sem="yes"
|
rtems_cv_sysv_sem="yes"
|
||||||
else
|
else
|
||||||
@@ -2846,7 +2851,7 @@ echo "$ac_t""$rtems_cv_sysv_sem" 1>&6
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking whether $RTEMS_HOST supports System V shared memory""... $ac_c" 1>&6
|
echo $ac_n "checking whether $RTEMS_HOST supports System V shared memory""... $ac_c" 1>&6
|
||||||
echo "configure:2850: checking whether $RTEMS_HOST supports System V shared memory" >&5
|
echo "configure:2855: checking whether $RTEMS_HOST supports System V shared memory" >&5
|
||||||
if eval "test \"`echo '$''{'rtems_cv_sysv_shm'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'rtems_cv_sysv_shm'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@@ -2855,7 +2860,7 @@ if test "$cross_compiling" = yes; then
|
|||||||
:
|
:
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 2859 "configure"
|
#line 2864 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@@ -2871,7 +2876,7 @@ int main () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:2875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
if { (eval echo configure:2880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||||
then
|
then
|
||||||
rtems_cv_sysv_shm="yes"
|
rtems_cv_sysv_shm="yes"
|
||||||
else
|
else
|
||||||
@@ -2894,7 +2899,7 @@ echo "$ac_t""$rtems_cv_sysv_shm" 1>&6
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking whether $RTEMS_HOST supports System V messages""... $ac_c" 1>&6
|
echo $ac_n "checking whether $RTEMS_HOST supports System V messages""... $ac_c" 1>&6
|
||||||
echo "configure:2898: checking whether $RTEMS_HOST supports System V messages" >&5
|
echo "configure:2903: checking whether $RTEMS_HOST supports System V messages" >&5
|
||||||
if eval "test \"`echo '$''{'rtems_cv_sysv_msg'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'rtems_cv_sysv_msg'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@@ -2903,7 +2908,7 @@ if test "$cross_compiling" = yes; then
|
|||||||
:
|
:
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 2907 "configure"
|
#line 2912 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@@ -2919,7 +2924,7 @@ int main () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:2923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
if { (eval echo configure:2928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||||
then
|
then
|
||||||
rtems_cv_sysv_msg="yes"
|
rtems_cv_sysv_msg="yes"
|
||||||
else
|
else
|
||||||
@@ -2944,7 +2949,7 @@ fi
|
|||||||
# find all the Executive Makefiles
|
# find all the Executive Makefiles
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/exec/score/tools/$target_cpu""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/exec/score/tools/$target_cpu""... $ac_c" 1>&6
|
||||||
echo "configure:2948: checking for Makefile.in in c/src/exec/score/tools/$target_cpu" >&5
|
echo "configure:2953: checking for Makefile.in in c/src/exec/score/tools/$target_cpu" >&5
|
||||||
if test -d $srcdir/c/src/exec/score/tools/$target_cpu; then
|
if test -d $srcdir/c/src/exec/score/tools/$target_cpu; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -2959,7 +2964,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/exec/rtems""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/exec/rtems""... $ac_c" 1>&6
|
||||||
echo "configure:2963: checking for Makefile.in in c/src/exec/rtems" >&5
|
echo "configure:2968: checking for Makefile.in in c/src/exec/rtems" >&5
|
||||||
if test -d $srcdir/c/src/exec/rtems; then
|
if test -d $srcdir/c/src/exec/rtems; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -2974,7 +2979,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/exec/sapi""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/exec/sapi""... $ac_c" 1>&6
|
||||||
echo "configure:2978: checking for Makefile.in in c/src/exec/sapi" >&5
|
echo "configure:2983: checking for Makefile.in in c/src/exec/sapi" >&5
|
||||||
if test -d $srcdir/c/src/exec/sapi; then
|
if test -d $srcdir/c/src/exec/sapi; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -2991,7 +2996,7 @@ fi
|
|||||||
if test "$RTEMS_HAS_POSIX_API" = "yes"; then
|
if test "$RTEMS_HAS_POSIX_API" = "yes"; then
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/exec/posix""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/exec/posix""... $ac_c" 1>&6
|
||||||
echo "configure:2995: checking for Makefile.in in c/src/exec/posix" >&5
|
echo "configure:3000: checking for Makefile.in in c/src/exec/posix" >&5
|
||||||
if test -d $srcdir/c/src/exec/posix; then
|
if test -d $srcdir/c/src/exec/posix; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -3013,7 +3018,7 @@ if test -d "$srcdir/c/src/lib/libbsp/$target_cpu"; then
|
|||||||
|
|
||||||
if test -z "$rtems_bsp"; then
|
if test -z "$rtems_bsp"; then
|
||||||
echo $ac_n "checking for bsps""... $ac_c" 1>&6
|
echo $ac_n "checking for bsps""... $ac_c" 1>&6
|
||||||
echo "configure:3017: checking for bsps" >&5
|
echo "configure:3022: checking for bsps" >&5
|
||||||
files=`ls $srcdir/c/src/lib/libbsp/$target_cpu`
|
files=`ls $srcdir/c/src/lib/libbsp/$target_cpu`
|
||||||
for file in $files; do
|
for file in $files; do
|
||||||
case $file in
|
case $file in
|
||||||
@@ -3078,7 +3083,7 @@ echo "configure:3017: checking for bsps" >&5
|
|||||||
bspdirs="$bspdirs $bspdir"
|
bspdirs="$bspdirs $bspdir"
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/lib/libbsp/$bspcpudir$bspdir""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/lib/libbsp/$bspcpudir$bspdir""... $ac_c" 1>&6
|
||||||
echo "configure:3082: checking for Makefile.in in c/src/lib/libbsp/$bspcpudir$bspdir" >&5
|
echo "configure:3087: checking for Makefile.in in c/src/lib/libbsp/$bspcpudir$bspdir" >&5
|
||||||
if test -d $srcdir/c/src/lib/libbsp/$bspcpudir$bspdir; then
|
if test -d $srcdir/c/src/lib/libbsp/$bspcpudir$bspdir; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -3093,7 +3098,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/lib/libbsp/${bspcpudir}shared""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/lib/libbsp/${bspcpudir}shared""... $ac_c" 1>&6
|
||||||
echo "configure:3097: checking for Makefile.in in c/src/lib/libbsp/${bspcpudir}shared" >&5
|
echo "configure:3102: checking for Makefile.in in c/src/lib/libbsp/${bspcpudir}shared" >&5
|
||||||
if test -d $srcdir/c/src/lib/libbsp/${bspcpudir}shared; then
|
if test -d $srcdir/c/src/lib/libbsp/${bspcpudir}shared; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -3116,7 +3121,7 @@ fi
|
|||||||
# find all the CPU dependent library Makefiles
|
# find all the CPU dependent library Makefiles
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/lib/libcpu/$target_cpu""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/lib/libcpu/$target_cpu""... $ac_c" 1>&6
|
||||||
echo "configure:3120: checking for Makefile.in in c/src/lib/libcpu/$target_cpu" >&5
|
echo "configure:3125: checking for Makefile.in in c/src/lib/libcpu/$target_cpu" >&5
|
||||||
if test -d $srcdir/c/src/lib/libcpu/$target_cpu; then
|
if test -d $srcdir/c/src/lib/libcpu/$target_cpu; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -3133,7 +3138,7 @@ fi
|
|||||||
if test "$skip_startfiles" != "yes"; then
|
if test "$skip_startfiles" != "yes"; then
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/lib/start/$target_cpu""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/lib/start/$target_cpu""... $ac_c" 1>&6
|
||||||
echo "configure:3137: checking for Makefile.in in c/src/lib/start/$target_cpu" >&5
|
echo "configure:3142: checking for Makefile.in in c/src/lib/start/$target_cpu" >&5
|
||||||
if test -d $srcdir/c/src/lib/start/$target_cpu; then
|
if test -d $srcdir/c/src/lib/start/$target_cpu; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -3165,12 +3170,12 @@ fi
|
|||||||
|
|
||||||
# If the TCP/IP stack is enabled, then find all TCP/IP Makefiles
|
# If the TCP/IP stack is enabled, then find all TCP/IP Makefiles
|
||||||
echo $ac_n "checking if networking is enabled? ""... $ac_c" 1>&6
|
echo $ac_n "checking if networking is enabled? ""... $ac_c" 1>&6
|
||||||
echo "configure:3169: checking if networking is enabled? " >&5
|
echo "configure:3174: checking if networking is enabled? " >&5
|
||||||
echo "$ac_t""$RTEMS_HAS_NETWORKING" 1>&6
|
echo "$ac_t""$RTEMS_HAS_NETWORKING" 1>&6
|
||||||
if test "$RTEMS_HAS_NETWORKING" = "yes"; then
|
if test "$RTEMS_HAS_NETWORKING" = "yes"; then
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/lib/libnetworking""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/lib/libnetworking""... $ac_c" 1>&6
|
||||||
echo "configure:3174: checking for Makefile.in in c/src/lib/libnetworking" >&5
|
echo "configure:3179: checking for Makefile.in in c/src/lib/libnetworking" >&5
|
||||||
if test -d $srcdir/c/src/lib/libnetworking; then
|
if test -d $srcdir/c/src/lib/libnetworking; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -3192,7 +3197,7 @@ fi
|
|||||||
|
|
||||||
# If the tests are enabled, then find all the test suite Makefiles
|
# If the tests are enabled, then find all the test suite Makefiles
|
||||||
echo $ac_n "checking if the test suites are enabled? ""... $ac_c" 1>&6
|
echo $ac_n "checking if the test suites are enabled? ""... $ac_c" 1>&6
|
||||||
echo "configure:3196: checking if the test suites are enabled? " >&5
|
echo "configure:3201: checking if the test suites are enabled? " >&5
|
||||||
tests_enabled=yes
|
tests_enabled=yes
|
||||||
# Check whether --enable-tests or --disable-tests was given.
|
# Check whether --enable-tests or --disable-tests was given.
|
||||||
if test "${enable_tests+set}" = set; then
|
if test "${enable_tests+set}" = set; then
|
||||||
@@ -3211,7 +3216,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/tests/tools/$target_cpu""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/tests/tools/$target_cpu""... $ac_c" 1>&6
|
||||||
echo "configure:3215: checking for Makefile.in in c/src/tests/tools/$target_cpu" >&5
|
echo "configure:3220: checking for Makefile.in in c/src/tests/tools/$target_cpu" >&5
|
||||||
if test -d $srcdir/c/src/tests/tools/$target_cpu; then
|
if test -d $srcdir/c/src/tests/tools/$target_cpu; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -3228,7 +3233,7 @@ fi
|
|||||||
if test "$tests_enabled" = "yes"; then
|
if test "$tests_enabled" = "yes"; then
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/tests/libtests""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/tests/libtests""... $ac_c" 1>&6
|
||||||
echo "configure:3232: checking for Makefile.in in c/src/tests/libtests" >&5
|
echo "configure:3237: checking for Makefile.in in c/src/tests/libtests" >&5
|
||||||
if test -d $srcdir/c/src/tests/libtests; then
|
if test -d $srcdir/c/src/tests/libtests; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -3243,7 +3248,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/tests/sptests""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/tests/sptests""... $ac_c" 1>&6
|
||||||
echo "configure:3247: checking for Makefile.in in c/src/tests/sptests" >&5
|
echo "configure:3252: checking for Makefile.in in c/src/tests/sptests" >&5
|
||||||
if test -d $srcdir/c/src/tests/sptests; then
|
if test -d $srcdir/c/src/tests/sptests; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -3258,7 +3263,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/tests/tmtests""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/tests/tmtests""... $ac_c" 1>&6
|
||||||
echo "configure:3262: checking for Makefile.in in c/src/tests/tmtests" >&5
|
echo "configure:3267: checking for Makefile.in in c/src/tests/tmtests" >&5
|
||||||
if test -d $srcdir/c/src/tests/tmtests; then
|
if test -d $srcdir/c/src/tests/tmtests; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -3273,7 +3278,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/tests/mptests""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/tests/mptests""... $ac_c" 1>&6
|
||||||
echo "configure:3277: checking for Makefile.in in c/src/tests/mptests" >&5
|
echo "configure:3282: checking for Makefile.in in c/src/tests/mptests" >&5
|
||||||
if test -d $srcdir/c/src/tests/mptests; then
|
if test -d $srcdir/c/src/tests/mptests; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -3289,7 +3294,7 @@ fi
|
|||||||
if test "$RTEMS_HAS_POSIX_API" = "yes"; then
|
if test "$RTEMS_HAS_POSIX_API" = "yes"; then
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/tests/psxtests""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/tests/psxtests""... $ac_c" 1>&6
|
||||||
echo "configure:3293: checking for Makefile.in in c/src/tests/psxtests" >&5
|
echo "configure:3298: checking for Makefile.in in c/src/tests/psxtests" >&5
|
||||||
if test -d $srcdir/c/src/tests/psxtests; then
|
if test -d $srcdir/c/src/tests/psxtests; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -3307,7 +3312,7 @@ fi
|
|||||||
|
|
||||||
# If the HWAPI is enabled, the find the HWAPI Makefiles
|
# If the HWAPI is enabled, the find the HWAPI Makefiles
|
||||||
echo $ac_n "checking if the HWAPI is enabled? ""... $ac_c" 1>&6
|
echo $ac_n "checking if the HWAPI is enabled? ""... $ac_c" 1>&6
|
||||||
echo "configure:3311: checking if the HWAPI is enabled? " >&5
|
echo "configure:3316: checking if the HWAPI is enabled? " >&5
|
||||||
# Check whether --enable-hwapi or --disable-hwapi was given.
|
# Check whether --enable-hwapi or --disable-hwapi was given.
|
||||||
if test "${enable_hwapi+set}" = set; then
|
if test "${enable_hwapi+set}" = set; then
|
||||||
enableval="$enable_hwapi"
|
enableval="$enable_hwapi"
|
||||||
@@ -3318,7 +3323,7 @@ if test "${enable_hwapi+set}" = set; then
|
|||||||
makefiles="$makefiles c/src/lib/libhwapi/Makefile"
|
makefiles="$makefiles c/src/lib/libhwapi/Makefile"
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/analog""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/analog""... $ac_c" 1>&6
|
||||||
echo "configure:3322: checking for Makefile.in in c/src/lib/libhwapi/analog" >&5
|
echo "configure:3327: checking for Makefile.in in c/src/lib/libhwapi/analog" >&5
|
||||||
if test -d $srcdir/c/src/lib/libhwapi/analog; then
|
if test -d $srcdir/c/src/lib/libhwapi/analog; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -3333,7 +3338,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/discrete""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/discrete""... $ac_c" 1>&6
|
||||||
echo "configure:3337: checking for Makefile.in in c/src/lib/libhwapi/discrete" >&5
|
echo "configure:3342: checking for Makefile.in in c/src/lib/libhwapi/discrete" >&5
|
||||||
if test -d $srcdir/c/src/lib/libhwapi/discrete; then
|
if test -d $srcdir/c/src/lib/libhwapi/discrete; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -3348,7 +3353,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/drivers""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/drivers""... $ac_c" 1>&6
|
||||||
echo "configure:3352: checking for Makefile.in in c/src/lib/libhwapi/drivers" >&5
|
echo "configure:3357: checking for Makefile.in in c/src/lib/libhwapi/drivers" >&5
|
||||||
if test -d $srcdir/c/src/lib/libhwapi/drivers; then
|
if test -d $srcdir/c/src/lib/libhwapi/drivers; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -3363,7 +3368,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory""... $ac_c" 1>&6
|
||||||
echo "configure:3367: checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory" >&5
|
echo "configure:3372: checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory" >&5
|
||||||
if test -d $srcdir/c/src/lib/libhwapi/non_volatile_memory; then
|
if test -d $srcdir/c/src/lib/libhwapi/non_volatile_memory; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -3378,7 +3383,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/serial""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/serial""... $ac_c" 1>&6
|
||||||
echo "configure:3382: checking for Makefile.in in c/src/lib/libhwapi/serial" >&5
|
echo "configure:3387: checking for Makefile.in in c/src/lib/libhwapi/serial" >&5
|
||||||
if test -d $srcdir/c/src/lib/libhwapi/serial; then
|
if test -d $srcdir/c/src/lib/libhwapi/serial; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -3393,7 +3398,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/support""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/support""... $ac_c" 1>&6
|
||||||
echo "configure:3397: checking for Makefile.in in c/src/lib/libhwapi/support" >&5
|
echo "configure:3402: checking for Makefile.in in c/src/lib/libhwapi/support" >&5
|
||||||
if test -d $srcdir/c/src/lib/libhwapi/support; then
|
if test -d $srcdir/c/src/lib/libhwapi/support; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -3408,7 +3413,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/wrapup""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/wrapup""... $ac_c" 1>&6
|
||||||
echo "configure:3412: checking for Makefile.in in c/src/lib/libhwapi/wrapup" >&5
|
echo "configure:3417: checking for Makefile.in in c/src/lib/libhwapi/wrapup" >&5
|
||||||
if test -d $srcdir/c/src/lib/libhwapi/wrapup; then
|
if test -d $srcdir/c/src/lib/libhwapi/wrapup; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -3450,13 +3455,15 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# pick up all the Makefiles in required parts of the tree
|
# pick up all the Makefiles in required parts of the tree
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/build-tools""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/build-tools""... $ac_c" 1>&6
|
||||||
echo "configure:3460: checking for Makefile.in in c/build-tools" >&5
|
echo "configure:3467: checking for Makefile.in in c/build-tools" >&5
|
||||||
if test -d $srcdir/c/build-tools; then
|
if test -d $srcdir/c/build-tools; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -3471,7 +3478,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in make""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in make""... $ac_c" 1>&6
|
||||||
echo "configure:3475: checking for Makefile.in in make" >&5
|
echo "configure:3482: checking for Makefile.in in make" >&5
|
||||||
if test -d $srcdir/make; then
|
if test -d $srcdir/make; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -3486,7 +3493,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/lib/libmisc""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/lib/libmisc""... $ac_c" 1>&6
|
||||||
echo "configure:3490: checking for Makefile.in in c/src/lib/libmisc" >&5
|
echo "configure:3497: checking for Makefile.in in c/src/lib/libmisc" >&5
|
||||||
if test -d $srcdir/c/src/lib/libmisc; then
|
if test -d $srcdir/c/src/lib/libmisc; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -3501,7 +3508,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for Makefile.in in c/src/tests/samples""... $ac_c" 1>&6
|
echo $ac_n "checking for Makefile.in in c/src/tests/samples""... $ac_c" 1>&6
|
||||||
echo "configure:3505: checking for Makefile.in in c/src/tests/samples" >&5
|
echo "configure:3512: checking for Makefile.in in c/src/tests/samples" >&5
|
||||||
if test -d $srcdir/c/src/tests/samples; then
|
if test -d $srcdir/c/src/tests/samples; then
|
||||||
rtems_av_save_dir=`pwd`;
|
rtems_av_save_dir=`pwd`;
|
||||||
cd $srcdir;
|
cd $srcdir;
|
||||||
@@ -3744,6 +3751,8 @@ s%@PROJECT_ROOT@%$PROJECT_ROOT%g
|
|||||||
s%@program_prefix@%$program_prefix%g
|
s%@program_prefix@%$program_prefix%g
|
||||||
s%@CC_CFLAGS_DEFAULT@%$CC_CFLAGS_DEFAULT%g
|
s%@CC_CFLAGS_DEFAULT@%$CC_CFLAGS_DEFAULT%g
|
||||||
s%@CC_CFLAGS_DEBUG_V@%$CC_CFLAGS_DEBUG_V%g
|
s%@CC_CFLAGS_DEBUG_V@%$CC_CFLAGS_DEBUG_V%g
|
||||||
|
s%@CC_CFLAGS_PROFILE_V@%$CC_CFLAGS_PROFILE_V%g
|
||||||
|
s%@CC_LDFLAGS_PROFILE_V@%$CC_LDFLAGS_PROFILE_V%g
|
||||||
|
|
||||||
CEOF
|
CEOF
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
14
configure.in
14
configure.in
@@ -244,10 +244,18 @@ esac
|
|||||||
AC_SUBST(GCCSED)
|
AC_SUBST(GCCSED)
|
||||||
|
|
||||||
dnl FIXME: This is a kludge
|
dnl FIXME: This is a kludge
|
||||||
|
dnl Set flags to settings all gcc variants are assumed to accept.
|
||||||
|
if test "$ac_cv_prog_gcc" = "yes"; then
|
||||||
dnl Add -Wall if using gcc as host compiler
|
dnl Add -Wall if using gcc as host compiler
|
||||||
test "$ac_cv_prog_gcc" = "yes" && CC_CFLAGS_DEFAULT=-Wall
|
CC_CFLAGS_DEFAULT=-Wall
|
||||||
|
dnl Add -pg to profile flags, unless specified in the environment
|
||||||
|
CC_CFLAGS_PROFILE_V=${CC_CFLAGS_PROFILE_V-"-pg"}
|
||||||
|
dnl propagate cflags to ldflags, unless specified in the environment
|
||||||
|
CC_LDFLAGS_PROFILE_V=${CC_LDFLAGS_PROFILE_V-$CC_CFLAGS_PROFILE_V}
|
||||||
|
fi
|
||||||
|
|
||||||
dnl Add -g if the host compiler accepts -g, assume -g means debugging
|
dnl Add -g if the host compiler accepts -g, assume -g means debugging
|
||||||
test "$ac_cv_prog_cc_g" = "yes" && CC_CFLAGS_DEBUG_V=-g
|
test "$ac_cv_prog_cc_g" = "yes" && CC_CFLAGS_DEBUG_V=${CC_CFLAGS_DEBUG_V-"-g"}
|
||||||
|
|
||||||
dnl check for host library functions
|
dnl check for host library functions
|
||||||
dnl NOTE: must be called after AC_PROG_CC
|
dnl NOTE: must be called after AC_PROG_CC
|
||||||
@@ -460,6 +468,8 @@ AC_SUBST(PROJECT_ROOT)
|
|||||||
AC_SUBST(program_prefix)
|
AC_SUBST(program_prefix)
|
||||||
AC_SUBST(CC_CFLAGS_DEFAULT)
|
AC_SUBST(CC_CFLAGS_DEFAULT)
|
||||||
AC_SUBST(CC_CFLAGS_DEBUG_V)
|
AC_SUBST(CC_CFLAGS_DEBUG_V)
|
||||||
|
AC_SUBST(CC_CFLAGS_PROFILE_V)
|
||||||
|
AC_SUBST(CC_LDFLAGS_PROFILE_V)
|
||||||
|
|
||||||
# pick up all the Makefiles in required parts of the tree
|
# pick up all the Makefiles in required parts of the tree
|
||||||
RTEMS_CHECK_MAKEFILE(c/build-tools)
|
RTEMS_CHECK_MAKEFILE(c/build-tools)
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ CFLAGS_DEBUG_V=@CC_CFLAGS_DEBUG_V@
|
|||||||
CFLAGS_DEBUG_OPTIMIZE_V=
|
CFLAGS_DEBUG_OPTIMIZE_V=
|
||||||
|
|
||||||
# profile flag; use gprof(1)
|
# profile flag; use gprof(1)
|
||||||
CFLAGS_PROFILE_V=-pg
|
CFLAGS_PROFILE_V=@CC_CFLAGS_PROFILE_V@
|
||||||
|
|
||||||
# default is to optimize
|
# default is to optimize
|
||||||
CFLAGS_OPTIMIZE=$(CFLAGS_OPTIMIZE_V)
|
CFLAGS_OPTIMIZE=$(CFLAGS_OPTIMIZE_V)
|
||||||
@@ -91,7 +91,7 @@ LDFLAGS_DYNAMIC_V = ??
|
|||||||
LDFLAGS_DYNAMIC_LIBNAME_V = -h $(DYNAMIC_VERSION_LIBNAME)
|
LDFLAGS_DYNAMIC_LIBNAME_V = -h $(DYNAMIC_VERSION_LIBNAME)
|
||||||
|
|
||||||
# ld flags for profiling, debugging
|
# ld flags for profiling, debugging
|
||||||
LDFLAGS_PROFILE_V =
|
LDFLAGS_PROFILE_V = @CC_LDFLAGS_PROFILE_V@
|
||||||
LDFLAGS_DEBUG_V =
|
LDFLAGS_DEBUG_V =
|
||||||
|
|
||||||
LDFLAGS=$(LDFLAGS_PROFILE) $(LDFLAGS_DEBUG) $(LD_PATHS:%=-L %)
|
LDFLAGS=$(LDFLAGS_PROFILE) $(LDFLAGS_DEBUG) $(LD_PATHS:%=-L %)
|
||||||
|
|||||||
Reference in New Issue
Block a user