diff -r a839e331f06f -r d6ac3b48e3a2 extras/mini-os/arch/ia64/time.c --- a/extras/mini-os/arch/ia64/time.c Thu Apr 12 14:13:04 2007 +0100 +++ b/extras/mini-os/arch/ia64/time.c Fri Apr 13 16:35:41 2007 +0100 @@ -178,7 +178,7 @@ monotonic_clock(void) } void -gettimeofday(struct timeval *tv) +_xgettimeofday(struct timeval *tv) { calculate_time(); tv->tv_sec = os_time.ts_sec; /* seconds */ diff -r a839e331f06f -r d6ac3b48e3a2 extras/mini-os/arch/x86/time.c --- a/extras/mini-os/arch/x86/time.c Thu Apr 12 14:13:04 2007 +0100 +++ b/extras/mini-os/arch/x86/time.c Fri Apr 13 16:35:41 2007 +0100 @@ -183,7 +183,7 @@ static void update_wallclock(void) } -void gettimeofday(struct timeval *tv) +void _xgettimeofday(struct timeval *tv) { u64 nsec = monotonic_clock(); nsec += shadow_ts.ts_nsec; @@ -198,7 +198,7 @@ void block_domain(s_time_t until) void block_domain(s_time_t until) { struct timeval tv; - gettimeofday(&tv); + _xgettimeofday(&tv); if(monotonic_clock() < until) { HYPERVISOR_set_timer_op(until); diff -r a839e331f06f -r d6ac3b48e3a2 extras/mini-os/console/console.c --- a/extras/mini-os/console/console.c Thu Apr 12 14:13:04 2007 +0100 +++ b/extras/mini-os/console/console.c Fri Apr 13 16:35:41 2007 +0100 @@ -59,17 +59,122 @@ extern int xencons_ring_send_no_notify(c NOTE: you need to enable verbose in xen/Rules.mk for it to work. */ static int console_initialised = 0; +/* special characters */ +#define ERASE_CHAR 127 /* delete character */ +#define EOL_CHAR '\n' /* marks end of line */ +#define EOT_CHAR '\004' /* Ctrl-D marks EOF */ + +/* circular buffer for input */ +#define INP_BUFF_SIZE 256 +#define INP_BUFF_MASK (INP_BUFF_SIZE - 1) +static volatile char inp_buff[INP_BUFF_SIZE]; + /* circular buffer for character input */ +static volatile int fill_ptr; /* next free char slot */ +static volatile int edit_ptr; /* chars from empty_ptr to (edit_ptr - 1) */ +static volatile int empty_ptr; /* are edited and ready to be read by app */ + +/* list of tasks waiting for console input */ +static DECLARE_WAIT_QUEUE_HEAD(cons_waitq); + +long console_input(char *data, int leng) +/* read up to end of line, EOT or "leng" chars into buffer "data", + whichever is least, and return number of chars read */ +{ + long count; + int i = 0; + + if (!console_initialised) { + printk("console not init\n"); + + return -1; /* console not yet initialised */ + } + + /* wait for input to become available */ + wait_event(cons_waitq, edit_ptr != empty_ptr); + count = (edit_ptr - empty_ptr) & INP_BUFF_MASK; + + if (count > leng) + count = leng; + + while (i < count) { + char ch = inp_buff[empty_ptr]; + empty_ptr = (empty_ptr + 1) & INP_BUFF_MASK; + + if (ch == EOT_CHAR) + break; /* marks end of record, not copied */ + + data[i++] = ch; + + if (ch == '\n') + break; /* marks end of record, copied to caller */ + } + + return (i); +} + +static void delete_char(void) +{ + char ch; + + if (fill_ptr == edit_ptr) + return; /* already at start of line */ + + fill_ptr = (fill_ptr - 1) & INP_BUFF_MASK; + ch = inp_buff[fill_ptr]; /* remove char from buffer */ + + if (ch < ' ') + printk("\b \b"); + + printk("\b \b"); +} + +static void echo_char(char ch) +{ + if (ch < ' ' && !(ch == '\n')) { + printk("^"); + ch += 64; + } + + printk("%c", ch); +} + +static void put_input_char(char ch) +{ + if (((fill_ptr + 1) & INP_BUFF_MASK) == empty_ptr) { + /* buffer full */ + printk("\a"); + return; + } + + inp_buff[fill_ptr] = ch; + fill_ptr = (fill_ptr + 1) & INP_BUFF_MASK; + + if (ch != EOT_CHAR) + echo_char(ch); + + if (ch == EOL_CHAR || ch == EOT_CHAR) { + edit_ptr = fill_ptr; + wake_up(&cons_waitq); + } +} void xencons_rx(char *buf, unsigned len, struct pt_regs *regs) { - if(len > 0) - { - /* Just repeat what's written */ - buf[len] = '\0'; - printk("%s", buf); - - if(buf[len-1] == '\r') - printk("\nNo console input handler.\n"); + int i; + int ch; + + for (i = 0; i < len; i++) { + ch = buf[i]; + + if (ch == '\r') + ch = '\n'; + + if (ch == ERASE_CHAR) { + delete_char(); + continue; + } + + put_input_char(ch); } } @@ -148,6 +253,7 @@ void init_console(void) void init_console(void) { printk("Initialising console ... "); + fill_ptr = edit_ptr = empty_ptr = 0; xencons_ring_init(); console_initialised = 1; /* This is also required to notify the daemon */ diff -r a839e331f06f -r d6ac3b48e3a2 extras/mini-os/domain_config --- a/extras/mini-os/domain_config Thu Apr 12 14:13:04 2007 +0100 +++ b/extras/mini-os/domain_config Fri Apr 13 16:35:41 2007 +0100 @@ -8,7 +8,7 @@ #---------------------------------------------------------------------------- # Kernel image file. -kernel = "mini-os.elf" +kernel = "mini-os.gz" # Initial memory allocation (in megabytes) for the new domain. memory = 32 diff -r a839e331f06f -r d6ac3b48e3a2 extras/mini-os/include/console.h --- a/extras/mini-os/include/console.h Thu Apr 12 14:13:04 2007 +0100 +++ b/extras/mini-os/include/console.h Fri Apr 13 16:35:41 2007 +0100 @@ -41,6 +41,10 @@ void printk(const char *fmt, ...); void printk(const char *fmt, ...); void xprintk(const char *fmt, ...); +long console_input(char *data, int leng); +/* read up to end of line, EOT or "leng" chars into buffer "data", + whichever comes first, and return number of chars read */ + void xencons_rx(char *buf, unsigned len, struct pt_regs *regs); void xencons_tx(void); diff -r a839e331f06f -r d6ac3b48e3a2 extras/mini-os/include/time.h --- a/extras/mini-os/include/time.h Thu Apr 12 14:13:04 2007 +0100 +++ b/extras/mini-os/include/time.h Fri Apr 13 16:35:41 2007 +0100 @@ -59,7 +59,7 @@ s_time_t get_s_time(void); s_time_t get_s_time(void); s_time_t get_v_time(void); u64 monotonic_clock(void); -void gettimeofday(struct timeval *tv); +void _xgettimeofday(struct timeval *tv); void block_domain(s_time_t until); #endif /* _TIME_H_ */ diff -r a839e331f06f -r d6ac3b48e3a2 extras/mini-os/include/xmalloc.h --- a/extras/mini-os/include/xmalloc.h Thu Apr 12 14:13:04 2007 +0100 +++ b/extras/mini-os/include/xmalloc.h Fri Apr 13 16:35:41 2007 +0100 @@ -15,6 +15,7 @@ extern void xfree(const void *); /* Underlying functions */ extern void *_xmalloc(size_t size, size_t align); +extern void *_xrealloc(const void *p, size_t size, size_t align); static inline void *_xmalloc_array(size_t size, size_t align, size_t num) { /* Check for overflow. */ diff -r a839e331f06f -r d6ac3b48e3a2 extras/mini-os/kernel.c --- a/extras/mini-os/kernel.c Thu Apr 12 14:13:04 2007 +0100 +++ b/extras/mini-os/kernel.c Fri Apr 13 16:35:41 2007 +0100 @@ -62,36 +62,61 @@ void setup_xen_features(void) void test_xenbus(void); -static void xenbus_tester(void *p) +/* static void xenbus_tester(void *p) */ +/* { */ +/* printk("Xenbus tests disabled, because of a Xend bug.\n"); */ +/* /\* test_xenbus(); *\/ */ +/* } */ + +/* static void periodic_thread(void *p) */ +/* { */ +/* struct timeval tv; */ +/* printk("Periodic thread started.\n"); */ +/* for(;;) */ +/* { */ +/* _xgettimeofday(&tv); */ +/* printk("T(s=%ld us=%ld)\n", tv.tv_sec, tv.tv_usec); */ +/* sleep(1000); */ +/* } */ +/* } */ + +/* static void netfront_thread(void *p) */ +/* { */ +/* init_netfront(&start_info); */ +/* } */ + +__attribute__((weak)) int +main (int argc, char *argv[]) { + int i; + printk("Xenbus tests disabled, because of a Xend bug.\n"); + + for (i = 0; i < 1000000000; i++) + ; /* busy loop -- there is a race in xm */ + /* test_xenbus(); */ + return (0); } -static void periodic_thread(void *p) +void +_main(void *p) { - struct timeval tv; - printk("Periodic thread started.\n"); - for(;;) - { - gettimeofday(&tv); - printk("T(s=%ld us=%ld)\n", tv.tv_sec, tv.tv_usec); - sleep(1000); - } -} - -static void netfront_thread(void *p) -{ - init_netfront(&start_info); + char *_argv[1] = {0}; + int status = main(0, _argv); + if (status) + printk("Mini-OS application exited with a status of %d\n", status); + do_exit(); } /* This should be overridden by the application we are linked against. */ __attribute__((weak)) int app_main(start_info_t *si) { - printk("Dummy main: start_info=%p\n", si); - create_thread("xenbus_tester", xenbus_tester, si); - create_thread("periodic_thread", periodic_thread, si); - create_thread("netfront", netfront_thread, si); +/* printk("Dummy main: start_info=%p\n", si); */ +/* create_thread("xenbus_tester", xenbus_tester, si); */ +/* create_thread("periodic_thread", periodic_thread, si); */ +/* create_thread("netfront", netfront_thread, si); */ + create_thread("main", _main, si); return 0; } diff -r a839e331f06f -r d6ac3b48e3a2 extras/mini-os/lib/xmalloc.c --- a/extras/mini-os/lib/xmalloc.c Thu Apr 12 14:13:04 2007 +0100 +++ b/extras/mini-os/lib/xmalloc.c Fri Apr 13 16:35:41 2007 +0100 @@ -223,3 +223,39 @@ void xfree(const void *p) /* spin_unlock_irqrestore(&freelist_lock, flags); */ } + +/* Very simple realloc() implementation -- doesn't try to extend in place */ + +#define min(x,y) ({ \ + typeof(x) tmpx = (x); \ + typeof(y) tmpy = (y); \ + tmpx < tmpy ? tmpx : tmpy; \ + }) + +static size_t +xsizeof(const void *p) +{ + struct xmalloc_hdr *hdr; + + if ( p == NULL ) + return (0); + + hdr = (struct xmalloc_hdr *)p - 1; + + return (hdr->size - sizeof (struct xmalloc_hdr)); +} + +void * +_xrealloc(const void *p, size_t size, size_t align) +{ + void *p2 = NULL; + + if (size > 0) + { + p2 = _xmalloc(size, align); + memcpy(p2, p, min(size, xsizeof(p))); + } + + xfree(p); + return (p2); +} diff -r a839e331f06f -r d6ac3b48e3a2 extras/mini-os/sched.c --- a/extras/mini-os/sched.c Thu Apr 12 14:13:04 2007 +0100 +++ b/extras/mini-os/sched.c Fri Apr 13 16:35:41 2007 +0100 @@ -241,10 +241,10 @@ void th_f1(void *data) up(&mutex); - gettimeofday(&tv1); + _xgettimeofday(&tv1); for(;;) { - gettimeofday(&tv2); + _xgettimeofday(&tv2); if(tv2.tv_sec - tv1.tv_sec > 2) break; } diff -r a839e331f06f -r d6ac3b48e3a2 extras/devenv/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extras/devenv/README Fri Apr 13 16:35:41 2007 +0100 @@ -0,0 +1,3 @@ +This directory contains patches and instructions for building a +development environment to support cross development for small +applications running in a separate domain under Mini-OS. diff -r a839e331f06f -r d6ac3b48e3a2 extras/devenv/docs/build-cross-dev-env/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extras/devenv/docs/build-cross-dev-env/Makefile Fri Apr 13 16:35:41 2007 +0100 @@ -0,0 +1,31 @@ +# $Id: Makefile,v 1.1 2006/09/13 08:56:14 mja Exp $ +# + +SRC=build-cross-dev-env.tex bibliography.bib + +DIAG=app-overview.pdf dev-chain-overview.pdf + +# useful make targets +all: build-cross-dev-env.pdf + +pdf: build-cross-dev-env.pdf + +%.eps: %.fig + fig2dev -Leps -m0.65 $< $@ + +%.pdf: %.eps + epstopdf $< --outfile=$@ + +build-cross-dev-env.pdf: $(SRC) $(DIAG) + latex \\batchmode \\input build-cross-dev-env ; \ + bibtex build-cross-dev-env ; \ + thumbpdf build-cross-dev-env ; \ + while ( \ + latex \\batchmode \\input build-cross-dev-env ; \ + grep "Rerun" build-cross-dev-env.log > /dev/null ) do true ; \ + done + +clean: + rm -rf *.aux *.dvi *.lof *.log *.lot *.toc $(DIAG) *.bak *.eps *.bbl + rm -rf *.blg *.brf *.out *.tpt *~ + diff -r a839e331f06f -r d6ac3b48e3a2 extras/devenv/docs/build-cross-dev-env/app-overview.fig --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extras/devenv/docs/build-cross-dev-env/app-overview.fig Fri Apr 13 16:35:41 2007 +0100 @@ -0,0 +1,67 @@ +#FIG 3.2 +Portrait +Center +Metric +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 6525 2700 6525 6750 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 5625 2700 5625 4275 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 4725 3825 4725 4275 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 5400 5400 6300 5400 6300 6300 5400 6300 5400 5400 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 5850 6300 5850 6750 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 5625 7425 5625 7875 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 5850 4950 5850 5400 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 4725 4950 4725 5400 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3825 7875 7875 7875 7875 8550 3825 8550 3825 7875 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4275 5400 5175 5400 5175 6300 4275 6300 4275 5400 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 5400 3150 3600 3150 3600 3825 5400 3825 5400 3150 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 6750 3150 8550 3150 8550 3825 6750 3825 6750 3150 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4725 2025 7425 2025 7425 2700 4725 2700 4725 2025 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 4950 2700 4950 3150 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 7200 2700 7200 3150 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4050 4275 6300 4275 6300 4950 4050 4950 4050 4275 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4275 6750 6975 6750 6975 7425 4275 7425 4275 6750 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 4725 6300 4725 6750 +4 1 0 50 -1 18 12 0.0000 4 135 510 5850 5850 Other\001 +4 1 0 50 -1 18 12 0.0000 4 135 660 5850 6075 Drivers\001 +4 1 0 50 -1 18 12 0.0000 4 135 720 5625 7200 Mini-OS\001 +4 1 0 50 -1 18 12 0.0000 4 135 690 4725 5850 Console\001 +4 1 0 50 -1 18 12 0.0000 4 135 555 4725 6075 Driver\001 +4 1 0 50 -1 18 12 0.0000 4 180 960 6075 2475 Application\001 +4 1 0 50 -1 18 12 0.0000 4 135 840 5850 8325 Xen VMM\001 +4 1 0 50 -1 18 12 0.0000 4 135 1335 7650 3600 Other Libraries\001 +4 1 0 50 -1 18 12 0.0000 4 180 1620 5175 4725 level OS Support)\001 +4 1 0 50 -1 18 12 0.0000 4 135 300 4500 3375 libc\001 +4 1 0 50 -1 18 12 0.0000 4 180 1530 4500 3600 (Red Hat newlib)\001 +4 1 0 50 -1 18 12 0.0000 4 180 1740 5175 4500 libgloss (GNU Low-\001 diff -r a839e331f06f -r d6ac3b48e3a2 extras/devenv/docs/build-cross-dev-env/bibliography.bib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extras/devenv/docs/build-cross-dev-env/bibliography.bib Fri Apr 13 16:35:41 2007 +0100 @@ -0,0 +1,240 @@ +@article{1113363, + author = {Gernot Heiser and Volkmar Uhlig and Joshua LeVasseur}, + title = {Are virtual-machine monitors microkernels done right?}, + journal = {SIGOPS Oper. Syst. Rev.}, + volume = {40}, + number = {1}, + year = {2006}, + issn = {0163-5980}, + pages = {95--99}, + doi = {http://doi.acm.org/10.1145/1113361.1113363}, + publisher = {ACM Press}, + address = {New York, NY, USA}, + } + +@inproceedings{1133376, + author = {Hermann H\"artig}, + title = {Security architectures revisited}, + booktitle = {EW10: Proceedings of the 10th workshop on ACM SIGOPS European workshop: beyond the PC}, + year = {2002}, + pages = {16--23}, + location = {Saint-Emilion, France}, + doi = {http://doi.acm.org/10.1145/1133373.1133376}, + publisher = {ACM Press}, + address = {New York, NY, USA}, + } + +@inproceedings{1133615, + author = {Michael Hohmuth and Michael Peter and Hermann H\"artig and Jonathan S. Shapiro}, + title = {Reducing TCB size by using untrusted components: small kernels versus virtual-machine monitors}, + booktitle = {EW11: Proceedings of the 11th workshop on ACM SIGOPS European workshop: beyond the PC}, + year = {2004}, + pages = {22}, + location = {Leuven, Belgium}, + doi = {http://doi.acm.org/10.1145/1133572.1133615}, + publisher = {ACM Press}, + address = {New York, NY, USA}, + } + +@InProceedings{vmm-micro, + author = {Steven Hand and Andrew Warfield and Keir Fraser and Evangelos Kotsovinos}, + title = {Are Virtual Machine Monitors Microkernels Done Right?}, + booktitle = {HotOS X, Tenth Workshop on Hot Topics in Operating Systems}, + year = 2005, + organization = {Usenix} +} + +@proceedings{DBLP:conf/acsac/2005, + title = {21st Annual Computer Security Applications Conference (ACSAC + 2005), 5-9 December 2005, Tucson, AZ, USA}, + booktitle = {ACSAC}, + publisher = {IEEE Computer Society}, + year = {2005}, + isbn = {0-7695-2461-3}, + bibsource = {DBLP, http://dblp.uni-trier.de} +} + +@TECHREPORT{anderson72, +AUTHOR = {Anderson, J. P.}, +TITLE = "{Computer Security Technology Planning Study}", +INSTITUTION = {USAF Electronic Systems Division}, +ADDRESS = {Hanscom Air Force Base, Bedford, Massachusetts}, +MONTH = {October}, +YEAR = {1972}, +NUMBER = {ESD-TR-73-51}, +VOLUME = {2} +} + +@misc{ rushby84, + author = "J. Rushby", + title = "A trusted computing base for embedded systems", + text = "John Rushby. A trusted computing base for embedded systems. In Proceedings + 7th DoD/NBS Computer Security Initiative Conference, pages 294--311, Gaithersburg, + MD, September 1984. 10", + year = "1984", + url = "citeseer.ist.psu.edu/rushby84trusted.html" } + +@InProceedings{MadDon73, + author = {Stuart E. Madnick and John J. Donovan}, + title = {Application and analysis of the virtual machine approach to +information system security and isolation}, + booktitle = {Proceedings of the workshop on virtual computer systems}, + pages = {210--224}, + year = 1973, + organization = {ACM SIGARCH-SIGOPS} +} + + + +@TechReport{otca2006, + author = {Dirk Kuhlmann and Rainer Landfermann and Hari V. Ramasamy and Matthias Schunter and Gianluca Ramunno and Davide Vernizzi}, + title = {An Open Trusted Computing Architecture---Secure Virtual Machines Enabling User-Defined Policy Enforcement}, + institution = {IBM Research}, + year = 2006, + number = {RZ 3655} +} + +@Manual{newlib, + title = {The Red Hat newlib C Library}, + organization = {Red Hat Inc.}, + year = 2004, + note = {Software and documentation available from % +\url{ftp://sources.redhat.com/pub/newlib/index.html}} +} + + +@Article{gatliff-general, + author = {Bill Gatliff}, + title = {General notes on cross compilation with {GNU} tools}, + journal = {Web article}, + year = 2003, + note = {Available from \url{http://web.archive.org/web/20031207191536/crossgcc.billgatliff.com/crossgccfaq/t1.html}} +} + + + + + +@Manual{porting-gnu, + title = {Embed With {GNU}---Porting The {GNU} Tools To Embedded Systems}, + author = {Rob Savoye}, + organization = {Cygnus Support}, + year = 1995, + note = {Part of Red Hat newlib distribution in file {\tt + libgloss/doc/porting.texi}} +} + +@Article{gatliff-newlib, + author = {Bill Gatliff}, + title = {Embedding with {GNU}: Newlib}, + journal = {Embedded.com}, + volume = 15, + number = 1, + year = 2002, + month = {January}, + note = {Available from \url{http://www.embedded.com/2002/0201}} +} + +@Article{kalbfeld-rtems, + author = {Jonathan Kalbfeld}, + title = {Develop an {RTOS} on {Solaris} with {RTEMS}}, + journal = {Embedded.com}, + volume = 19, + number = 11, + year = 2006, + month = {November}, + note = {Available from \url{http://www.embedded.com/2006/0611}} +} + +@Article{gatliff-newlib2, + author = {Bill Gatliff}, + title = {Embedding with {GNU}: Newlib Part 2}, + journal = {Embedded.com}, + volume = 15, + number = 1, + year = 2002, + month = {January}, + note = {Available from \url{http://www.embedded.com/2002/0201}} +} + +@Article{gatliff-gcc-gld, + author = {Bill Gatliff}, + title = {Embedding with {GNU}: The {GNU} Compiler and Linker}, + journal = {Embedded.com}, + year = 2000, + volume = 13, + number = 2, + month = {February}, + note = {Available from \url{http://www.embedded.com/2000/0002}} +} + +@Misc{opentc, + key = {OTC}, + note = {See website \url{http://www.opentc.net/}} +} + +@Misc{l4, + key = {L4}, + note = {See website \url{http://os.inf.tu-dresden.de/L4/}} +} + +@inproceedings{chorus, + author = "Rozier, M. and Abrossimov, V. and Armand, F. and Boule, I. and Gien, M. and Guillemont, M. and Herrman, F. and Kaiser, C. and Langlois, S. and L\'{e}onard, P. and Neuhauser, W.", + title = "Overview of the {C}horus Distributed Operating System", + booktitle = "Workshop on Micro-Kernels and Other Kernel Architectures", + address = "Seattle WA (USA)", + pages = "39--70", + year = "1992", + url = "citeseer.ist.psu.edu/article/rozier92overview.html" } + +@article{amoeba, + author = "Sape J. Mullender and Guido van Rossum and Andrew S. Tanenbaum and Robbert van Renesse and Hans van Staveren", + title = "Amoeba: A Distributed Operating System for the 1990s", + journal = "IEEE Computer", + volume = "23", + number = "5", + pages = "44-53", + year = "1990", + url = "citeseer.ist.psu.edu/article/mullender90amoeba.html" } + +@Article{mach, + author = {M. Acceta and R. V. Baron and W. Bolosky and D. B. Golub and R. F. Rashid and A. Tevanian Jr. and M. W. Young}, + title = {Mach: A new kernel foundation for UNIX development}, + journal = {Proc. 1986 USENIX Summer Technical Conference}, + year = 1986, + month = {June} +} + +@Article{hendricks79, + author = {E. C. Hendricks and T. C. Hartmann}, + title = {Evolution of a Virtual Machine Subsystem}, + journal = {IBM Systems Journal}, + year = 1979, + volume = 18, + number = 1, + pages = {111--142} +} + +@article{234473, + author = {Jochen Liedtke}, + title = {Toward real microkernels}, + journal = {Commun. ACM}, + volume = {39}, + number = {9}, + year = {1996}, + issn = {0001-0782}, + pages = {70--77}, + doi = {http://doi.acm.org/10.1145/234215.234473}, + publisher = {ACM Press}, + address = {New York, NY, USA}, +} + +@MANUAL{tcsec, + TITLE = {Department of Defense Trusted Computer System Evaluation + Criteria}, + MONTH = DEC, + YEAR = 1985, + ORGANIZATION = {Department of Defense}, + NOTE = {DOD 5200.28-STD (supersedes CSC-STD-001-83)} +} + diff -r a839e331f06f -r d6ac3b48e3a2 extras/devenv/docs/build-cross-dev-env/build-cross-dev-env.tex --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extras/devenv/docs/build-cross-dev-env/build-cross-dev-env.tex Fri Apr 13 16:35:41 2007 +0100 @@ -0,0 +1,626 @@ +\documentclass[a4paper]{article} +\usepackage{times} +\usepackage{thumbpdf} +\usepackage[pdftex, +% colorlinks=true, +% urlcolor=rltblue, % \href{...}{...} external (URL) +% filecolor=rltgreen, % \href{...} local file +% linkcolor=rltred, % \ref{...} and \pageref{...} + pdftitle={Building and using the GNU cross-development + tool chain for Xen Mini-OS applications}, + pdfauthor={Melvin Anderson}, + pdfsubject={Building and using the GNU cross-development + tool chain for Xen Mini-OS applications}, + pdfkeywords={GNU tool chain, Xen, Mini-OS}, + pdfproducer={pdfLaTeX}, +% pdfadjustspacing=1, + pagebackref, + pdfpagemode=None, + bookmarksopen=true]{hyperref} +\usepackage{graphics} +\usepackage{color} +%\definecolor{rltred}{rgb}{0.75,0.25,0.25} +%\definecolor{rltgreen}{rgb}{0.25,0.5,0.25} +%\definecolor{rltblue}{rgb}{0.25,0.25,0.75} +%\usepackage{changebar} + +\setlength{\parskip}{\medskipamount} +\setlength{\parindent}{0pt} +%\renewcommand{\baselinestretch}{1.1} + +\title{Building and Using the GNU Cross Development Tool Chain for Xen + Mini-OS Applications} +\author{M. J. Anderson} +%\date{27th July 2006} + + +% Commands to enforce a consistent typeface for library names, etc. +\newcommand{\newlib}{{\tt newlib}} +\newcommand{\libgloss}{{\tt libgloss}} +\newcommand{\binutils}{{\tt binutils}} +\newcommand{\gcc}{{\tt gcc}} +\newcommand{\gnu}{GNU} +\newcommand{\gmp}{{\tt gmp}} + +\newenvironment{aside}{\it\small{}}{} + +\begin{document} +\pagestyle{headings} + +\bibliographystyle{alpha} + +\maketitle + +\tableofcontents + +\section{Introduction} +\label{chap:introduction} + +The aim of this document is to describe how to build applications that +can run stand-alone in a Xen domain. The current version will only +build for i386 architecture, but this will be extended in the future. + +Figure~\ref{fig:app-overview} gives an overview of the components of a typical +self-contained application that can be loaded by the Xen domain builder. + +\begin{figure*}[ht] +\begin{center} +\includegraphics{app-overview} +\end{center} +\caption{Overview of application and libraries} +\label{fig:app-overview} +\end{figure*} + +The application interfaces are provided by the Red Hat C Library +(\newlib, see section~\ref{sec:newlib}), a Posix-like system call +layer (\libgloss, \gnu{} Low-level OS support, see +section~\ref{sec:syscall}), device interfaces (see +section~\ref{sec:devices}), the Mini-OS kernel (see +section~\ref{sec:minios}), and any libraries required by the +application. For maximum portability, application writers are +recommended to use the \newlib{} interface in preference to Mini-OS +interfaces where possible. + +\begin{figure*}[ht] +\begin{center} +\includegraphics{dev-chain-overview} +\end{center} +\caption{Overview of Development Chain} +\label{fig:dev-chain-overview} +\end{figure*} + +The development tools use the \gnu{} cross-development tool chain, shown in +figure~\ref{fig:dev-chain-overview}. For background information on +the \gnu{} tool chain the web page~\cite{gatliff-general} is a good +introduction to cross-compilation, and further information on using +the \gnu{} C compiler +\gcc{} and \gnu{} {\tt ld} is given in~\cite{gatliff-gcc-ld}. The +articles~\cite{gatliff-newlib} and~\cite{gatliff-newlib2} provide +useful information about Red Hat \newlib. + +Thanks are also due to +John Ramsdell's postings to the Xen mailing lists for getting me started. + +\section{Building and Installing the Development Tools} + + +In outline the steps to build and install the development tools are: +\begin{itemize} +\item compile and install the assembler, linker and support routines + from the binary utilities (\binutils} package; +\item compile and install a bootstrap version of \gcc{} + without libraries; +\item compile the Mini-OS kernel and start-up code; +\item compile and install Red Hat \newlib{} (also installs + the Mini-OS kernel); and +\item compile and install a final version of \gcc. +\item compile and install any additional libraries needed. +\end{itemize} + +It is convenient to install the tools, headers and libraries in their +own directory to keep them separate from the native program +development tool chain. In +this document it is assumed that the tools will be installed under +{\tt \$HOME/minios-devenv}. In the instructions that follow it is +assumed that the shell search path includes this directory, possibly +by adding the following to the {\tt ~/.bashrc} file (or equivalent for +other shells). + +\begin{small} +\begin{verbatim} + export PATH=$PATH:$HOME/minios-devenv/bin +\end{verbatim} +\end{small} + + +The tool chain will be built for a new target architecture called {\tt +i386-minios} (or {\tt x86\_64-minios} for the AMD64 version). Patches +need to be applied to the \gnu{} tools to support the new target +architecture---see appendix~\ref{app:patches} for details. + +\subsection{Building the Binary Utilities} + +The \binutils{} package includes support programs needed by \gcc{} +such as the assembler and linker. + +Download the sources from \url{ftp://ftp.gnu.org/gnu/binutils/}, +selecting version {\tt binutils-2.16.1.tar.gz}. Extract the tar +archive and apply the patches that should be available in the same +place you found this document. + +\begin{small} +\begin{verbatim} + mkdir binutils-i386-minios; cd binutils-i386-minios + ../binutils-2.16.1/configure --target=i386-minios \ + --prefix=${HOME}/minios-devenv + make; make install +\end{verbatim} +\end{small} + +This configures the tools for target {\tt i386-minios}, and will +install the tools under {\tt \${HOME}/minios-devenv}. It is good +practice to create a directory tree {\tt +binutils-\linebreak[0]i386-\linebreak[0]minios} for building the tools +that is separate from the source tree {\tt +binutils-\linebreak[0]2.16.1}. This makes it easier to build tools +for multiple target architectures, and also allows the entire build +tree to be deleted when it is no longer needed. + + +\subsection{Building the \gnu{} C Compiler} + +Download sources from \url{ftp://ftp.gnu.org/gnu/gcc/} and select the +version {\tt gcc-4.1.0.tar.bz2}. Extract the tar +archive and apply the patches that should be available in the same +place you found this document. + +The problem in building \gcc{} is that it normally uses its own libraries +and start-up code such as {\tt crt0.o}. There are two ways to get +around this problem. The first is to build just the +core of \gcc, use that to build \newlib, and then complete building +\gcc. The alternative is to create a symbolic link between the \gcc{} +source tree and the \newlib{} source tree so that \gcc{} and the +library are built together as illustrated by~\cite{kalbfeld-rtems} + +To build the core components of \gcc{} extract the tar archive, {\tt cd} +into the top of the source directory, run configure and build \gcc{} +only without any of its support routines. +% +\begin{small} +\begin{verbatim} + mkdir gcc-i386-minios; cd gcc-i386-minios + ../gcc-4.1.0/configure --target=i386-minios \ + --prefix=${HOME}/minios-devenv \ + --enable-languages=c \ + --without-headers --with-newlib + make all-gcc; make install-gcc +\end{verbatim} +\end{small} + + +\subsection{Building the Mini-OS library} + +After \gcc{} has been compiled, it can be used to build +Mini-OS by setting the make macro {\tt CROSS\_COMPILE=i386-minios-} to +pick up the newly built compiler. Setting {\tt HAVE\_LIBC} is also +necessary to prevent the few {\tt libc} functions in Mini-OS from +being compiled. +% +\begin{small} +\begin{verbatim} + cd ...../xen-unstable.hg/extras/mini-os/ + make CROSS_COMPILE=i386-minios- \ + CPPFLAGS=-DHAVE_LIBC libminios.a +\end{verbatim} +\end{small} +% +We now have to copy the Mini-OS include files, library archive and +start-up code into the development environment tools area by hand +(this could be added to the makefile, but I don't want to change +Mini-OS more than necessary). +% +\begin{small} +\begin{verbatim} + cp libminios.a ${HOME}/minios-devenv/i386-minios/lib + cp x86_32.o ${HOME}/minios-devenv/i386-minios/lib +\end{verbatim} +\end{small} + +\subsection{Building the Red Hat C Library} + +Download sources from +\url{ftp://sources.redhat.com/pub/newlib/index.html}, version +1.14.0. Extract the tar archive and apply the patches that should be +available in the same place you found this document. This builds and +installs \newlib{} and the support library {\tt libgloss}. Installing +{\tt libgloss} also installs parts of the Mini-OS library built in the +previous step. + +Once again run configure with the following arguments: +% +\begin{small} +\begin{verbatim} + mkdir newlib-i386-minios; cd newlib-i386-minios + ../newlib-1.14.0/configure \ + --target=i386-minios \ + --prefix=${HOME}/minios-devenv \ + --disable-newlib-io-float + make; make install +\end{verbatim} +\end{small} + +Option {\tt --disable-newlib-io-float} disables floating point +support in {\tt printf}, {\tt scanf} and related functions. Floating point +support is not useful as Mini-OS does not save and restore floating point +registers on task changes. + +\subsection{Completing compilation of the \gnu C Compiler} + + +Notice that {\tt libssp} (stack smash protection) doesn't seem to +work in the cross-development environment: +% +\begin{small} +\begin{verbatim} + cd gcc-i386-minios + ../gcc-4.1.0/configure --target=i386-minios \ + --prefix=${HOME}/minios-devenv \ + --disable-libssp --enable-languages=c + make all; make install +\end{verbatim} +\end{small} + + +\subsection{Building Additional Libraries} + +It is possible to build and install additional libraries as needed. +For example, a virtual TPM may require the \gnu multi-precision +arithmetic package \gmp. + +Download sources from \url{ftp://ftp.gnu.org/gnu/gmp} and select the +version {\tt gmp-4.2.1.tar.bz2}. Extract the tar +archive and apply the patches that should be available in the same +place you found this document. Compile the package with the following +commands: +% +\begin{small} +\begin{verbatim} + mkdir gmp-i386-minios; cd gmp-i386-minios + ../gmp-4.2.1/configure --host=i386-minios \ + --prefix=${HOME}/minios-devenv --without-fp + make; make install +\end{verbatim} +\end{small} + + +\section{Using the Development Tool Chain} + +The advantage of configuring the \gnu{} tool chain to support a `fully +defined target' is that it is easy to write application code that is +portable between differnt systems without making significant source +code changes. It is worth considering using the {\tt autoconf} +utility when writing new applications, as it makes cross compilation +and compilation for multiple target environments easy. For example, +it is possible to develop an application and test it by running it in +a Unix process, and recompile it for the Mini-OS environment. + + +%%% revised to here + +\section{Library Specifications} + +In the following lists three phrases are used: {\em is supported} for features +that are currently supported, {\em will be supported} for features that it is +intended to support as part of the project, and {\em not supported} for +features that are not and will not be supported. In the latter category are +functions such as {\tt fork} and {\tt exec} and floating point operations. + +\subsection{The Red Hat C Library} +\label{sec:newlib} + +The Red Hat C Library (\newlib) is documented in the +manual~\cite{newlib}. This section lists implementation options and +deviations from the manual. Subsection headings follow headings in +the \newlib{} manual. + +Thread implementations such as Posix threads are not supported, +but the underlying Mini-OS thread support is available to applications. +Re-entrant calls through \newlib{} will be supported, but at the moment +only one Mini-OS thread may use \newlib. + +Floating-point operations are not supported---the floating point registers are +not saved and restored by Mini-OS. This is not an issue for the applications +which are likely to run as mini-guests. + +Some of the functions which are listed as not being supported in the following +list are provided by \newlib, but calling them will result in no operation +being performed, or an error return code. + +\subsubsection{Standard Utility Functions (`{\tt stdlib.h}')} + +Functions in this group are supported with the following exceptions: +\begin{description} +\sloppy +\item[{\tt abort}] is supported, but as signals are not supported it will not + raise {\tt SIGABRT}. +\item[{\tt atof},] {\tt atoff}, {\tt ecvt}, {\tt ecvtbuff}, {\tt ecvtf}, {\tt + fcvt}, {\tt fcvtbuff}, {\tt fcvtf}, {\tt gcvt}, {\tt gcvtf}, {\tt strtod} + and {\tt strtof} are not supported. +\item[{\tt malloc},] {\tt realloc} and {\tt free} are supported using + the functions provided by Mini-OS. +\item[{\tt system}] is not supported. +\end{description} + +\subsubsection{Character Type Macros and Functions(`{\tt ctype.h}')} + +All functions in this group are supported. + +\subsubsection{Input and Output(`{\tt stdio.h}')} + +There is no file system, so I/O operations are restricted to devices only. + +Floating point format conversions are not supported. + +Functions in this group are supported with the following exceptions: +\begin{description} +\sloppy +\item[{\tt mktemp},] {\tt mkstemp}, {\tt remove}, {\tt rename}, {\tt rewind}, + {\tt tmpfile}, {\tt tmpnam} and {\tt tempnam} are not supported. +\end{description} + + +\subsubsection{Strings and Memory (`{\tt string.h}')} + +All of these functions are supported. + +\subsubsection{Wide Character Strings (`{\tt wchar.h}')} + +All of these functions are supported. + +\subsubsection{Signal Handling (`{\tt signal.h}')} + +Mini-OS does not support the Unix model of signal handling, and so these +functions are not supported. + +\subsubsection{Time Functions (`{\tt time.h}')} + +Functions in this group are supported with the following exceptions: +\begin{description} +\sloppy +\item[{\tt clock}] is not supported. +\item[{\tt time}] is supported using the Mini-OS gettimeofday function. +\end{description} + + +\subsubsection{Locale (`{\tt locale.h}')} + +All of these functions are supported. + +\subsection{System Call Interface (\libgloss)} +\label{sec:syscall} + +The \newlib{} uses 17 OS interfaces functions, but not all are fully +supported by Mini-OS. The functions are provided by \libgloss, the +\gnu{} Low-level OS support library. The functions are available to +applications. + +\begin{description} +\item[{\tt \_exit}] is supported, +\item[{\tt close}] is supported, +\item[{\tt environ}] is supported (but is preloaded with an empty array), +\item[{\tt execve}] is not supported, +\item[{\tt fork}] is not supported, +\item[{\tt fstat}] reports all files as being character special files, +\item[{\tt getpid}] always returns pid~1, +\item[{\tt isatty}] responds true for the console device, +\item[{\tt kill}] is not supported, +\item[{\tt link}] is not supported, +\item[{\tt lseek}] is not supported, +\item[{\tt open}] only knows about a static set of devices, +\item[{\tt read}] is supported, +\item[{\tt sbrk}] is not supported as the memory allocation from Xen + is fixed (malloc() and free() use the underlying Mini-OS functions), +\item[{\tt stat}] reports all files as being character special files, +\item[{\tt times}] is not supported, +\item[{\tt unlink}] is not supported, +\item[{\tt wait}] is not supported, and +\item[{\tt write}] is supported. +\end{description} + +\subsection{Device Interface} +\label{sec:devices} + +\subsubsection{Console Device} + +The console device is always open. It is attached to file descriptors 0 +(input), 1 (output) and 2 (error output). + +The console device has the name ``console'', and can be opened by passing that +name to open, fopen, etc. + +\subsubsection{Inter-domain Communications} + +Inter-domain communications are planned in the future. + +\subsection{Mini-OS Interface} +\label{sec:minios} + +The Mini-OS interface is not well documented, and may be subject to change. +It is recommended to avoid direct use of this interface where +possible. + + +\appendix + +\section{Summary of Patches} +\label{app:patches} + +This appendix outlines the changes to the Gnu tools in order to add +Mini-OS as a target OS. Normally such detail wouldn't be documented, +but it took me so much time to understand the configuration and build +process, that I thought it may be useful to others to document the +changes I made and the reasons for the changes. The list can be used +as a checklist when modifying the \gnu{} tool chain to support a new +cross-compilation environment for a processor and object file format +that is already supported. + +It is not strictly necessary to define a new target architecture, as +it is possible to use the generic target {\tt i386-elf}. However, +defining a new architecture makes it much easier to merge in +\newlib, and merge in the Mini-OS specific code cleanly. The build +process is a bit more complicated, but the tool chain is easier to use. + +The full name of the target architecture should be {\tt +i386-xen-minios-newlib}, {\tt i386} being the processor architecture, +{\tt xen} the system architecture (not {\tt pc}, because the +interface that minios sees is the para-virtualization interface +provided by Xen, not the conventional PC I/O architecture), {\tt + minios} being the kernel and \newlib{} being the standard +library. In practice we leave out the optional system architecture +and library, because {\tt i386-minios} uniquely defines the target. +Leaving out the system archtecture means that it defaults to {\tt pc} +and not {\tt unknown} because of an oddity of the configuration +files. Do not be confused by this. + +You will notice that the structure of each of the source distributions for +\binutils, \gcc{} and \newlib{} are similar, but differ in detail. Some +authorities suggest that each source distribution is a cut-down +version of the ``Cygnus tree'', and that it may be possible to merge +the distributions together again. I don't recommend that, because +many of the configuration and build scripts differ between the +different distributions. Unfortunately it does mean that there is +duplicated, almost similar code in the different source trees. +Unfortunately that just seems to be the way it is. + +\subsection{The Binary Utilities Package} + +The changes to the \binutils{} package supports the new target +system name, and modifies the default loader scripts for the Mini-OS +environment. See the actual patch files for detailed changes. + +\begin{description} +\item [config.sub] Add pattern {\tt -minios*} to the case + statement for operating system selection. +\item [gas/configure.tgt] Add pattern {\tt i386-*-minios*} to the case + statement for generic target selection. +\item [ld/configure.tgt] Add pattern {\tt i[3-7]86-*-minios*} to + the case statement for target selection. +\item [ld/emulparams/elf\_i386\_minios.sh] New file specifying + parameters for the built-in linker scripts. +\item [ld/Makefile.am] Add target {\tt eelf\_i386\_minios.o} to {\tt + ALL\_EMULATIONS}, and add new rule to build {\tt eelf\_i386\_minios.c}. +\item [ld/Makefile.in] Run {\tt automake-1.4} (an old version---but it + may be different for newer versions of \binutils) to rebuild + Makefile.in. +\item [bfd/config.bfd] Add pattern {\tt i[3-7]86-*-minios*} to + the case statement for target selection. +\end{description} + + +\subsection{The \gnu C Compiler} + +The changes to \gcc{} supports the new target +system name, and modifies the default loader command line for the Mini-OS +environment. See the actual patch files for detailed changes. + +\begin{description} +\item [config.sub] Add pattern {\tt -minios*} to the case + statement for OS selection---similar to file in + \binutils{} above. +\item [gcc/config/i386/i386minios.h] New file changing the + command line passed to the linker to omit {\tt crtbegin.o} and {\tt + crtend.o} and to change the library files linked to every + application. +\item [gcc/config.gcc] Add pattern {i[34567]86-*-minios*} to the case + statement for target selection, and include the new header file {\tt + i386minios.h}. +\end{description} + + +\subsection{Xen Mini-OS} + +Xen Mini-OS is intended to be used as an example of how to interface +to Xen. However, it does contain all the essential basic code for a +small application, and so it is a useful building block for +stand-alone applications. To simplify interfacing with \libgloss{} +some small changes have been made to Mini-OS. + +\begin{description} +\item [console I/O] The console driver has been augmented to support + charater input as well as charater output. This is convenient for + debugging small applications. +\item [gettimeofday()] this function has been renamed to {\tt + \_xgettimeofday}, as it has a different signature from the \newlib{} + function. The \newlib{} function acts as a wrapper for {\tt + \_xgettimeofday}. +\item [main()] A call to the function {\tt main()} has been added, + so that the traditional ``hello world'' program will work, as well + as the small test programs that {\tt ./configure} tries to compile + and link when building \gmp{} and other libraries. +\item [realloc()] A {\tt \_xrealloc} function has been added to the + Mini-OS memory allocator. The \newlib{} function acts as a wrapper for {\tt + \_xrealloc}. +\item [sti/cli] Versions of {\tt sti} and {\tt cli} have been defined + as functions to support \newlib{}. +\end{description} + +Other changes still planned include: + +\begin{description} +\item Add a {\tt void *data} field to the task descriptor to point to + task specific data for \newlib{} such as {\tt errno} to make all + \newlib{} functions reentrant. +\item Reduce name clashes by prepending all global symbols in Mini-OS + with {\tt \_x} or similar. +\end{description} + + + +\subsection{The Red Hat C Library} + +There seem to be two different ways of providing the low-level +function calls that \newlib{} requires---in the sys and machine +directories of \newlib, or as a separate library called \libgloss. The +\libgloss{} approach seems to be the recommended way---in principle it +should be possible to use \libgloss{} without \newlib. + +Be aware that there are two versions of autoconf provided with Fedora +Core 5, autoconf which reports version number 2.59, and autoconf-2.13. +It is not even clear if one is an earlier version of the other, or if +the development paths forked. Only autoconf-2.13 can be used to +recreate configure files from configure.in files in the \newlib{} +hierarchy. Beware that automake is not used in the \libgloss{} library, +but it is used for parts of the \newlib{} library. I am not sure which +version of automake should be used---check this if you make a change +that requires regenerating Makefile.in files in the \newlib{} hierarchy. + +\begin{description} + \item [config.sub] Add pattern {\tt -minios*} to the case + statement for OS selection---similar to file in + \binutils{} above. +\item [newlib/configure.host] Add pattern {\tt *-*-minios*} to the + case statement for host CPU selection, and add pattern {\tt + i[34567]86-*-minios*} to the case statement for host specific + selection. +\item [libgloss/configure.in] Add pattern {\tt i[[3456]]86-*-minios*} + to the case statement for target selection, referencing the new + subdirectory {\tt libgloss/minios}. +\item [libgloss/configure] Run {\tt autoconf-2.13} (an old version---but it + may be different for newer versions of \binutils) to rebuild + {\tt libgloss/configure}. +\item [libgloss/minios] Add new directory to contain the low-level OS + interface routines. +\item [libgloss/minios/configure.in] Create new file. +\item [libgloss/minios/configure] Run {\tt autoconf-2.13} (an old + version---but it + may be different for newer versions of \binutils) to build + {\tt minios/configure}. +\end{description} + + + + +\addcontentsline{toc}{section}{Bibliography}% +\bibliography{bibliography} + +\end{document} diff -r a839e331f06f -r d6ac3b48e3a2 extras/devenv/docs/build-cross-dev-env/dev-chain-overview.fig --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extras/devenv/docs/build-cross-dev-env/dev-chain-overview.fig Fri Apr 13 16:35:41 2007 +0100 @@ -0,0 +1,44 @@ +#FIG 3.2 +Portrait +Center +Metric +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 3150 2025 3825 2025 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 5400 2025 6075 2025 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 900 2025 1575 2025 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1575 1575 3150 1575 3150 2475 1575 2475 1575 1575 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3825 1575 5400 1575 5400 2475 3825 2475 3825 1575 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 6075 1575 7650 1575 7650 2475 6075 2475 6075 1575 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 2340 2925 2340 2475 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 6840 2925 6840 2475 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 7650 2025 8100 2025 +4 1 0 50 -1 18 12 0.0000 4 180 960 900 2250 Application\001 +4 1 0 50 -1 18 12 0.0000 4 150 735 900 2475 program\001 +4 1 0 50 -1 18 12 0.0000 4 180 1395 2385 2025 i386-minios-gcc\001 +4 1 0 50 -1 18 12 0.0000 4 135 1290 4590 2025 i386-minios-as\001 +4 1 0 50 -1 18 12 0.0000 4 135 1230 6840 2025 i386-minios-ld\001 +4 1 0 50 -1 18 12 0.0000 4 135 1065 2385 3150 Include files\001 +4 1 0 50 -1 18 12 0.0000 4 135 1125 6840 3150 Libraries libc\001 +4 1 0 50 -1 18 12 0.0000 4 180 1530 6840 3375 (newlib), libgloss\001 +4 1 0 50 -1 18 12 0.0000 4 135 1095 6840 3600 and Mini-OS\001 +4 1 0 50 -1 18 12 0.0000 4 135 1065 8235 2250 Stand-alone\001 +4 1 0 50 -1 18 12 0.0000 4 180 525 8235 2475 image\001 diff -r a839e331f06f -r d6ac3b48e3a2 extras/devenv/patches/binutils-2.16.1.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extras/devenv/patches/binutils-2.16.1.patch Fri Apr 13 16:35:41 2007 +0100 @@ -0,0 +1,1668 @@ +diff -crP binutils-2.16.1.orig/bfd/config.bfd binutils-2.16.1/bfd/config.bfd +*** binutils-2.16.1.orig/bfd/config.bfd 2005-01-31 17:18:47.000000000 +0000 +--- binutils-2.16.1/bfd/config.bfd 2006-10-25 12:47:19.000000000 +0100 +*************** +*** 433,439 **** + ;; + i[3-7]86-*-sysv4* | i[3-7]86-*-unixware* | \ + i[3-7]86-*-elf | i[3-7]86-*-sco3.2v5* | \ +! i[3-7]86-*-dgux* | i[3-7]86-*-sysv5*) + targ_defvec=bfd_elf32_i386_vec + targ_selvecs=i386coff_vec + ;; +--- 433,440 ---- + ;; + i[3-7]86-*-sysv4* | i[3-7]86-*-unixware* | \ + i[3-7]86-*-elf | i[3-7]86-*-sco3.2v5* | \ +! i[3-7]86-*-dgux* | i[3-7]86-*-sysv5* | \ +! i[3-7]86-*-minios*) + targ_defvec=bfd_elf32_i386_vec + targ_selvecs=i386coff_vec + ;; +diff -crP binutils-2.16.1.orig/config.sub binutils-2.16.1/config.sub +*** binutils-2.16.1.orig/config.sub 2005-01-19 00:34:56.000000000 +0000 +--- binutils-2.16.1/config.sub 2006-10-25 12:43:34.000000000 +0100 +*************** +*** 3,9 **** + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + # 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + +! timestamp='2004-11-30' + + # This file is (in principle) common to ALL GNU software. + # The presence of a machine in this file suggests that SOME GNU software +--- 3,9 ---- + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + # 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + +! timestamp='2006-10-25' + + # This file is (in principle) common to ALL GNU software. + # The presence of a machine in this file suggests that SOME GNU software +*************** +*** 1178,1184 **** + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ +! | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) +--- 1178,1185 ---- + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ +! | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ +! | -minios*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) +diff -crP binutils-2.16.1.orig/gas/configure.tgt binutils-2.16.1/gas/configure.tgt +*** binutils-2.16.1.orig/gas/configure.tgt 2005-01-31 17:18:51.000000000 +0000 +--- binutils-2.16.1/gas/configure.tgt 2006-10-25 12:49:57.000000000 +0100 +*************** +*** 179,184 **** +--- 179,185 ---- + i386-*-elf) fmt=elf ;; + i386-*-kaos*) fmt=elf ;; + i386-*-bsd*) fmt=aout em=386bsd ;; ++ i386-*-minios*) fmt=elf ;; + i386-*-netbsd0.8) fmt=aout em=386bsd ;; + i386-*-netbsdpe*) fmt=coff em=pe ;; + i386-*-netbsd*-gnu* | \ +diff -crP binutils-2.16.1.orig/ld/configure binutils-2.16.1/ld/configure +*** binutils-2.16.1.orig/ld/configure 2005-02-21 11:49:47.000000000 +0000 +--- binutils-2.16.1/ld/configure 2006-10-31 09:07:56.000000000 +0000 +*************** +*** 3211,3217 **** + + fi + +! for ac_hdr in unistd.h + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +--- 3211,3217 ---- + + fi + +! for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +*************** +*** 3343,3353 **** + #include + #include + + /* This mess was copied from the GNU getpagesize.h. */ + #ifndef HAVE_GETPAGESIZE +- # ifdef HAVE_UNISTD_H +- # include +- # endif + + /* Assume that all systems that can run configure have sys/param.h. */ + # ifndef HAVE_SYS_PARAM_H +--- 3343,3366 ---- + #include + #include + ++ #if HAVE_SYS_TYPES_H ++ # include ++ #endif ++ ++ #if HAVE_STDLIB_H ++ # include ++ #endif ++ ++ #if HAVE_SYS_STAT_H ++ # include ++ #endif ++ ++ #if HAVE_UNISTD_H ++ # include ++ #endif ++ + /* This mess was copied from the GNU getpagesize.h. */ + #ifndef HAVE_GETPAGESIZE + + /* Assume that all systems that can run configure have sys/param.h. */ + # ifndef HAVE_SYS_PARAM_H +*************** +*** 3455,3461 **** + } + + EOF +! if { (eval echo configure:3459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_func_mmap_fixed_mapped=yes + else +--- 3468,3474 ---- + } + + EOF +! if { (eval echo configure:3472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_func_mmap_fixed_mapped=yes + else +*************** +*** 3483,3499 **** + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +! echo "configure:3487: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:3497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +--- 3496,3512 ---- + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +! echo "configure:3500: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:3510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +*************** +*** 3523,3534 **** + __argz_count __argz_stringify __argz_next + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +! echo "configure:3527: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 +! echo "configure:3540: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +--- 3564,3570 ---- + + ; return 0; } + EOF +! if { (eval echo configure:3568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +*************** +*** 3580,3591 **** + for ac_func in stpcpy + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +! echo "configure:3584: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 +! echo "configure:3597: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +--- 3621,3627 ---- + + ; return 0; } + EOF +! if { (eval echo configure:3625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +*************** +*** 3642,3660 **** + + if test $ac_cv_header_locale_h = yes; then + echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 +! echo "configure:3646: checking for LC_MESSAGES" >&5 + if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + int main() { + return LC_MESSAGES + ; return 0; } + EOF +! if { (eval echo configure:3658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + am_cv_val_LC_MESSAGES=yes + else +--- 3655,3673 ---- + + if test $ac_cv_header_locale_h = yes; then + echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 +! echo "configure:3659: checking for LC_MESSAGES" >&5 + if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + int main() { + return LC_MESSAGES + ; return 0; } + EOF +! if { (eval echo configure:3671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + am_cv_val_LC_MESSAGES=yes + else +*************** +*** 3675,3681 **** + fi + fi + echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 +! echo "configure:3679: checking whether NLS is requested" >&5 + # Check whether --enable-nls or --disable-nls was given. + if test "${enable_nls+set}" = set; then + enableval="$enable_nls" +--- 3688,3694 ---- + fi + fi + echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 +! echo "configure:3692: checking whether NLS is requested" >&5 + # Check whether --enable-nls or --disable-nls was given. + if test "${enable_nls+set}" = set; then + enableval="$enable_nls" +*************** +*** 3691,3697 **** + + if test "$USE_NLS" = "yes"; then + echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 +! echo "configure:3695: checking whether included gettext is requested" >&5 + # Check whether --with-included-gettext or --without-included-gettext was given. + if test "${with_included_gettext+set}" = set; then + withval="$with_included_gettext" +--- 3704,3710 ---- + + if test "$USE_NLS" = "yes"; then + echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 +! echo "configure:3708: checking whether included gettext is requested" >&5 + # Check whether --with-included-gettext or --without-included-gettext was given. + if test "${with_included_gettext+set}" = set; then + withval="$with_included_gettext" +*************** +*** 3710,3726 **** + + ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 +! echo "configure:3714: checking for libintl.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:3724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +--- 3723,3739 ---- + + ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 +! echo "configure:3727: checking for libintl.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:3737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +*************** +*** 3737,3755 **** + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 +! echo "configure:3741: checking for gettext in libc" >&5 + if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + int main() { + return (int) gettext ("") + ; return 0; } + EOF +! if { (eval echo configure:3753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + gt_cv_func_gettext_libc=yes + else +--- 3750,3768 ---- + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 +! echo "configure:3754: checking for gettext in libc" >&5 + if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + int main() { + return (int) gettext ("") + ; return 0; } + EOF +! if { (eval echo configure:3766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + gt_cv_func_gettext_libc=yes + else +*************** +*** 3765,3771 **** + + if test "$gt_cv_func_gettext_libc" != "yes"; then + echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 +! echo "configure:3769: checking for bindtextdomain in -lintl" >&5 + ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +--- 3778,3784 ---- + + if test "$gt_cv_func_gettext_libc" != "yes"; then + echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 +! echo "configure:3782: checking for bindtextdomain in -lintl" >&5 + ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +*************** +*** 3773,3779 **** + ac_save_LIBS="$LIBS" + LIBS="-lintl $LIBS" + cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +--- 3797,3803 ---- + bindtextdomain() + ; return 0; } + EOF +! if { (eval echo configure:3801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +*************** +*** 3800,3818 **** + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 +! echo "configure:3804: checking for gettext in libintl" >&5 + if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + gt_cv_func_gettext_libintl=yes + else +--- 3813,3831 ---- + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 +! echo "configure:3817: checking for gettext in libintl" >&5 + if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + gt_cv_func_gettext_libintl=yes + else +*************** +*** 3840,3846 **** + # Extract the first word of "msgfmt", so it can be a program name with args. + set dummy msgfmt; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:3844: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 3853,3859 ---- + # Extract the first word of "msgfmt", so it can be a program name with args. + set dummy msgfmt; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:3857: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 3874,3885 **** + for ac_func in dcgettext + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +! echo "configure:3878: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 +! echo "configure:3891: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +--- 3915,3921 ---- + + ; return 0; } + EOF +! if { (eval echo configure:3919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +*************** +*** 3929,3935 **** + # Extract the first word of "gmsgfmt", so it can be a program name with args. + set dummy gmsgfmt; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:3933: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 3942,3948 ---- + # Extract the first word of "gmsgfmt", so it can be a program name with args. + set dummy gmsgfmt; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:3946: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 3965,3971 **** + # Extract the first word of "xgettext", so it can be a program name with args. + set dummy xgettext; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:3969: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 3978,3984 ---- + # Extract the first word of "xgettext", so it can be a program name with args. + set dummy xgettext; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:3982: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 3997,4003 **** + fi + + cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + CATOBJEXT=.gmo + DATADIRNAME=share +--- 4018,4024 ---- + return _nl_msg_cat_cntr + ; return 0; } + EOF +! if { (eval echo configure:4022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + CATOBJEXT=.gmo + DATADIRNAME=share +*************** +*** 4039,4045 **** + # Extract the first word of "msgfmt", so it can be a program name with args. + set dummy msgfmt; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:4043: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 4052,4058 ---- + # Extract the first word of "msgfmt", so it can be a program name with args. + set dummy msgfmt; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:4056: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 4073,4079 **** + # Extract the first word of "gmsgfmt", so it can be a program name with args. + set dummy gmsgfmt; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:4077: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 4086,4092 ---- + # Extract the first word of "gmsgfmt", so it can be a program name with args. + set dummy gmsgfmt; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:4090: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 4109,4115 **** + # Extract the first word of "xgettext", so it can be a program name with args. + set dummy xgettext; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:4113: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 4122,4128 ---- + # Extract the first word of "xgettext", so it can be a program name with args. + set dummy xgettext; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:4126: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 4205,4211 **** + LINGUAS= + else + echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 +! echo "configure:4209: checking for catalogs to be installed" >&5 + NEW_LINGUAS= + for lang in ${LINGUAS=$ALL_LINGUAS}; do + case "$ALL_LINGUAS" in +--- 4218,4224 ---- + LINGUAS= + else + echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 +! echo "configure:4222: checking for catalogs to be installed" >&5 + NEW_LINGUAS= + for lang in ${LINGUAS=$ALL_LINGUAS}; do + case "$ALL_LINGUAS" in +*************** +*** 4233,4249 **** + if test "$CATOBJEXT" = ".cat"; then + ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 +! echo "configure:4237: checking for linux/version.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:4247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +--- 4246,4262 ---- + if test "$CATOBJEXT" = ".cat"; then + ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 +! echo "configure:4250: checking for linux/version.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:4260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +*************** +*** 4308,4314 **** + + + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +! echo "configure:4312: checking for executable suffix" >&5 + if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 4321,4327 ---- + + + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +! echo "configure:4325: checking for executable suffix" >&5 + if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 4318,4324 **** + rm -f conftest* + echo 'int main () { return 0; }' > conftest.$ac_ext + ac_cv_exeext= +! if { (eval echo configure:4322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + for file in conftest.*; do + case $file in + *.c | *.o | *.obj) ;; +--- 4331,4337 ---- + rm -f conftest* + echo 'int main () { return 0; }' > conftest.$ac_ext + ac_cv_exeext= +! if { (eval echo configure:4335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + for file in conftest.*; do + case $file in + *.c | *.o | *.obj) ;; +*************** +*** 4344,4350 **** + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:4348: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 4357,4363 ---- + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:4361: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 4380,4386 **** + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:4384: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 4393,4399 ---- + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:4397: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 4413,4419 **** + # Extract the first word of "flex", so it can be a program name with args. + set dummy flex; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:4417: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 4426,4432 ---- + # Extract the first word of "flex", so it can be a program name with args. + set dummy flex; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:4430: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 4447,4453 **** + *) ac_lib=l ;; + esac + echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 +! echo "configure:4451: checking for yywrap in -l$ac_lib" >&5 + ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +--- 4460,4466 ---- + *) ac_lib=l ;; + esac + echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 +! echo "configure:4464: checking for yywrap in -l$ac_lib" >&5 + ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +*************** +*** 4455,4461 **** + ac_save_LIBS="$LIBS" + LIBS="-l$ac_lib $LIBS" + cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +--- 4479,4485 ---- + yywrap() + ; return 0; } + EOF +! if { (eval echo configure:4483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +*************** +*** 4489,4495 **** + fi + + echo $ac_n "checking lex output file root""... $ac_c" 1>&6 +! echo "configure:4493: checking lex output file root" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 4502,4508 ---- + fi + + echo $ac_n "checking lex output file root""... $ac_c" 1>&6 +! echo "configure:4506: checking lex output file root" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 4510,4516 **** + LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + + echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 +! echo "configure:4514: checking whether yytext is a pointer" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 4523,4529 ---- + LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + + echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 +! echo "configure:4527: checking whether yytext is a pointer" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 4522,4535 **** + ac_save_LIBS="$LIBS" + LIBS="$LIBS $LEXLIB" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_prog_lex_yytext_pointer=yes + else +--- 4535,4548 ---- + ac_save_LIBS="$LIBS" + LIBS="$LIBS $LEXLIB" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_prog_lex_yytext_pointer=yes + else +*************** +*** 4552,4558 **** + + + echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 +! echo "configure:4556: checking whether to enable maintainer-specific portions of Makefiles" >&5 + # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. + if test "${enable_maintainer_mode+set}" = set; then + enableval="$enable_maintainer_mode" +--- 4565,4571 ---- + + + echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 +! echo "configure:4569: checking whether to enable maintainer-specific portions of Makefiles" >&5 + # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. + if test "${enable_maintainer_mode+set}" = set; then + enableval="$enable_maintainer_mode" +*************** +*** 4586,4602 **** + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +! echo "configure:4590: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:4600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +--- 4599,4615 ---- + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +! echo "configure:4603: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:4613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +*************** +*** 4625,4636 **** + for ac_func in sbrk realpath glob + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +! echo "configure:4629: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 +! echo "configure:4642: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +--- 4666,4672 ---- + + ; return 0; } + EOF +! if { (eval echo configure:4670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +*************** +*** 4682,4693 **** + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 +! echo "configure:4686: checking for $ac_hdr that defines DIR" >&5 + if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include <$ac_hdr> +--- 4695,4706 ---- + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 +! echo "configure:4699: checking for $ac_hdr that defines DIR" >&5 + if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include <$ac_hdr> +*************** +*** 4695,4701 **** + DIR *dirp = 0; + ; return 0; } + EOF +! if { (eval echo configure:4699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=yes" + else +--- 4708,4714 ---- + DIR *dirp = 0; + ; return 0; } + EOF +! if { (eval echo configure:4712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=yes" + else +*************** +*** 4720,4726 **** + # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. + if test $ac_header_dirent = dirent.h; then + echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 +! echo "configure:4724: checking for opendir in -ldir" >&5 + ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +--- 4733,4739 ---- + # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. + if test $ac_header_dirent = dirent.h; then + echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 +! echo "configure:4737: checking for opendir in -ldir" >&5 + ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +*************** +*** 4728,4734 **** + ac_save_LIBS="$LIBS" + LIBS="-ldir $LIBS" + cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +--- 4752,4758 ---- + opendir() + ; return 0; } + EOF +! if { (eval echo configure:4756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +*************** +*** 4761,4767 **** + + else + echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 +! echo "configure:4765: checking for opendir in -lx" >&5 + ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +--- 4774,4780 ---- + + else + echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 +! echo "configure:4778: checking for opendir in -lx" >&5 + ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +*************** +*** 4769,4775 **** + ac_save_LIBS="$LIBS" + LIBS="-lx $LIBS" + cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +--- 4793,4799 ---- + opendir() + ; return 0; } + EOF +! if { (eval echo configure:4797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +*************** +*** 4813,4824 **** + esac + + echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 +! echo "configure:4817: checking whether strstr must be declared" >&5 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +--- 4826,4837 ---- + esac + + echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 +! echo "configure:4830: checking whether strstr must be declared" >&5 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +*************** +*** 4839,4845 **** + char *(*pfn) = (char *(*)) strstr + ; return 0; } + EOF +! if { (eval echo configure:4843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_strstr=no + else +--- 4852,4858 ---- + char *(*pfn) = (char *(*)) strstr + ; return 0; } + EOF +! if { (eval echo configure:4856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_strstr=no + else +*************** +*** 4860,4871 **** + fi + + echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 +! echo "configure:4864: checking whether free must be declared" >&5 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +--- 4873,4884 ---- + fi + + echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 +! echo "configure:4877: checking whether free must be declared" >&5 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +*************** +*** 4886,4892 **** + char *(*pfn) = (char *(*)) free + ; return 0; } + EOF +! if { (eval echo configure:4890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_free=no + else +--- 4899,4905 ---- + char *(*pfn) = (char *(*)) free + ; return 0; } + EOF +! if { (eval echo configure:4903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_free=no + else +*************** +*** 4907,4918 **** + fi + + echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6 +! echo "configure:4911: checking whether sbrk must be declared" >&5 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +--- 4920,4931 ---- + fi + + echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6 +! echo "configure:4924: checking whether sbrk must be declared" >&5 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +*************** +*** 4933,4939 **** + char *(*pfn) = (char *(*)) sbrk + ; return 0; } + EOF +! if { (eval echo configure:4937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_sbrk=no + else +--- 4946,4952 ---- + char *(*pfn) = (char *(*)) sbrk + ; return 0; } + EOF +! if { (eval echo configure:4950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_sbrk=no + else +*************** +*** 4954,4965 **** + fi + + echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 +! echo "configure:4958: checking whether getenv must be declared" >&5 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +--- 4967,4978 ---- + fi + + echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 +! echo "configure:4971: checking whether getenv must be declared" >&5 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +*************** +*** 4980,4986 **** + char *(*pfn) = (char *(*)) getenv + ; return 0; } + EOF +! if { (eval echo configure:4984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_getenv=no + else +--- 4993,4999 ---- + char *(*pfn) = (char *(*)) getenv + ; return 0; } + EOF +! if { (eval echo configure:4997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_getenv=no + else +*************** +*** 5001,5012 **** + fi + + echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6 +! echo "configure:5005: checking whether environ must be declared" >&5 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +--- 5014,5025 ---- + fi + + echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6 +! echo "configure:5018: checking whether environ must be declared" >&5 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +*************** +*** 5027,5033 **** + char *(*pfn) = (char *(*)) environ + ; return 0; } + EOF +! if { (eval echo configure:5031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_environ=no + else +--- 5040,5046 ---- + char *(*pfn) = (char *(*)) environ + ; return 0; } + EOF +! if { (eval echo configure:5044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_environ=no + else +*************** +*** 5055,5073 **** + # constants, while still supporting pre-ANSI compilers which do not + # support string concatenation. + echo $ac_n "checking whether ANSI C string concatenation works""... $ac_c" 1>&6 +! echo "configure:5059: checking whether ANSI C string concatenation works" >&5 + if eval "test \"`echo '$''{'ld_cv_string_concatenation'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ld_cv_string_concatenation=yes + else +--- 5068,5086 ---- + # constants, while still supporting pre-ANSI compilers which do not + # support string concatenation. + echo $ac_n "checking whether ANSI C string concatenation works""... $ac_c" 1>&6 +! echo "configure:5072: checking whether ANSI C string concatenation works" >&5 + if eval "test \"`echo '$''{'ld_cv_string_concatenation'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ld_cv_string_concatenation=yes + else +diff -crP binutils-2.16.1.orig/ld/configure.tgt binutils-2.16.1/ld/configure.tgt +*** binutils-2.16.1.orig/ld/configure.tgt 2005-02-08 19:54:27.000000000 +0000 +--- binutils-2.16.1/ld/configure.tgt 2006-10-31 09:03:16.000000000 +0000 +*************** +*** 202,207 **** +--- 202,208 ---- + ;; + i[3-7]86-*-netware) targ_emul=i386nw ;; + i[3-7]86-*-elf*) targ_emul=elf_i386 ;; ++ i[3-7]86-*-minios*) targ_emul=elf_i386_minios ;; + i[3-7]86-*-kaos*) targ_emul=elf_i386 ;; + i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | i[3-7]86-*-freebsd[12]) + targ_emul=i386bsd ;; +diff -crP binutils-2.16.1.orig/ld/emulparams/elf_i386_minios.sh binutils-2.16.1/ld/emulparams/elf_i386_minios.sh +*** binutils-2.16.1.orig/ld/emulparams/elf_i386_minios.sh 1970-01-01 01:00:00.000000000 +0100 +--- binutils-2.16.1/ld/emulparams/elf_i386_minios.sh 2006-11-09 13:42:11.000000000 +0000 +*************** +*** 0 **** +--- 1,12 ---- ++ SCRIPT_NAME=elf_minios ++ OUTPUT_FORMAT="elf32-i386" ++ TEXT_START_ADDR=0x0 ++ MAXPAGESIZE=0x1000 ++ COMMONPAGESIZE=0x1000 ++ NONPAGED_TEXT_START_ADDR=0x0 ++ ARCH=i386 ++ NOP=0x90909090 ++ TEMPLATE_NAME=elf32 ++ NO_SMALL_DATA=yes ++ EMBEDDED=yes ++ TEXT_START_SYMBOLS='_text = .;' +diff -crP binutils-2.16.1.orig/ld/Makefile.am binutils-2.16.1/ld/Makefile.am +*** binutils-2.16.1.orig/ld/Makefile.am 2005-01-20 19:37:49.000000000 +0000 +--- binutils-2.16.1/ld/Makefile.am 2006-11-09 13:26:04.000000000 +0000 +*************** +*** 190,195 **** +--- 190,196 ---- + eelf_i386_chaos.o \ + eelf_i386_fbsd.o \ + eelf_i386_ldso.o \ ++ eelf_i386_minios.o \ + eelf_s390.o \ + egld960.o \ + egld960coff.o \ +*************** +*** 864,869 **** +--- 865,873 ---- + eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)" ++ eelf_i386_minios.c: $(srcdir)/emulparams/elf_i386_minios.sh \ ++ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf_minios.sc ${GEN_DEPENDS} ++ ${GENSCRIPTS} elf_i386_minios "$(tdir_elf_i386_minios)" + eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf_s390 "$(tdir_elf_s390)" +diff -crP binutils-2.16.1.orig/ld/Makefile.in binutils-2.16.1/ld/Makefile.in +*** binutils-2.16.1.orig/ld/Makefile.in 2005-01-23 05:36:37.000000000 +0000 +--- binutils-2.16.1/ld/Makefile.in 2006-11-09 13:26:09.000000000 +0000 +*************** +*** 315,320 **** +--- 315,321 ---- + eelf_i386_chaos.o \ + eelf_i386_fbsd.o \ + eelf_i386_ldso.o \ ++ eelf_i386_minios.o \ + eelf_s390.o \ + egld960.o \ + egld960coff.o \ +*************** +*** 629,635 **** + + DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +! TAR = tar + GZIP_ENV = --best + SOURCES = $(ld_new_SOURCES) $(EXTRA_ld_new_SOURCES) + OBJECTS = $(ld_new_OBJECTS) +--- 630,636 ---- + + DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +! TAR = gtar + GZIP_ENV = --best + SOURCES = $(ld_new_SOURCES) $(EXTRA_ld_new_SOURCES) + OBJECTS = $(ld_new_OBJECTS) +*************** +*** 906,912 **** + all-recursive install-data-recursive install-exec-recursive \ + installdirs-recursive install-recursive uninstall-recursive install-info-recursive \ + check-recursive installcheck-recursive info-recursive dvi-recursive: +! @set fnord $(MAKEFLAGS); amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ +--- 907,913 ---- + all-recursive install-data-recursive install-exec-recursive \ + installdirs-recursive install-recursive uninstall-recursive install-info-recursive \ + check-recursive installcheck-recursive info-recursive dvi-recursive: +! @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ +*************** +*** 926,932 **** + + mostlyclean-recursive clean-recursive distclean-recursive \ + maintainer-clean-recursive: +! @set fnord $(MAKEFLAGS); amf=$$2; \ + dot_seen=no; \ + rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ + rev="$$subdir $$rev"; \ +--- 927,933 ---- + + mostlyclean-recursive clean-recursive distclean-recursive \ + maintainer-clean-recursive: +! @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ + rev="$$subdir $$rev"; \ +*************** +*** 1111,1117 **** + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + + maintainer-clean-generic: +! -test -z "ldlex.cdeffilep.hdeffilep.cldgram.hldgram.c$(MAINTAINERCLEANFILES)" || rm -f ldlex.c deffilep.h deffilep.c ldgram.h ldgram.c $(MAINTAINERCLEANFILES) + mostlyclean-am: mostlyclean-hdr mostlyclean-noinstPROGRAMS \ + mostlyclean-compile mostlyclean-libtool \ + mostlyclean-aminfo mostlyclean-tags mostlyclean-generic \ +--- 1112,1118 ---- + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + + maintainer-clean-generic: +! -test -z "ldlexcdeffilephdeffilepcldgramhldgramc$(MAINTAINERCLEANFILES)" || rm -f ldlexc deffileph deffilepc ldgramh ldgramc $(MAINTAINERCLEANFILES) + mostlyclean-am: mostlyclean-hdr mostlyclean-noinstPROGRAMS \ + mostlyclean-compile mostlyclean-libtool \ + mostlyclean-aminfo mostlyclean-tags mostlyclean-generic \ +*************** +*** 1601,1606 **** +--- 1602,1610 ---- + eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)" ++ eelf_i386_minios.c: $(srcdir)/emulparams/elf_i386_minios.sh \ ++ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf_minios.sc ${GEN_DEPENDS} ++ ${GENSCRIPTS} elf_i386_minios "$(tdir_elf_i386_minios)" + eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf_s390 "$(tdir_elf_s390)" +diff -crP binutils-2.16.1.orig/ld/scripttempl/elf_minios.sc binutils-2.16.1/ld/scripttempl/elf_minios.sc +*** binutils-2.16.1.orig/ld/scripttempl/elf_minios.sc 1970-01-01 01:00:00.000000000 +0100 +--- binutils-2.16.1/ld/scripttempl/elf_minios.sc 2006-11-09 13:22:53.000000000 +0000 +*************** +*** 0 **** +--- 1,56 ---- ++ # This template is based on minios-x86_32.lds from the Xen Mini-OS ++ # example ++ ++ test -z "$ENTRY" && ENTRY=_start ++ test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT} ++ test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT} ++ if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi ++ ++ cat <&6 +! echo "configure:838: 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 +--- 837,843 ---- + # 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:841: 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 +*************** +*** 864,870 **** + # 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:868: 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 +--- 867,873 ---- + # 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:871: 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 +*************** +*** 913,919 **** + fi + + echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +! echo "configure:917: 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 +--- 916,922 ---- + fi + + echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +! echo "configure:920: 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 +*************** +*** 922,928 **** + yes; + #endif + EOF +! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:926: \"$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 +--- 925,931 ---- + yes; + #endif + EOF +! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:929: \"$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 +*************** +*** 937,943 **** + ac_save_CFLAGS="$CFLAGS" + CFLAGS= + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +! echo "configure:941: 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 +--- 940,946 ---- + ac_save_CFLAGS="$CFLAGS" + CFLAGS= + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +! echo "configure:944: 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 +*************** +*** 969,975 **** + # Extract the first word of "ar", so it can be a program name with args. + set dummy ar; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:973: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 972,978 ---- + # Extract the first word of "ar", so it can be a program name with args. + set dummy ar; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:976: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 1003,1009 **** + # 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:1007: 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 +--- 1006,1012 ---- + # 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:1010: 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 +*************** +*** 1104,1118 **** + # Transform confdefs.h into DEFS. + # Protect against shell expansion while executing Makefile rules. + # Protect against Makefile macro expansion. +! cat > conftest.defs <<\EOF +! s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g +! s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g +! s%\[%\\&%g +! s%\]%\\&%g +! s%\$%$$%g +! EOF +! DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` +! rm -f conftest.defs + + + # Without the "./", some shells look in PATH for config.status. +--- 1107,1140 ---- + # Transform confdefs.h into DEFS. + # Protect against shell expansion while executing Makefile rules. + # Protect against Makefile macro expansion. +! # +! # If the first sed substitution is executed (which looks for macros that +! # take arguments), then we branch to the quote section. Otherwise, +! # look for a macro that doesn't take arguments. +! cat >confdef2opt.sed <<\_ACEOF +! t clear +! : clear +! s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +! t quote +! s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +! t quote +! d +! : quote +! s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +! s,\[,\\&,g +! s,\],\\&,g +! s,\$,$$,g +! p +! _ACEOF +! # We use echo to avoid assuming a particular line-breaking character. +! # The extra dot is to prevent the shell from consuming trailing +! # line-breaks from the sub-command output. A line-break within +! # single-quotes doesn't work because, if this script is created in a +! # platform that uses two characters for line-breaks (e.g., DOS), tr +! # would break. +! ac_LF_and_DOT=`echo; echo .` +! DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +! rm -f confdef2opt.sed + + + # Without the "./", some shells look in PATH for config.status. +diff -crP newlib-1.14.0.orig/libgloss/configure.in newlib-1.14.0/libgloss/configure.in +*** newlib-1.14.0.orig/libgloss/configure.in 2005-12-12 11:25:07.000000000 +0000 +--- newlib-1.14.0/libgloss/configure.in 2006-10-27 13:01:11.000000000 +0100 +*************** +*** 31,36 **** +--- 31,39 ---- + i[[3456]]86-*-elf*|i[[3456]]86-*-coff*) + configdirs="${configdirs} i386 testsuite"; + ;; ++ i[[3456]]86-*-minios*) ++ configdirs="${configdirs} minios testsuite"; ++ ;; + m32r-*-*) + configdirs="${configdirs} m32r testsuite" + ;; +diff -crP newlib-1.14.0.orig/libgloss/minios/configure newlib-1.14.0/libgloss/minios/configure +*** newlib-1.14.0.orig/libgloss/minios/configure 1970-01-01 01:00:00.000000000 +0100 +--- newlib-1.14.0/libgloss/minios/configure 2006-10-27 14:14:36.000000000 +0100 +*************** +*** 0 **** +--- 1,1237 ---- ++ #! /bin/sh ++ ++ # Guess values for system-dependent variables and create Makefiles. ++ # Generated automatically using autoconf version 2.13 ++ # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. ++ # ++ # This configure script is free software; the Free Software Foundation ++ # gives unlimited permission to copy, distribute and modify it. ++ ++ # Defaults: ++ ac_help= ++ ac_default_prefix=/usr/local ++ # Any additions from configure.in: ++ ++ # Initialize some variables set by options. ++ # The variables have the same names as the options, with ++ # dashes changed to underlines. ++ build=NONE ++ cache_file=./config.cache ++ exec_prefix=NONE ++ host=NONE ++ no_create= ++ nonopt=NONE ++ no_recursion= ++ prefix=NONE ++ program_prefix=NONE ++ program_suffix=NONE ++ program_transform_name=s,x,x, ++ silent= ++ site= ++ srcdir= ++ target=NONE ++ verbose= ++ x_includes=NONE ++ x_libraries=NONE ++ bindir='${exec_prefix}/bin' ++ sbindir='${exec_prefix}/sbin' ++ libexecdir='${exec_prefix}/libexec' ++ datadir='${prefix}/share' ++ sysconfdir='${prefix}/etc' ++ sharedstatedir='${prefix}/com' ++ localstatedir='${prefix}/var' ++ libdir='${exec_prefix}/lib' ++ includedir='${prefix}/include' ++ oldincludedir='/usr/include' ++ infodir='${prefix}/info' ++ mandir='${prefix}/man' ++ ++ # Initialize some other variables. ++ subdirs= ++ MFLAGS= MAKEFLAGS= ++ SHELL=${CONFIG_SHELL-/bin/sh} ++ # Maximum number of lines to put in a shell here document. ++ ac_max_here_lines=12 ++ ++ ac_prev= ++ for ac_option ++ do ++ ++ # If the previous option needs an argument, assign it. ++ if test -n "$ac_prev"; then ++ eval "$ac_prev=\$ac_option" ++ ac_prev= ++ continue ++ fi ++ ++ case "$ac_option" in ++ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; ++ *) ac_optarg= ;; ++ esac ++ ++ # Accept the important Cygnus configure options, so we can diagnose typos. ++ ++ case "$ac_option" in ++ ++ -bindir | --bindir | --bindi | --bind | --bin | --bi) ++ ac_prev=bindir ;; ++ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) ++ bindir="$ac_optarg" ;; ++ ++ -build | --build | --buil | --bui | --bu) ++ ac_prev=build ;; ++ -build=* | --build=* | --buil=* | --bui=* | --bu=*) ++ build="$ac_optarg" ;; ++ ++ -cache-file | --cache-file | --cache-fil | --cache-fi \ ++ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ++ ac_prev=cache_file ;; ++ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ ++ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) ++ cache_file="$ac_optarg" ;; ++ ++ -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ++ ac_prev=datadir ;; ++ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ ++ | --da=*) ++ datadir="$ac_optarg" ;; ++ ++ -disable-* | --disable-*) ++ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` ++ # Reject names that are not valid shell variable names. ++ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then ++ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } ++ fi ++ ac_feature=`echo $ac_feature| sed 's/-/_/g'` ++ eval "enable_${ac_feature}=no" ;; ++ ++ -enable-* | --enable-*) ++ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` ++ # Reject names that are not valid shell variable names. ++ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then ++ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } ++ fi ++ ac_feature=`echo $ac_feature| sed 's/-/_/g'` ++ case "$ac_option" in ++ *=*) ;; ++ *) ac_optarg=yes ;; ++ esac ++ eval "enable_${ac_feature}='$ac_optarg'" ;; ++ ++ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ ++ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ ++ | --exec | --exe | --ex) ++ ac_prev=exec_prefix ;; ++ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ ++ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ ++ | --exec=* | --exe=* | --ex=*) ++ exec_prefix="$ac_optarg" ;; ++ ++ -gas | --gas | --ga | --g) ++ # Obsolete; use --with-gas. ++ with_gas=yes ;; ++ ++ -help | --help | --hel | --he) ++ # Omit some internal or obsolete options to make the list less imposing. ++ # This message is too long to be a string in the A/UX 3.1 sh. ++ cat << EOF ++ Usage: configure [options] [host] ++ Options: [defaults in brackets after descriptions] ++ Configuration: ++ --cache-file=FILE cache test results in FILE ++ --help print this message ++ --no-create do not create output files ++ --quiet, --silent do not print \`checking...' messages ++ --version print the version of autoconf that created configure ++ Directory and file names: ++ --prefix=PREFIX install architecture-independent files in PREFIX ++ [$ac_default_prefix] ++ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX ++ [same as prefix] ++ --bindir=DIR user executables in DIR [EPREFIX/bin] ++ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] ++ --libexecdir=DIR program executables in DIR [EPREFIX/libexec] ++ --datadir=DIR read-only architecture-independent data in DIR ++ [PREFIX/share] ++ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] ++ --sharedstatedir=DIR modifiable architecture-independent data in DIR ++ [PREFIX/com] ++ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] ++ --libdir=DIR object code libraries in DIR [EPREFIX/lib] ++ --includedir=DIR C header files in DIR [PREFIX/include] ++ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] ++ --infodir=DIR info documentation in DIR [PREFIX/info] ++ --mandir=DIR man documentation in DIR [PREFIX/man] ++ --srcdir=DIR find the sources in DIR [configure dir or ..] ++ --program-prefix=PREFIX prepend PREFIX to installed program names ++ --program-suffix=SUFFIX append SUFFIX to installed program names ++ --program-transform-name=PROGRAM ++ run sed PROGRAM on installed program names ++ EOF ++ cat << EOF ++ Host type: ++ --build=BUILD configure for building on BUILD [BUILD=HOST] ++ --host=HOST configure for HOST [guessed] ++ --target=TARGET configure for TARGET [TARGET=HOST] ++ Features and packages: ++ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) ++ --enable-FEATURE[=ARG] include FEATURE [ARG=yes] ++ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] ++ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) ++ --x-includes=DIR X include files are in DIR ++ --x-libraries=DIR X library files are in DIR ++ EOF ++ if test -n "$ac_help"; then ++ echo "--enable and --with options recognized:$ac_help" ++ fi ++ exit 0 ;; ++ ++ -host | --host | --hos | --ho) ++ ac_prev=host ;; ++ -host=* | --host=* | --hos=* | --ho=*) ++ host="$ac_optarg" ;; ++ ++ -includedir | --includedir | --includedi | --included | --include \ ++ | --includ | --inclu | --incl | --inc) ++ ac_prev=includedir ;; ++ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ ++ | --includ=* | --inclu=* | --incl=* | --inc=*) ++ includedir="$ac_optarg" ;; ++ ++ -infodir | --infodir | --infodi | --infod | --info | --inf) ++ ac_prev=infodir ;; ++ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) ++ infodir="$ac_optarg" ;; ++ ++ -libdir | --libdir | --libdi | --libd) ++ ac_prev=libdir ;; ++ -libdir=* | --libdir=* | --libdi=* | --libd=*) ++ libdir="$ac_optarg" ;; ++ ++ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ ++ | --libexe | --libex | --libe) ++ ac_prev=libexecdir ;; ++ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ ++ | --libexe=* | --libex=* | --libe=*) ++ libexecdir="$ac_optarg" ;; ++ ++ -localstatedir | --localstatedir | --localstatedi | --localstated \ ++ | --localstate | --localstat | --localsta | --localst \ ++ | --locals | --local | --loca | --loc | --lo) ++ ac_prev=localstatedir ;; ++ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ ++ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ ++ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) ++ localstatedir="$ac_optarg" ;; ++ ++ -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ++ ac_prev=mandir ;; ++ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) ++ mandir="$ac_optarg" ;; ++ ++ -nfp | --nfp | --nf) ++ # Obsolete; use --without-fp. ++ with_fp=no ;; ++ ++ -no-create | --no-create | --no-creat | --no-crea | --no-cre \ ++ | --no-cr | --no-c) ++ no_create=yes ;; ++ ++ -no-recursion | --no-recursion | --no-recursio | --no-recursi \ ++ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ++ no_recursion=yes ;; ++ ++ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ ++ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ ++ | --oldin | --oldi | --old | --ol | --o) ++ ac_prev=oldincludedir ;; ++ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ ++ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ ++ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) ++ oldincludedir="$ac_optarg" ;; ++ ++ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ++ ac_prev=prefix ;; ++ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ++ prefix="$ac_optarg" ;; ++ ++ -program-prefix | --program-prefix | --program-prefi | --program-pref \ ++ | --program-pre | --program-pr | --program-p) ++ ac_prev=program_prefix ;; ++ -program-prefix=* | --program-prefix=* | --program-prefi=* \ ++ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) ++ program_prefix="$ac_optarg" ;; ++ ++ -program-suffix | --program-suffix | --program-suffi | --program-suff \ ++ | --program-suf | --program-su | --program-s) ++ ac_prev=program_suffix ;; ++ -program-suffix=* | --program-suffix=* | --program-suffi=* \ ++ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) ++ program_suffix="$ac_optarg" ;; ++ ++ -program-transform-name | --program-transform-name \ ++ | --program-transform-nam | --program-transform-na \ ++ | --program-transform-n | --program-transform- \ ++ | --program-transform | --program-transfor \ ++ | --program-transfo | --program-transf \ ++ | --program-trans | --program-tran \ ++ | --progr-tra | --program-tr | --program-t) ++ ac_prev=program_transform_name ;; ++ -program-transform-name=* | --program-transform-name=* \ ++ | --program-transform-nam=* | --program-transform-na=* \ ++ | --program-transform-n=* | --program-transform-=* \ ++ | --program-transform=* | --program-transfor=* \ ++ | --program-transfo=* | --program-transf=* \ ++ | --program-trans=* | --program-tran=* \ ++ | --progr-tra=* | --program-tr=* | --program-t=*) ++ program_transform_name="$ac_optarg" ;; ++ ++ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ ++ | -silent | --silent | --silen | --sile | --sil) ++ silent=yes ;; ++ ++ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ++ ac_prev=sbindir ;; ++ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ ++ | --sbi=* | --sb=*) ++ sbindir="$ac_optarg" ;; ++ ++ -sharedstatedir | --sharedstatedir | --sharedstatedi \ ++ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ ++ | --sharedst | --shareds | --shared | --share | --shar \ ++ | --sha | --sh) ++ ac_prev=sharedstatedir ;; ++ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ ++ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ ++ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ ++ | --sha=* | --sh=*) ++ sharedstatedir="$ac_optarg" ;; ++ ++ -site | --site | --sit) ++ ac_prev=site ;; ++ -site=* | --site=* | --sit=*) ++ site="$ac_optarg" ;; ++ ++ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ++ ac_prev=srcdir ;; ++ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ++ srcdir="$ac_optarg" ;; ++ ++ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ ++ | --syscon | --sysco | --sysc | --sys | --sy) ++ ac_prev=sysconfdir ;; ++ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ ++ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) ++ sysconfdir="$ac_optarg" ;; ++ ++ -target | --target | --targe | --targ | --tar | --ta | --t) ++ ac_prev=target ;; ++ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) ++ target="$ac_optarg" ;; ++ ++ -v | -verbose | --verbose | --verbos | --verbo | --verb) ++ verbose=yes ;; ++ ++ -version | --version | --versio | --versi | --vers) ++ echo "configure generated by autoconf version 2.13" ++ exit 0 ;; ++ ++ -with-* | --with-*) ++ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` ++ # Reject names that are not valid shell variable names. ++ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then ++ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } ++ fi ++ ac_package=`echo $ac_package| sed 's/-/_/g'` ++ case "$ac_option" in ++ *=*) ;; ++ *) ac_optarg=yes ;; ++ esac ++ eval "with_${ac_package}='$ac_optarg'" ;; ++ ++ -without-* | --without-*) ++ ac_package=`echo $ac_option|sed -e 's/-*without-//'` ++ # Reject names that are not valid shell variable names. ++ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then ++ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } ++ fi ++ ac_package=`echo $ac_package| sed 's/-/_/g'` ++ eval "with_${ac_package}=no" ;; ++ ++ --x) ++ # Obsolete; use --with-x. ++ with_x=yes ;; ++ ++ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ ++ | --x-incl | --x-inc | --x-in | --x-i) ++ ac_prev=x_includes ;; ++ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ ++ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) ++ x_includes="$ac_optarg" ;; ++ ++ -x-libraries | --x-libraries | --x-librarie | --x-librari \ ++ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ++ ac_prev=x_libraries ;; ++ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ ++ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) ++ x_libraries="$ac_optarg" ;; ++ ++ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ++ ;; ++ ++ *) ++ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then ++ echo "configure: warning: $ac_option: invalid host type" 1>&2 ++ fi ++ if test "x$nonopt" != xNONE; then ++ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ++ fi ++ nonopt="$ac_option" ++ ;; ++ ++ esac ++ done ++ ++ if test -n "$ac_prev"; then ++ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } ++ fi ++ ++ trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 ++ ++ # File descriptor usage: ++ # 0 standard input ++ # 1 file creation ++ # 2 errors and warnings ++ # 3 some systems may open it to /dev/tty ++ # 4 used on the Kubota Titan ++ # 6 checking for... messages and results ++ # 5 compiler messages saved in config.log ++ if test "$silent" = yes; then ++ exec 6>/dev/null ++ else ++ exec 6>&1 ++ fi ++ exec 5>./config.log ++ ++ echo "\ ++ This file contains any messages produced by compilers while ++ running configure, to aid debugging if configure makes a mistake. ++ " 1>&5 ++ ++ # Strip out --no-create and --no-recursion so they do not pile up. ++ # Also quote any args containing shell metacharacters. ++ ac_configure_args= ++ for ac_arg ++ do ++ case "$ac_arg" in ++ -no-create | --no-create | --no-creat | --no-crea | --no-cre \ ++ | --no-cr | --no-c) ;; ++ -no-recursion | --no-recursion | --no-recursio | --no-recursi \ ++ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; ++ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ++ ac_configure_args="$ac_configure_args '$ac_arg'" ;; ++ *) ac_configure_args="$ac_configure_args $ac_arg" ;; ++ esac ++ done ++ ++ # NLS nuisances. ++ # Only set these to C if already set. These must not be set unconditionally ++ # because not all systems understand e.g. LANG=C (notably SCO). ++ # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! ++ # Non-C LC_CTYPE values break the ctype check. ++ if test "${LANG+set}" = set; then LANG=C; export LANG; fi ++ if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi ++ if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi ++ if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi ++ ++ # confdefs.h avoids OS command line length limits that DEFS can exceed. ++ rm -rf conftest* confdefs.h ++ # AIX cpp loses on an empty file, so make sure it contains at least a newline. ++ echo > confdefs.h ++ ++ # A filename unique to this package, relative to the directory that ++ # configure is in, which we can look for to find out if srcdir is correct. ++ ac_unique_file=syscalls.c ++ ++ # Find the source files, if location was not specified. ++ if test -z "$srcdir"; then ++ ac_srcdir_defaulted=yes ++ # Try the directory containing this script, then its parent. ++ ac_prog=$0 ++ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` ++ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. ++ srcdir=$ac_confdir ++ if test ! -r $srcdir/$ac_unique_file; then ++ srcdir=.. ++ fi ++ else ++ ac_srcdir_defaulted=no ++ fi ++ if test ! -r $srcdir/$ac_unique_file; then ++ if test "$ac_srcdir_defaulted" = yes; then ++ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } ++ else ++ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } ++ fi ++ fi ++ srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` ++ ++ # Prefer explicitly selected file to automatically selected ones. ++ 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 ++ fi ++ for ac_site_file in $CONFIG_SITE; do ++ if test -r "$ac_site_file"; then ++ echo "loading site script $ac_site_file" ++ . "$ac_site_file" ++ fi ++ done ++ ++ if test -r "$cache_file"; then ++ echo "loading cache $cache_file" ++ . $cache_file ++ else ++ echo "creating cache $cache_file" ++ > $cache_file ++ fi ++ ++ ac_ext=c ++ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ ac_cpp='$CPP $CPPFLAGS' ++ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++ cross_compiling=$ac_cv_prog_cc_cross ++ ++ ac_exeext= ++ ac_objext=o ++ if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then ++ # Stardent Vistra SVR4 grep lacks -e, says ghazi@xxxxxxxxxxxxxxxxx ++ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ++ ac_n= ac_c=' ++ ' ac_t=' ' ++ else ++ ac_n=-n ac_c= ac_t= ++ fi ++ else ++ ac_n= ac_c='\c' ac_t= ++ fi ++ ++ ++ ++ if test "${enable_shared}" = "yes" ; then ++ echo "Shared libraries not supported for cross compiling, ignored" ++ fi ++ ++ if test "$srcdir" = "." ; then ++ if test "${with_target_subdir}" != "." ; then ++ libgloss_topdir="${srcdir}/${with_multisrctop}../../.." ++ else ++ libgloss_topdir="${srcdir}/${with_multisrctop}../.." ++ fi ++ else ++ libgloss_topdir="${srcdir}/../.." ++ fi ++ ac_aux_dir= ++ for ac_dir in $libgloss_topdir $srcdir/$libgloss_topdir; do ++ if test -f $ac_dir/install-sh; then ++ ac_aux_dir=$ac_dir ++ ac_install_sh="$ac_aux_dir/install-sh -c" ++ break ++ elif test -f $ac_dir/install.sh; then ++ ac_aux_dir=$ac_dir ++ ac_install_sh="$ac_aux_dir/install.sh -c" ++ break ++ fi ++ done ++ if test -z "$ac_aux_dir"; then ++ { echo "configure: error: can not find install-sh or install.sh in $libgloss_topdir $srcdir/$libgloss_topdir" 1>&2; exit 1; } ++ fi ++ ac_config_guess=$ac_aux_dir/config.guess ++ ac_config_sub=$ac_aux_dir/config.sub ++ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. ++ ++ ++ ++ # Do some error checking and defaulting for the host and target type. ++ # The inputs are: ++ # configure --host=HOST --target=TARGET --build=BUILD NONOPT ++ # ++ # The rules are: ++ # 1. You are not allowed to specify --host, --target, and nonopt at the ++ # same time. ++ # 2. Host defaults to nonopt. ++ # 3. If nonopt is not specified, then host defaults to the current host, ++ # as determined by config.guess. ++ # 4. Target and build default to nonopt. ++ # 5. If nonopt is not specified, then target and build default to host. ++ ++ # The aliases save the names the user supplied, while $host etc. ++ # will get canonicalized. ++ case $host---$target---$nonopt in ++ NONE---*---* | *---NONE---* | *---*---NONE) ;; ++ *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; ++ esac ++ ++ ++ # Make sure we can run config.sub. ++ if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : ++ 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:587: checking host system type" >&5 ++ ++ host_alias=$host ++ case "$host_alias" in ++ NONE) ++ case $nonopt in ++ NONE) ++ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : ++ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } ++ fi ;; ++ *) host_alias=$nonopt ;; ++ esac ;; ++ esac ++ ++ host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` ++ host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` ++ host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` ++ 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:608: checking target system type" >&5 ++ ++ target_alias=$target ++ case "$target_alias" in ++ NONE) ++ case $nonopt in ++ NONE) target_alias=$host_alias ;; ++ *) target_alias=$nonopt ;; ++ esac ;; ++ esac ++ ++ target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` ++ target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` ++ target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` ++ 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:626: checking build system type" >&5 ++ ++ build_alias=$build ++ case "$build_alias" in ++ NONE) ++ case $nonopt in ++ NONE) build_alias=$host_alias ;; ++ *) build_alias=$nonopt ;; ++ esac ;; ++ esac ++ ++ build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` ++ build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` ++ build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` ++ build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ++ echo "$ac_t""$build" 1>&6 ++ ++ test "$host_alias" != "$target_alias" && ++ test "$program_prefix$program_suffix$program_transform_name" = \ ++ NONENONEs,x,x, && ++ program_prefix=${target_alias}- ++ ++ if test "$program_transform_name" = s,x,x,; then ++ program_transform_name= ++ else ++ # Double any \ or $. echo might interpret backslashes. ++ cat <<\EOF_SED > conftestsed ++ s,\\,\\\\,g; s,\$,$$,g ++ EOF_SED ++ program_transform_name="`echo $program_transform_name|sed -f conftestsed`" ++ rm -f conftestsed ++ fi ++ test "$program_prefix" != NONE && ++ program_transform_name="s,^,${program_prefix},; $program_transform_name" ++ # Use a double $ so make ignores it. ++ test "$program_suffix" != NONE && ++ program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" ++ ++ # sed with no file args requires a program. ++ test "$program_transform_name" = "" && program_transform_name="s,x,x," ++ ++ ++ # Find a good install program. We prefer a C program (faster), ++ # so one script is as good as another. But avoid the broken or ++ # incompatible versions: ++ # SysV /etc/install, /usr/sbin/install ++ # SunOS /usr/etc/install ++ # IRIX /sbin/install ++ # AIX /bin/install ++ # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag ++ # AFS /usr/afsws/bin/install, which mishandles nonexistent args ++ # 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: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 ++ else ++ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" ++ for ac_dir in $PATH; do ++ # Account for people who put trailing slashes in PATH elements. ++ case "$ac_dir/" in ++ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; ++ *) ++ # OSF1 and SCO ODT 3.0 have their own names for install. ++ # Don't use installbsd from OSF since it installs stuff as root ++ # by default. ++ for ac_prog in ginstall scoinst install; do ++ if test -f $ac_dir/$ac_prog; then ++ if test $ac_prog = install && ++ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then ++ # AIX install. It has an incompatible calling convention. ++ : ++ else ++ ac_cv_path_install="$ac_dir/$ac_prog -c" ++ break 2 ++ fi ++ fi ++ done ++ ;; ++ esac ++ done ++ IFS="$ac_save_IFS" ++ ++ fi ++ if test "${ac_cv_path_install+set}" = set; then ++ INSTALL="$ac_cv_path_install" ++ else ++ # As a last resort, use the slow shell script. We don't cache a ++ # path for INSTALL within a source directory, because that will ++ # break other packages using the cache if that directory is ++ # removed, or if the path is relative. ++ INSTALL="$ac_install_sh" ++ fi ++ fi ++ echo "$ac_t""$INSTALL" 1>&6 ++ ++ # Use test -z because SunOS4 sh mishandles braces in ${var-val}. ++ # It thinks the first close brace ends the variable substitution. ++ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' ++ ++ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' ++ ++ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ++ ++ ++ # FIXME: We temporarily define our own version of AC_PROG_CC. This is ++ # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We ++ # are building a library that must be included in all links, so we ++ # can't link an executable until this lib is built. ++ # autoconf should provide a way to do this. ++ ++ ++ ++ case "$target" in ++ *coff) ++ IS_COFF="-DCOFF" ++ ;; ++ *aout) ++ IS_AOUT="-DAOUT" ++ ;; ++ esac ++ ++ # 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:753: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++ else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="gcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++ fi ++ fi ++ CC="$ac_cv_prog_CC" ++ if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++ else ++ echo "$ac_t""no" 1>&6 ++ fi ++ ++ 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:783: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++ else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_prog_rejected=no ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ++ ac_prog_rejected=yes ++ continue ++ fi ++ ac_cv_prog_CC="cc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++ if test $ac_prog_rejected = yes; then ++ # We found a bogon in the path, so make sure we never use it. ++ set dummy $ac_cv_prog_CC ++ shift ++ if test $# -gt 0; then ++ # We chose a different compiler from the bogus one. ++ # However, it has the same basename, so the bogon will be chosen ++ # first if we set CC to just the basename; use the full file name. ++ shift ++ set dummy "$ac_dir/$ac_word" "$@" ++ shift ++ ac_cv_prog_CC="$@" ++ fi ++ fi ++ fi ++ fi ++ CC="$ac_cv_prog_CC" ++ if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++ else ++ echo "$ac_t""no" 1>&6 ++ fi ++ ++ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } ++ fi ++ ++ echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ++ echo "configure:832: 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 ++ cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ++ ac_cv_prog_gcc=yes ++ else ++ ac_cv_prog_gcc=no ++ fi ++ fi ++ ++ echo "$ac_t""$ac_cv_prog_gcc" 1>&6 ++ ++ if test $ac_cv_prog_gcc = yes; then ++ GCC=yes ++ ac_test_CFLAGS="${CFLAGS+set}" ++ ac_save_CFLAGS="$CFLAGS" ++ CFLAGS= ++ echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ++ echo "configure:856: 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 ++ echo 'void f(){}' > conftest.c ++ if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ++ ac_cv_prog_cc_g=yes ++ else ++ ac_cv_prog_cc_g=no ++ fi ++ rm -f conftest* ++ ++ fi ++ ++ echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 ++ if test "$ac_test_CFLAGS" = set; then ++ CFLAGS="$ac_save_CFLAGS" ++ elif test $ac_cv_prog_cc_g = yes; then ++ CFLAGS="-g -O2" ++ else ++ CFLAGS="-O2" ++ fi ++ else ++ GCC= ++ test "${CFLAGS+set}" = set || CFLAGS="-g" ++ fi ++ ++ AS=${AS-as} ++ ++ AR=${AR-ar} ++ ++ 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 ++ if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++ else ++ if test -n "$RANLIB"; then ++ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. ++ else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_RANLIB="ranlib" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" ++ fi ++ fi ++ RANLIB="$ac_cv_prog_RANLIB" ++ if test -n "$RANLIB"; then ++ echo "$ac_t""$RANLIB" 1>&6 ++ else ++ echo "$ac_t""no" 1>&6 ++ fi ++ ++ ++ host_makefile_frag=${srcdir}/../config/default.mh ++ ++ host_makefile_frag_path=$host_makefile_frag ++ ++ ++ ++ trap '' 1 2 15 ++ cat > confcache <<\EOF ++ # This file is a shell script that caches the results of configure ++ # tests run on this system so they can be shared between configure ++ # scripts and configure runs. It is not useful on other systems. ++ # If it contains results you don't want to keep, you may remove or edit it. ++ # ++ # By default, configure uses ./config.cache as the cache file, ++ # creating it if it does not exist already. You can give configure ++ # the --cache-file=FILE option to use a different cache file; that is ++ # what configure does when it calls configure scripts in ++ # subdirectories, so they share the cache. ++ # Giving --cache-file=/dev/null disables caching, for debugging configure. ++ # config.status only pays attention to the cache file if you give it the ++ # --recheck option to rerun configure. ++ # ++ EOF ++ # The following way of writing the cache mishandles newlines in values, ++ # but we know of no workaround that is simple, portable, and efficient. ++ # So, don't put newlines in cache variables' values. ++ # Ultrix sh set writes to stderr and can't be redirected directly, ++ # and sets the high bit in the cache file unless we assign to the vars. ++ (set) 2>&1 | ++ case `(ac_space=' '; set | grep ac_space) 2>&1` in ++ *ac_space=\ *) ++ # `set' does not quote correctly, so add quotes (double-quote substitution ++ # turns \\\\ into \\, and sed turns \\ into \). ++ sed -n \ ++ -e "s/'/'\\\\''/g" \ ++ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ++ ;; ++ *) ++ # `set' quotes correctly as required by POSIX, so do not add quotes. ++ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ++ ;; ++ esac >> confcache ++ if cmp -s $cache_file confcache; then ++ : ++ else ++ if test -w $cache_file; then ++ echo "updating cache $cache_file" ++ cat confcache > $cache_file ++ else ++ echo "not updating unwritable cache $cache_file" ++ fi ++ fi ++ rm -f confcache ++ ++ trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 ++ ++ test "x$prefix" = xNONE && prefix=$ac_default_prefix ++ # Let make expand exec_prefix. ++ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ++ ++ # Any assignment to VPATH causes Sun make to only execute ++ # the first set of double-colon rules, so remove it if not needed. ++ # If there is a colon in the path, we need to keep it. ++ if test "x$srcdir" = x.; then ++ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' ++ fi ++ ++ trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 ++ ++ # Transform confdefs.h into DEFS. ++ # Protect against shell expansion while executing Makefile rules. ++ # Protect against Makefile macro expansion. ++ # ++ # If the first sed substitution is executed (which looks for macros that ++ # take arguments), then we branch to the quote section. Otherwise, ++ # look for a macro that doesn't take arguments. ++ cat >confdef2opt.sed <<\_ACEOF ++ t clear ++ : clear ++ s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g ++ t quote ++ s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g ++ t quote ++ d ++ : quote ++ s,[ `~#$^&*(){}\\|;'"<>?],\\&,g ++ s,\[,\\&,g ++ s,\],\\&,g ++ s,\$,$$,g ++ p ++ _ACEOF ++ # We use echo to avoid assuming a particular line-breaking character. ++ # The extra dot is to prevent the shell from consuming trailing ++ # line-breaks from the sub-command output. A line-break within ++ # single-quotes doesn't work because, if this script is created in a ++ # platform that uses two characters for line-breaks (e.g., DOS), tr ++ # would break. ++ ac_LF_and_DOT=`echo; echo .` ++ DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` ++ rm -f confdef2opt.sed ++ ++ ++ # Without the "./", some shells look in PATH for config.status. ++ : ${CONFIG_STATUS=./config.status} ++ ++ echo creating $CONFIG_STATUS ++ rm -f $CONFIG_STATUS ++ cat > $CONFIG_STATUS </dev/null | sed 1q`: ++ # ++ # $0 $ac_configure_args ++ # ++ # Compiler output produced by configure, useful for debugging ++ # configure, is in ./config.log if it exists. ++ ++ ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" ++ for ac_option ++ do ++ case "\$ac_option" in ++ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ++ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" ++ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; ++ -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ++ echo "$CONFIG_STATUS generated by autoconf version 2.13" ++ exit 0 ;; ++ -help | --help | --hel | --he | --h) ++ echo "\$ac_cs_usage"; exit 0 ;; ++ *) echo "\$ac_cs_usage"; exit 1 ;; ++ esac ++ done ++ ++ ac_given_srcdir=$srcdir ++ ac_given_INSTALL="$INSTALL" ++ ++ trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 ++ EOF ++ cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF ++ $ac_vpsub ++ $extrasub ++ s%@SHELL@%$SHELL%g ++ s%@CFLAGS@%$CFLAGS%g ++ s%@CPPFLAGS@%$CPPFLAGS%g ++ s%@CXXFLAGS@%$CXXFLAGS%g ++ s%@FFLAGS@%$FFLAGS%g ++ s%@DEFS@%$DEFS%g ++ s%@LDFLAGS@%$LDFLAGS%g ++ s%@LIBS@%$LIBS%g ++ s%@exec_prefix@%$exec_prefix%g ++ s%@prefix@%$prefix%g ++ s%@program_transform_name@%$program_transform_name%g ++ s%@bindir@%$bindir%g ++ s%@sbindir@%$sbindir%g ++ s%@libexecdir@%$libexecdir%g ++ s%@datadir@%$datadir%g ++ s%@sysconfdir@%$sysconfdir%g ++ s%@sharedstatedir@%$sharedstatedir%g ++ s%@localstatedir@%$localstatedir%g ++ s%@libdir@%$libdir%g ++ s%@includedir@%$includedir%g ++ s%@oldincludedir@%$oldincludedir%g ++ s%@infodir@%$infodir%g ++ s%@mandir@%$mandir%g ++ s%@host@%$host%g ++ s%@host_alias@%$host_alias%g ++ s%@host_cpu@%$host_cpu%g ++ s%@host_vendor@%$host_vendor%g ++ s%@host_os@%$host_os%g ++ s%@target@%$target%g ++ s%@target_alias@%$target_alias%g ++ s%@target_cpu@%$target_cpu%g ++ s%@target_vendor@%$target_vendor%g ++ s%@target_os@%$target_os%g ++ s%@build@%$build%g ++ s%@build_alias@%$build_alias%g ++ s%@build_cpu@%$build_cpu%g ++ s%@build_vendor@%$build_vendor%g ++ s%@build_os@%$build_os%g ++ s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g ++ s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g ++ s%@INSTALL_DATA@%$INSTALL_DATA%g ++ s%@CC@%$CC%g ++ s%@AS@%$AS%g ++ s%@AR@%$AR%g ++ s%@LD@%$LD%g ++ s%@IS_COFF@%$IS_COFF%g ++ s%@IS_AOUT@%$IS_AOUT%g ++ s%@NEED_UNDERSCORE@%$NEED_UNDERSCORE%g ++ s%@RANLIB@%$RANLIB%g ++ s%@host_makefile_frag_path@%$host_makefile_frag_path%g ++ /@host_makefile_frag@/r $host_makefile_frag ++ s%@host_makefile_frag@%%g ++ ++ CEOF ++ EOF ++ ++ 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=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. ++ ac_more_lines=: ++ ac_sed_cmds="" ++ while $ac_more_lines; do ++ if test $ac_beg -gt 1; then ++ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file ++ else ++ sed "${ac_end}q" conftest.subs > conftest.s$ac_file ++ fi ++ if test ! -s conftest.s$ac_file; then ++ ac_more_lines=false ++ rm -f conftest.s$ac_file ++ else ++ if test -z "$ac_sed_cmds"; then ++ ac_sed_cmds="sed -f conftest.s$ac_file" ++ else ++ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" ++ fi ++ ac_file=`expr $ac_file + 1` ++ ac_beg=$ac_end ++ ac_end=`expr $ac_end + $ac_max_sed_cmds` ++ fi ++ done ++ if test -z "$ac_sed_cmds"; then ++ ac_sed_cmds=cat ++ fi ++ EOF ++ ++ cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF ++ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then ++ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". ++ case "$ac_file" in ++ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ++ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; ++ *) ac_file_in="${ac_file}.in" ;; ++ esac ++ ++ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. ++ ++ # Remove last slash and all that follows it. Not all systems have dirname. ++ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` ++ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then ++ # The file is in a subdirectory. ++ test ! -d "$ac_dir" && mkdir "$ac_dir" ++ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" ++ # A "../" for each directory in $ac_dir_suffix. ++ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` ++ else ++ ac_dir_suffix= ac_dots= ++ fi ++ ++ case "$ac_given_srcdir" in ++ .) srcdir=. ++ if test -z "$ac_dots"; then top_srcdir=. ++ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; ++ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; ++ *) # Relative path. ++ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" ++ top_srcdir="$ac_dots$ac_given_srcdir" ;; ++ esac ++ ++ case "$ac_given_INSTALL" in ++ [/$]*) INSTALL="$ac_given_INSTALL" ;; ++ *) INSTALL="$ac_dots$ac_given_INSTALL" ;; ++ esac ++ ++ echo creating "$ac_file" ++ rm -f "$ac_file" ++ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." ++ case "$ac_file" in ++ *Makefile*) ac_comsub="1i\\ ++ # $configure_input" ;; ++ *) ac_comsub= ;; ++ esac ++ ++ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` ++ sed -e "$ac_comsub ++ s%@configure_input@%$configure_input%g ++ s%@srcdir@%$srcdir%g ++ s%@top_srcdir@%$top_srcdir%g ++ s%@INSTALL@%$INSTALL%g ++ " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file ++ fi; done ++ rm -f conftest.s* ++ ++ EOF ++ cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF ++ . ${libgloss_topdir}/config-ml.in ++ exit 0 ++ EOF ++ chmod +x $CONFIG_STATUS ++ rm -fr confdefs* $ac_clean_files ++ test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 ++ +diff -crP newlib-1.14.0.orig/libgloss/minios/configure.in newlib-1.14.0/libgloss/minios/configure.in +*** newlib-1.14.0.orig/libgloss/minios/configure.in 1970-01-01 01:00:00.000000000 +0100 +--- newlib-1.14.0/libgloss/minios/configure.in 2006-10-27 14:13:26.000000000 +0100 +*************** +*** 0 **** +--- 1,114 ---- ++ # Copyright (c) 1995, 1996 Cygnus Support ++ # ++ # The authors hereby grant permission to use, copy, modify, distribute, ++ # and license this software and its documentation for any purpose, provided ++ # that existing copyright notices are retained in all copies and that this ++ # notice is included verbatim in any distributions. No written agreement, ++ # license, or royalty fee is required for any of the authorized uses. ++ # Modifications to this software may be copyrighted by their authors ++ # and need not follow the licensing terms described here, provided that ++ # the new terms are clearly indicated on the first page of each file where ++ # they apply. ++ # ++ # Process this file with autoconf to produce a configure script. ++ # ++ AC_PREREQ(2.5)dnl ++ AC_INIT(syscalls.c) ++ ++ if test "${enable_shared}" = "yes" ; then ++ echo "Shared libraries not supported for cross compiling, ignored" ++ fi ++ ++ if test "$srcdir" = "." ; then ++ if test "${with_target_subdir}" != "." ; then ++ libgloss_topdir="${srcdir}/${with_multisrctop}../../.." ++ else ++ libgloss_topdir="${srcdir}/${with_multisrctop}../.." ++ fi ++ else ++ libgloss_topdir="${srcdir}/../.." ++ fi ++ AC_CONFIG_AUX_DIR($libgloss_topdir) ++ ++ AC_CANONICAL_SYSTEM ++ AC_ARG_PROGRAM ++ ++ AC_PROG_INSTALL ++ ++ # FIXME: We temporarily define our own version of AC_PROG_CC. This is ++ # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We ++ # are building a library that must be included in all links, so we ++ # can't link an executable until this lib is built. ++ # autoconf should provide a way to do this. ++ ++ AC_DEFUN(LIB_AC_PROG_CC, ++ [AC_BEFORE([$0], [AC_PROG_CPP])dnl ++ AC_CHECK_PROG(CC, gcc, gcc) ++ if test -z "$CC"; then ++ AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc) ++ test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH]) ++ fi ++ ++ AC_PROG_CC_GNU ++ ++ if test $ac_cv_prog_gcc = yes; then ++ GCC=yes ++ dnl Check whether -g works, even if CFLAGS is set, in case the package ++ dnl plays around with CFLAGS (such as to build both debugging and ++ dnl normal versions of a library), tasteless as that idea is. ++ ac_test_CFLAGS="${CFLAGS+set}" ++ ac_save_CFLAGS="$CFLAGS" ++ CFLAGS= ++ AC_PROG_CC_G ++ if test "$ac_test_CFLAGS" = set; then ++ CFLAGS="$ac_save_CFLAGS" ++ elif test $ac_cv_prog_cc_g = yes; then ++ CFLAGS="-g -O2" ++ else ++ CFLAGS="-O2" ++ fi ++ else ++ GCC= ++ test "${CFLAGS+set}" = set || CFLAGS="-g" ++ fi ++ ]) ++ ++ case "$target" in ++ *coff) ++ IS_COFF="-DCOFF" ++ ;; ++ *aout) ++ IS_AOUT="-DAOUT" ++ ;; ++ esac ++ ++ LIB_AC_PROG_CC ++ AS=${AS-as} ++ AC_SUBST(AS) ++ AR=${AR-ar} ++ AC_SUBST(AR) ++ LD=${LD-ld} ++ AC_SUBST(LD) ++ AC_SUBST(IS_COFF) ++ AC_SUBST(IS_AOUT) ++ AC_SUBST(NEED_UNDERSCORE) ++ AC_PROG_RANLIB ++ ++ host_makefile_frag=${srcdir}/../config/default.mh ++ ++ dnl We have to assign the same value to other variables because autoconf ++ dnl doesn't provide a mechanism to substitute a replacement keyword with ++ dnl arbitrary data or pathnames. ++ dnl ++ host_makefile_frag_path=$host_makefile_frag ++ AC_SUBST(host_makefile_frag_path) ++ AC_SUBST_FILE(host_makefile_frag) ++ ++ AC_OUTPUT(Makefile, ++ . ${libgloss_topdir}/config-ml.in, ++ srcdir=${srcdir} ++ target=${target} ++ ac_configure_args="${ac_configure_args} --enable-multilib" ++ CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} ++ libgloss_topdir=${libgloss_topdir} ++ ) +diff -crP newlib-1.14.0.orig/libgloss/minios/console_drv.c newlib-1.14.0/libgloss/minios/console_drv.c +*** newlib-1.14.0.orig/libgloss/minios/console_drv.c 1970-01-01 01:00:00.000000000 +0100 +--- newlib-1.14.0/libgloss/minios/console_drv.c 2006-11-08 15:10:26.000000000 +0000 +*************** +*** 0 **** +--- 1,38 ---- ++ /* ++ * Title: Console driver interface for newlib over mini-OS ++ * ++ * Created: 24th July 2006 by Melvin Anderson ++ * ++ * RCS Ident: $Id: console_drv.c,v 1.2 2006/08/17 10:34:34 mja Exp $ ++ * ++ */ ++ ++ #include "console_drv.h" ++ ++ extern void console_print(char *data, int length); ++ extern long console_input(char *data, int leng); ++ ++ void ++ _console_open(const char *path, int flags, int mode) ++ { ++ } ++ ++ int ++ _console_close(int fd) ++ { ++ return 0; ++ } ++ ++ long ++ _console_write(int fd, const char *ptr, int len) ++ { ++ console_print((char *)ptr, len); ++ return len; ++ } ++ ++ long ++ _console_read(int fd, char *ptr, int len) ++ { ++ return console_input(ptr, len); ++ } ++ +diff -crP newlib-1.14.0.orig/libgloss/minios/console_drv.h newlib-1.14.0/libgloss/minios/console_drv.h +*** newlib-1.14.0.orig/libgloss/minios/console_drv.h 1970-01-01 01:00:00.000000000 +0100 +--- newlib-1.14.0/libgloss/minios/console_drv.h 2006-11-08 15:10:25.000000000 +0000 +*************** +*** 0 **** +--- 1,15 ---- ++ /* ++ * Title: Console driver interface for newlib over mini-OS ++ * ++ * Created: 24th July 2006 by Melvin Anderson ++ * ++ * RCS Ident: $Id: console_drv.h,v 1.1 2006/08/14 15:11:21 mja Exp $ ++ * ++ */ ++ ++ ++ extern void _console_open(const char *path, int flags, int mode); ++ extern int _console_close(int fd); ++ extern long _console_write(int fd, const char *ptr, int len ); ++ extern long _console_read(int fd, char *ptr, int len); ++ +diff -crP newlib-1.14.0.orig/libgloss/minios/Makefile.in newlib-1.14.0/libgloss/minios/Makefile.in +*** newlib-1.14.0.orig/libgloss/minios/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +--- newlib-1.14.0/libgloss/minios/Makefile.in 2006-11-23 13:11:01.000000000 +0000 +*************** +*** 0 **** +--- 1,103 ---- ++ # Copyright (c) 1997, 2000 Cygnus Support ++ # ++ # The authors hereby grant permission to use, copy, modify, distribute, ++ # and license this software and its documentation for any purpose, provided ++ # that existing copyright notices are retained in all copies and that this ++ # notice is included verbatim in any distributions. No written agreement, ++ # license, or royalty fee is required for any of the authorized uses. ++ # Modifications to this software may be copyrighted by their authors ++ # and need not follow the licensing terms described here, provided that ++ # the new terms are clearly indicated on the first page of each file where ++ # they apply. ++ ++ DESTDIR = ++ VPATH = @srcdir@ ++ srcdir = @srcdir@ ++ objdir = . ++ srcroot = $(srcdir)/../.. ++ objroot = $(objdir)/../.. ++ ++ prefix = @prefix@ ++ exec_prefix = @exec_prefix@ ++ ++ host_alias = @host_alias@ ++ target_alias = @target_alias@ ++ program_transform_name = @program_transform_name@ ++ ++ bindir = @bindir@ ++ libdir = @libdir@ ++ tooldir = $(exec_prefix)/$(target_alias) ++ ++ # Multilib support variables. ++ # TOP is used instead of MULTI{BUILD,SRC}TOP. ++ MULTIDIRS = ++ MULTISUBDIR = ++ MULTIDO = true ++ MULTICLEAN = true ++ ++ INSTALL = @INSTALL@ ++ INSTALL_PROGRAM = @INSTALL_PROGRAM@ ++ INSTALL_DATA = @INSTALL_DATA@ ++ ++ SHELL = /bin/sh ++ ++ CC = @CC@ ++ ++ AS = @AS@ ++ ++ AR = @AR@ ++ ++ LD = @LD@ ++ ++ RANLIB = @RANLIB@ ++ ++ OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \ ++ then echo ${objroot}/../binutils/objdump ; \ ++ else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi` ++ OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \ ++ then echo ${objroot}/../binutils/objcopy ; \ ++ else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi` ++ ++ MINIOS_OBJS = console_drv.o syscalls.o setjmp_x86_32.o ++ ++ CFLAGS = -g ++ ++ XEN_ROOT = $(HOME)/xen-unstable.hg ++ MINIOS_ROOT = $(XEN_ROOT)/extras/mini-os ++ ++ ASFLAGS = -D__ASSEMBLY__ ++ ++ BSP = libgloss.a ++ ++ # Host specific makefile fragment comes in here. ++ @host_makefile_frag@ ++ ++ all: ${BSP} ++ ++ # ++ # here's where we build the board support packages for each target ++ # ++ %.o: %.c Makefile ++ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ ++ ++ %.o: %.S Makefile ++ $(CC) $(ASFLAGS) $(CPPFLAGS) -c $< -o $@ ++ ++ libgloss.a: $(MINIOS_OBJS) ++ ${AR} ${ARFLAGS} $@ $(MINIOS_OBJS) ++ ${RANLIB} $@ ++ ++ install: $(BSP) ++ $(INSTALL_DATA) $(BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(BSP) ++ ++ clean mostlyclean: ++ rm -f a.out core *.i *~ *.o *-test *.srec *.dis *.map *.x ++ ++ distclean maintainer-clean realclean: clean ++ rm -f Makefile config.status a.out ++ ++ Makefile: Makefile.in config.status @host_makefile_frag_path@ ++ $(SHELL) config.status ++ ++ config.status: configure ++ $(SHELL) config.status --recheck +diff -crP newlib-1.14.0.orig/libgloss/minios/setjmp_x86_32.S newlib-1.14.0/libgloss/minios/setjmp_x86_32.S +*** newlib-1.14.0.orig/libgloss/minios/setjmp_x86_32.S 1970-01-01 01:00:00.000000000 +0100 +--- newlib-1.14.0/libgloss/minios/setjmp_x86_32.S 2006-11-06 10:09:44.000000000 +0000 +*************** +*** 0 **** +--- 1,103 ---- ++ /* ++ * C library functions setjmp and longjmp for Mini-OS taken from ++ * newlib. Function longjmp was modified to support Xen versions of ++ * cli and sti. Defined PRIVILEGED_MODE to obtain the original ++ * behavior. John D. Ramsdell, The MITRE Corporation, May 2006. ++ */ ++ ++ /* This is file is a merger of SETJMP.S and LONGJMP.S */ ++ /* ++ * Copyright (C) 1991 DJ Delorie ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms is permitted ++ * provided that the above copyright notice and following paragraph are ++ * duplicated in all such forms. ++ * ++ * This file is distributed WITHOUT ANY WARRANTY; without even the implied ++ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ++ */ ++ ++ /* ++ ** jmp_buf: ++ ** eax ebx ecx edx esi edi ebp esp eip ++ ** 0 4 8 12 16 20 24 28 32 ++ */ ++ ++ .text ++ .global setjmp ++ .global longjmp ++ ++ setjmp: ++ pushl %ebp ++ movl %esp, %ebp ++ ++ pushl %edi ++ movl 8(%ebp), %edi ++ ++ movl %eax, 0(%edi) ++ movl %ebx, 4(%edi) ++ movl %ecx, 8(%edi) ++ movl %edx, 12(%edi) ++ movl %esi, 16(%edi) ++ ++ movl -4(%ebp), %eax ++ movl %eax, 20(%edi) ++ ++ movl 0(%ebp), %eax ++ movl %eax, 24(%edi) ++ ++ movl %esp, %eax ++ addl $12, %eax ++ movl %eax, 28(%edi) ++ ++ movl 4(%ebp), %eax ++ movl %eax, 32(%edi) ++ ++ popl %edi ++ movl $0, %eax ++ leave ++ ret ++ ++ longjmp: ++ pushl %ebp ++ movl %esp, %ebp ++ ++ #if !defined PRIVILEGED_MODE ++ call _cli_as_a_subroutine ++ #endif ++ ++ movl 8(%ebp), %edi /* get jmp_buf */ ++ movl 12(%ebp), %eax /* store retval in j->eax */ ++ movl %eax, 0(%edi) ++ ++ movl 24(%edi), %ebp ++ ++ #if defined PRIVILEGED_MODE ++ cli ++ #endif ++ ++ movl 28(%edi), %esp ++ ++ pushl 32(%edi) ++ ++ movl 0(%edi), %eax ++ movl 4(%edi), %ebx ++ movl 8(%edi), %ecx ++ movl 12(%edi), %edx ++ movl 16(%edi), %esi ++ movl 20(%edi), %edi ++ ++ #if defined PRIVILEGED_MODE ++ sti ++ #else ++ pushl %eax /* preserve caller-saved registers */ ++ pushl %ecx ++ pushl %edx ++ call _sti_as_a_subroutine ++ popl %edx ++ popl %ecx ++ popl %eax ++ #endif ++ ++ ret +diff -crP newlib-1.14.0.orig/libgloss/minios/syscalls.c newlib-1.14.0/libgloss/minios/syscalls.c +*** newlib-1.14.0.orig/libgloss/minios/syscalls.c 1970-01-01 01:00:00.000000000 +0100 +--- newlib-1.14.0/libgloss/minios/syscalls.c 2006-11-09 14:47:24.000000000 +0000 +*************** +*** 0 **** +--- 1,268 ---- ++ /* ++ * Title: "System calls" for newlib over mini-OS ++ * ++ * Created: 24th July 2006 by Melvin Anderson ++ * ++ * RCS Ident: $Id$ ++ * ++ * Based on ideas from John Ramsdell's contribution to the Xen mailing ++ * list, and "Embedding with GNU: Newlib" by Bill Gatliff at ++ * embedded.com. ++ */ ++ ++ /* Newlib headers */ ++ #include ++ #undef errno ++ extern int errno; ++ #include ++ #include ++ #include ++ #include ++ #include ++ ++ #include "console_drv.h" ++ ++ /* Mini-OS functions (importing Mini-OS headers clashes with newlib ++ headers) */ ++ extern void printk(const char *fmt, ...); ++ extern void do_exit(void) __attribute__ ((noreturn)); ++ extern void *_xmalloc(size_t size, size_t align); ++ extern void *_xrealloc(const void *p, size_t size, size_t align); ++ extern void xfree(const void *); ++ ++ ++ typedef struct { ++ const char *name; ++ void (*open)(const char *path, int flags, int mode); ++ int (*close)(int fd); ++ long (*write)(int fd, const char *ptr, int len); ++ long (*read)(int fd, char *ptr, int len); ++ } devsw_t; ++ ++ ++ static devsw_t dev_console = { ++ "console", ++ _console_open, ++ _console_close, ++ _console_write, ++ _console_read ++ }; ++ ++ static devsw_t *devsw[] = { ++ &dev_console, /* standard input */ ++ &dev_console, /* standard output */ ++ &dev_console, /* standard error */ ++ }; ++ ++ #define NDEVS (sizeof devsw/sizeof (devsw_t*)) ++ ++ void ++ _exit(int status) ++ { ++ if (status) ++ printk("Mini-OS application exited with a status of %d\n", status); ++ do_exit(); ++ /*never reached*/ ++ } ++ ++ int ++ _close(int file) ++ { ++ if (file < 0 || file >= NDEVS) { ++ errno = EBADF; ++ return -1; ++ } ++ ++ return (devsw[file]->close)(file); ++ } ++ ++ int _execve(char *name, char **argv, char **env) ++ { ++ /* return "not supported" */ ++ errno = ENOTSUP; ++ return -1; ++ } ++ ++ int ++ _fork(void) ++ { ++ /* return "not supported" */ ++ errno = ENOTSUP; ++ return -1; ++ } ++ ++ int ++ _fstat(int file, struct stat *st) ++ { ++ st->st_mode = S_IFCHR; ++ return 0; ++ } ++ ++ int ++ _getpid(void) ++ { ++ /* return "not supported" */ ++ errno = ENOTSUP; ++ return -1; ++ } ++ ++ int ++ isatty(int file) ++ { ++ return (file < 3); ++ } ++ ++ int ++ _kill(int pid, int sig) ++ { ++ /* return "not supported" */ ++ errno = ENOTSUP; ++ return -1; ++ } ++ ++ int ++ _link(char *old, char *new) ++ { ++ errno = EMLINK; ++ return -1; ++ } ++ ++ ++ int ++ _lseek(int file, off_t ptr, int dir) ++ { ++ return 0; ++ } ++ ++ int ++ _open(const char *name, int flags, int mode) ++ { ++ int i = 0; ++ int fd = -1; ++ ++ /* search for "name" in dotab[].name */ ++ for (i = 0; i < NDEVS; i++) { ++ if (strcmp(devsw[i]->name, name) == 0) ++ { ++ fd = i; ++ break; ++ } ++ } ++ ++ /* if we found the requested file/device, invoke the device's open() */ ++ if (fd != -1) { ++ (devsw[fd]->open)(name, flags, mode); ++ ++ /* it doesn't exist! */ ++ } else { ++ errno = ENODEV; ++ } ++ return fd; ++ } ++ ++ int ++ _read(int file, char *ptr, int len) ++ { ++ if (file < 0 || file >= NDEVS) { ++ errno = EBADF; ++ return -1; ++ } ++ ++ return (devsw[file]->read)(file, ptr, len); ++ } ++ ++ void * ++ malloc(size_t size) ++ { ++ return _xmalloc(size, 4); ++ } ++ ++ void * ++ _malloc_r (struct _reent *ptr, size_t size) ++ { ++ return _xmalloc(size, 4); ++ } ++ ++ void ++ free(void *ptr) ++ { ++ xfree(ptr); ++ } ++ ++ void ++ _free_r (struct _reent *ptr, void *addr) ++ { ++ xfree(addr); ++ } ++ ++ void * ++ realloc(void *p, size_t size) ++ { ++ return _xrealloc(p, size, 4); ++ } ++ ++ void * ++ _realloc_r(struct _reent *ptr, void *p, size_t size) ++ { ++ return _xrealloc(p, size, 4); ++ } ++ ++ caddr_t ++ _sbrk(int incr) ++ { ++ errno = ENOMEM; ++ return ((caddr_t) -1); ++ } ++ ++ int ++ _stat(const char *file, struct stat *st) ++ { ++ errno = ENOTSUP; ++ return -1; ++ } ++ ++ clock_t ++ _times(struct tms *buf) ++ { ++ errno = ENOTSUP; ++ return -1; ++ } ++ ++ int ++ _unlink(char *name) ++ { ++ errno = ENOTSUP; ++ return -1; ++ } ++ ++ int ++ _wait(int *status) ++ { ++ /* return "not supported" */ ++ errno = ENOTSUP; ++ return -1; ++ } ++ ++ int ++ _write(int file, char *ptr, int len) ++ { ++ if (file < 0 || file >= NDEVS) { ++ errno = EBADF; ++ return -1; ++ } ++ ++ return (devsw[file]->write)(file, ptr, len); ++ } ++ ++ int ++ _gettimeofday(struct timeval *ptimeval, ++ struct timezone *ptimezone) ++ { ++ if (ptimezone != NULL) { ++ errno = ENOSYS; ++ return -1; ++ } else { ++ _xgettimeofday(ptimeval); ++ return 0; ++ } ++ } +diff -crP newlib-1.14.0.orig/newlib/configure.host newlib-1.14.0/newlib/configure.host +*** newlib-1.14.0.orig/newlib/configure.host 2005-12-12 11:25:07.000000000 +0000 +--- newlib-1.14.0/newlib/configure.host 2006-11-01 14:10:16.000000000 +0000 +*************** +*** 132,138 **** + i[34567]86) + # Don't use for these since they provide their own setjmp. + case ${host} in +! *-*-sco* | *-*-cygwin*) + libm_machine_dir=i386 + machine_dir=i386 + ;; +--- 132,138 ---- + i[34567]86) + # Don't use for these since they provide their own setjmp. + case ${host} in +! *-*-sco* | *-*-cygwin* | *-*-minios*) + libm_machine_dir=i386 + machine_dir=i386 + ;; +*************** +*** 572,577 **** +--- 572,581 ---- + i[34567]86-*-sco*) + newlib_cflags="${newlib_cflags} -DSIGNAL_PROVIDED -DHAVE_FCNTL" + ;; ++ i[34567]86-*-minios*) ++ newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED" ++ syscall_dir=syscalls ++ ;; + i[34567]86-*-netware*) + newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES -DNO_EXEC -DABORT_PROVIDED -DCLOCK_PROVIDED -DMALLOC_PROVIDED -DHAVE_FCNTL" + ;; diff -r a839e331f06f -r d6ac3b48e3a2 extras/mini-os/sticli.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extras/mini-os/sticli.c Fri Apr 13 16:35:41 2007 +0100 @@ -0,0 +1,21 @@ +/* + * Expose the replacement for clearing and setting the interrupt flag + * as subroutions for use with the Red Hat newlib C library function + * longjmp. + * + * Extracted from code written by John Ramsdell -- see + * http://lists.xensource.com/archives/html/xen-devel/2006-05/msg01050.html + * + */ + +#include + +void _cli_as_a_subroutine(void) +{ + __cli(); +} + +void _sti_as_a_subroutine(void) +{ + __sti(); +}