diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2006-11-01 17:31:08 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@codesourcery.com> | 2006-11-01 17:31:08 +0000 |
commit | 7b32f059066a7cc68783e2169660e075a0169fb7 (patch) | |
tree | cac16ffaa74a6c9abd442b86ea26b17a89ec5b31 | |
parent | 4fecf3ec9713f5ca17b0d1ecc5dc9fdcd4bfaafc (diff) | |
download | cygnal-7b32f059066a7cc68783e2169660e075a0169fb7.tar.gz cygnal-7b32f059066a7cc68783e2169660e075a0169fb7.tar.bz2 cygnal-7b32f059066a7cc68783e2169660e075a0169fb7.zip |
libgloss/
* m68k/configure.in (DO) Set to list of target cpu families.
* m68k/configure: Rebuilt.
* m68k/Makefile.in (DO): New.
(UNHOSTED_BSP, UNHOSTED_OBJS, HOSTED_BSP, HOSTED_OBJS): Move
later.
(m5208evb, m5213evb, m52235evb, m5235evb, m5273c3, m5275evb,
m5282evb, m5329evb, m5485evb): Move earlier.
(all): Add all_$DO dependencies.
(all_cf, all_m68k): New targets, depend on cf & m68k bsps as
appropriate.
(m%-ram.ld, m%-rom.ld, m%-ram-hosted.ld, m%-rom-hosted.ld): Add
'm' prefix.
(install): Add install_$DO dependencies.
(install_cf, install_m68k): New targets. Perform cf and m68k
installs as appropriate.
(install_io): New, install the io libraries.
-rw-r--r-- | ChangeLog.csl | 18 | ||||
-rw-r--r-- | libgloss/m68k/Makefile.in | 110 | ||||
-rwxr-xr-x | libgloss/m68k/configure | 69 | ||||
-rw-r--r-- | libgloss/m68k/configure.in | 9 |
4 files changed, 131 insertions, 75 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl index 31769a045..9d02f5416 100644 --- a/ChangeLog.csl +++ b/ChangeLog.csl @@ -1,3 +1,21 @@ +2006-11-01 Nathan Sidwell <nathan@codesourcery.com> + + libgloss/ + * m68k/Makefile.in (IS_GCC, DO_CF, DO_M68K): New. + (UNHOSTED_BSP, UNHOSTED_OBJS, HOSTED_BSP, HOSTED_OBJS): Move + later. + (m5208evb, m5213evb, m52235evb, m5235evb, m5273c3, m5275evb, + m5282evb, m5329evb, m5485evb): Move earlier. + (all): Add all_cf & all_m68k conditional dependencies. + (all_cf, all_m68k): New targets, depend on cf & m68k bsps as + appropriate. + (m%-ram.ld, m%-rom.ld, m%-ram-hosted.ld, m%-rom-hosted.ld): Add + 'm' prefix. + (install): Add install_cf, install_m68k conditional dependencies. + (install_cf, install_m68k): New targets. Perform cf and m68k + installs as appropriate. + (install_io): New, install the io libraries. + 2006-10-25 Vladimir Prus <vladimir@codesourcery.com> Merge from HEAD: diff --git a/libgloss/m68k/Makefile.in b/libgloss/m68k/Makefile.in index 2bb8e52de..3e8cfdf64 100644 --- a/libgloss/m68k/Makefile.in +++ b/libgloss/m68k/Makefile.in @@ -69,6 +69,8 @@ OBJS = close.o fstat.o getpid.o isatty.o kill.o \ CFLAGS = -g # ARFLAGS = rv +# What targets to build for. This is a list of {m68k,cf} +DO = @DO@ # Here is all of the simulator stuff SIM_SCRIPTS = sim.ld @@ -118,22 +120,6 @@ IDPGDB_BSP= libidpgdb.a IDPGDB_OBJS= leds.o idp-inbyte.o idp-gdb-outbyte.o mc68ec.o # -# here's all the unhosted stuff -# -UNHOSTED_BSP= libunhosted.a -UNHOSTED_OBJS= unhosted-close.o unhosted-fstat.o \ - unhosted-gettimeofday.o unhosted-isatty.o unhosted-lseek.o \ - unhosted-open.o unhosted-read.o unhosted-rename.o \ - unhosted-stat.o unhosted-system.o unhosted-time.o \ - unhosted-unlink.o unhosted-write.o - -# -# here's all the hosted stuff -# -HOSTED_BSP= libhosted.a -HOSTED_OBJS= hosted-gdb.o hosted-exit.o $(patsubst un%,%,$(UNHOSTED_OBJS)) - -# # here's all the ColdFire boards # CF_CRT0S= cf-hosted-crt0.o cf-unhosted-crt0.o @@ -150,6 +136,17 @@ CF_ISRS= other_interrupt reset access_error address_error \ fp_underflow fp_operand_error fp_overflow fp_input_not_a_number \ fp_input_denormalized_number unsupported_instruction +# RAM ROM +m5208evb := 1024M 16M 0M 2M +m5213evb := 512M 32K 0M 256K +m52235evb := 512M 32K 0M 256K +m5235evb := 0M 16M 0xFFE00000 2M +m5273c3 := 0M 4M 0xFFE00000 2M +m5275evb := 0M 16M 0xFFE00000 2M +m5282evb := 0M 16M 0xFFE00000 2M +m5329evb := 1024M 32M 0M 2M +m5485evb := 0M 64M 1024M 16M + CF_BOARDS := m5208evb m5213evb m52235evb m5235evb m5272c3 m5275evb \ m5282evb m5329evb m5485evb CF_RAM_SCRIPTS := $(patsubst %,%-ram.ld,$(CF_BOARDS)) @@ -158,20 +155,38 @@ CF_HOSTED_SCRIPTS := $(patsubst %.ld,%-hosted.ld,$(CF_RAM_SCRIPTS) $(CF_ROM_SCRI CF_SCRIPTS = $(CF_RAM_SCRIPTS) $(CF_ROM_SCRIPTS) $(CF_HOSTED_SCRIPTS) CF_SOURCES = cf-isv.S cf-crt0.S cf-crt1.c asm.h -# Host specific makefile fragment comes in here. -@host_makefile_frag@ +# +# here's all the unhosted stuff +# +UNHOSTED_BSP= libunhosted.a +UNHOSTED_OBJS= unhosted-close.o unhosted-fstat.o \ + unhosted-gettimeofday.o unhosted-isatty.o unhosted-lseek.o \ + unhosted-open.o unhosted-read.o unhosted-rename.o \ + unhosted-stat.o unhosted-system.o unhosted-time.o \ + unhosted-unlink.o unhosted-write.o # -# build a test program for each target board. Just trying to get -# it to link is a good test, so we ignore all the errors for now. +# here's all the hosted stuff # -all: ${SIM_CRT0} ${SIM_BSP} ${CRT0} ${BCC_BSP} ${IDP_BSP} ${IDPGDB_BSP} \ - ${MVME135_BSP} ${MVME162_BSP} ${HOSTED_BSP} ${UNHOSTED_BSP} \ - ${CF_CRT0S} ${CF_BSP} ${CF_SCRIPTS} +HOSTED_BSP= libhosted.a +HOSTED_OBJS= hosted-gdb.o hosted-exit.o $(patsubst un%,%,$(UNHOSTED_OBJS)) + +# Host specific makefile fragment comes in here. +@host_makefile_frag@ + +all :: $(DO:%=all_%) # # here's where we build the board support packages for each target # + +.PHONY: all_m68k +all_m68k :: ${SIM_CRT0} ${SIM_BSP} ${CRT0} ${BCC_BSP} ${IDP_BSP} \ + ${IDPGDB_BSP} ${MVME135_BSP} ${MVME162_BSP} +.PHONY: all_cf +all_cf :: ${CF_CRT0S} ${CF_BSP} ${CF_SCRIPTS} ${HOSTED_BSP} ${UNHOSTED_BSP} + + ${SIM_BSP}: ${SIM_OBJS} ${AR} ${ARFLAGS} $@ ${SIM_OBJS} ${RANLIB} $@ @@ -222,29 +237,18 @@ $(CF_BSP): $(CF_OBJS) ${AR} ${ARFLAGS} $@ $^ ${RANLIB} $@ -# RAM ROM -m5208evb := 1024M 16M 0M 2M -m5213evb := 512M 32K 0M 256K -m52235evb := 512M 32K 0M 256K -m5235evb := 0M 16M 0xFFE00000 2M -m5273c3 := 0M 4M 0xFFE00000 2M -m5275evb := 0M 16M 0xFFE00000 2M -m5282evb := 0M 16M 0xFFE00000 2M -m5329evb := 1024M 32M 0M 2M -m5485evb := 0M 64M 1024M 16M - -%-ram.ld : cf.sc Makefile - IO=unhosted RAM=$(word 1,$($*)) RAM_SIZE=$(word 2,$($*)) \ +m%-ram.ld : cf.sc Makefile + IO=unhosted RAM=$(word 1,$(m$*)) RAM_SIZE=$(word 2,$(m$*)) \ ${SHELL} $< >$@ -%-rom.ld : cf.sc Makefile - IO=unhosted RAM=$(word 1,$($*)) RAM_SIZE=$(word 2,$($*)) \ - ROM=$(word 3,$($*)) ROM_SIZE=$(word 4,$($*)) ${SHELL} $< >$@ -%-ram-hosted.ld : cf.sc Makefile - IO=hosted RAM=$(word 1,$($*)) RAM_SIZE=$(word 2,$($*)) \ +m%-rom.ld : cf.sc Makefile + IO=unhosted RAM=$(word 1,$(m$*)) RAM_SIZE=$(word 2,$(m$*)) \ + ROM=$(word 3,$(m$*)) ROM_SIZE=$(word 4,$(m$*)) ${SHELL} $< >$@ +m%-ram-hosted.ld : cf.sc Makefile + IO=hosted RAM=$(word 1,$(m$*)) RAM_SIZE=$(word 2,$(m$*)) \ ${SHELL} $< >$@ -%-rom-hosted.ld : cf.sc Makefile - IO=hosted RAM=$(word 1,$($*)) RAM_SIZE=$(word 2,$($*)) \ - ROM=$(word 3,$($*)) ROM_SIZE=$(word 4,$($*)) ${SHELL} $< >$@ +m%-rom-hosted.ld : cf.sc Makefile + IO=hosted RAM=$(word 1,$(m$*)) RAM_SIZE=$(word 2,$(m$*)) \ + ROM=$(word 3,$(m$*)) ROM_SIZE=$(word 4,$(m$*)) ${SHELL} $< >$@ leds.o: ${srcdir}/leds.c $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -c $< @@ -340,7 +344,11 @@ dtor.x: dtor.o ${CRT0} ${srcdir}/mvme135.ld Makefile ${MVME135_BSP} unlink.o: $(srcdir)/../unlink.c .PHONY: install info dvi doc install-info clean-info -install: +install:: $(DO:%=install_%) + + +.PHONY:install_m68k +install_m68k:: # install SIM stuff $(INSTALL_PROGRAM) $(SIM_CRT0) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(SIM_CRT0) $(INSTALL_PROGRAM) $(SIM_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(SIM_BSP) @@ -364,9 +372,9 @@ install: $(INSTALL_DATA) ${srcdir}/mvme162.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/mvme162.ld $(INSTALL_DATA) ${srcdir}/sbc5204.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/sbc5204.ld $(INSTALL_DATA) ${srcdir}/sbc5206.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/sbc5206.ld - # install IO stuff - $(INSTALL_DATA) $(HOSTED_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(HOSTED_BSP) - $(INSTALL_DATA) $(UNHOSTED_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(UNHOSTED_BSP) + +.PHONY: install_cf +install_cf:: install_io # install CF stuff for crt in $(CF_CRT0S) ; \ do $(INSTALL_DATA) $$crt $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$$crt ; \ @@ -379,6 +387,12 @@ install: do $(INSTALL_DATA) ${srcdir}/$$src $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$$src ; \ done +.PHONY: install_io +install_io:: + # install IO stuff + $(INSTALL_DATA) $(HOSTED_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(HOSTED_BSP) + $(INSTALL_DATA) $(UNHOSTED_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(UNHOSTED_BSP) + # target specific makefile fragment comes in here. @target_makefile_frag@ diff --git a/libgloss/m68k/configure b/libgloss/m68k/configure index 1fbf8c890..b3a12683f 100755 --- a/libgloss/m68k/configure +++ b/libgloss/m68k/configure @@ -28,7 +28,6 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= -sitefile= srcdir= target=NONE verbose= @@ -143,7 +142,6 @@ Configuration: --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages - --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX @@ -314,11 +312,6 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; - -site-file | --site-file | --site-fil | --site-fi | --site-f) - ac_prev=sitefile ;; - -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) - sitefile="$ac_optarg" ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -484,16 +477,12 @@ fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -if test -z "$sitefile"; then - if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -else - CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -594,7 +583,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:598: checking host system type" >&5 +echo "configure:587: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -615,7 +604,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:619: checking target system type" >&5 +echo "configure:608: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -633,7 +622,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:637: checking build system type" >&5 +echo "configure:626: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -687,7 +676,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x," # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:691: checking for a BSD compatible install" >&5 +echo "configure:680: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -751,7 +740,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:755: checking for $ac_word" >&5 +echo "configure:744: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -781,7 +770,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:785: checking for $ac_word" >&5 +echo "configure:774: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -830,7 +819,7 @@ fi fi echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:834: checking whether we are using GNU C" >&5 +echo "configure:823: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -839,7 +828,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -854,7 +843,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:858: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:847: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -891,7 +880,7 @@ LD=${LD-ld} # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:895: checking for $ac_word" >&5 +echo "configure:884: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -919,6 +908,31 @@ else fi +echo $ac_n "checking target cpu family""... $ac_c" 1>&6 +echo "configure:913: checking target cpu family" >&5 +cat > conftest.$ac_ext <<EOF +#line 915 "configure" +#include "confdefs.h" + +int main() { +#ifdef __mcoldfire__ + we are coldfire + #endif +; return 0; } +EOF +if { (eval echo configure:924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + DO=m68k +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + DO=cf +fi +rm -f conftest* +echo "$ac_t""$DO" 1>&6 + + host_makefile_frag=${srcdir}/../config/default.mh target_makefile_frag=${srcdir}/../config/default.mt @@ -1097,6 +1111,7 @@ s%@AS@%$AS%g s%@AR@%$AR%g s%@LD@%$LD%g s%@RANLIB@%$RANLIB%g +s%@DO@%$DO%g s%@host_makefile_frag_path@%$host_makefile_frag_path%g /@host_makefile_frag@/r $host_makefile_frag s%@host_makefile_frag@%%g @@ -1111,7 +1126,7 @@ cat >> $CONFIG_STATUS <<\EOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=60 # Maximum number of lines to put in a sed script. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_cmds # Line after last line for current file. diff --git a/libgloss/m68k/configure.in b/libgloss/m68k/configure.in index 6cb89ca16..fa9147916 100644 --- a/libgloss/m68k/configure.in +++ b/libgloss/m68k/configure.in @@ -82,6 +82,15 @@ LD=${LD-ld} AC_SUBST(LD) AC_PROG_RANLIB +AC_MSG_CHECKING([target cpu family]) +AC_TRY_COMPILE(,[#ifdef __mcoldfire__ + we are coldfire + #endif], + DO=m68k, + DO=cf) +AC_MSG_RESULT($DO) +AC_SUBST(DO) + host_makefile_frag=${srcdir}/../config/default.mh target_makefile_frag=${srcdir}/../config/default.mt |