Commit 6a161fa9 authored by okuji's avatar okuji

Initial revision

parents
Makefile
config.cache
config.h
config.log
config.status
stamp-h
stamp-h1
autom4te.cache
Yoshinori K. Okuji designed and implemented everything.
This diff is collapsed.
2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
* Changelog: New file.
-*- Text -*-
This is the PUPA. Welcome.
This file contains instructions for compiling and installing the PUPA.
The Requirements
================
PUPA depends on some software packages installed into your system. If
you don't have any of them, please obtain and install them before
configuring the PUPA.
* GCC 2.95 or later
* GNU Make
* GNU binutils 2.9.1.0.23 or later
* Other standard GNU/Unix tools
If you'd like to develop PUPA, these below are also required.
* Ruby 1.6 or later
* Autoconf 2.53 or later
Configuring the PUPA
====================
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a
file `config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try to
figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.ac' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
Building the PUPA
=================
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and
type `./configure' to configure the package for your system. If
you're using `csh' on an old version of System V, you might need
to type `sh ./configure' instead to prevent `csh' from trying to
execute `configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. `cd' to the directory where you want the object files
and executables to go and run the `configure' script. `configure'
automatically checks for the source code in the directory that
`configure' is in and in `..'.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix by giving `configure' the option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If
you give `configure' the option `--exec-prefix=PATH', the package will
use PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for
particular kinds of files. Run `configure --help' for a list of the
directories you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure'
the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Please note, however, that the PUPA knows where it is located in the
filesystem. If you have installed it in an unusual location, the
system might not work properly, or at all. The chief utility of these
options for the PUPA is to allow you to "install" in some alternate
location, and then copy these to the actual root filesystem later.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made.
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
# -*- makefile -*-
#
# Copyright (C) 1994,1995,1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
# Copyright (C) 2002 Yoshinori K. Okuji <okuji@enbug.org>
#
# This Makefile.in is free software; the author
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
### The configure script will replace these variables.
SHELL = /bin/sh
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
pkgdatadir = $(datadir)/@PACKAGE_TARNAME@/$(host_cpu)-$(host_vendor)
pkglibdir = $(libdir)/@PACKAGE_TARNAME@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
host_cpu = @host_cpu@
host_vendor = @host_vendor@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
mkinstalldirs = $(srcdir)/mkinstalldirs
CC = @CC@
CFLAGS = @CFLAGS@
CPPFLAGS = -I. -Iinclude -I$(srcdir)/include -Wall -W
BUILD_CC = @CC@
BUILD_CFLAGS = -g -O2
BUILD_CPPFLAGS = -I. -Iinclude -I$(srcdir)/include -Wall -W \
-DPUPA_DATADIR=\"$(pkgdatadir)\"
OBJCOPY = @OBJCOPY@
STRIP = @STRIP@
NM = @NM@
RUBY = @RUBY@
### General variables.
RMKFILES = $(addprefix conf/,i386-pc.rmk)
MKFILES = $(patsubst %.rmk,%.mk,$(RMKFILES))
COMMON_DISTFILES = AUTHORS COPYING ChangeLog INSTALL NEWS README \
THANKS TODO Makefile.in aclocal.m4 autogen.sh config.guess \
config.h.in config.sub configure configure.ac genkernsyms.sh \
genmk.rb genmodsrc.sh gensymlist.sh install-sh mkinstalldirs \
stamp-h.in
BOOT_DISTFILES = $(addprefix boot/i386/pc/,boot.S diskboot.S)
CONF_DISTFILES = $(RMKFILES) $(MKFILES)
DISK_DISTFILES = $(addprefix disk/i386/pc/,biosdisk.c partition.c)
FS_DISTFILES = $(addprefix fs/,fat.c)
INCLUDE_DISTFILES = $(addprefix include/pupa/,boot.h device.h disk.h \
dl.h elf.h err.h file.h fs.h kernel.h loader.h misc.h mm.h \
net.h rescue.h symbol.h term.h types.h) \
$(addprefix include/pupa/util/,misc.h resolve.h) \
include/pupa/i386/types.h \
$(addprefix include/pupa/i386/pc/,biosdisk.h boot.h \
console.h init.h kernel.h loader.h memory.h partition.h)
KERN_DISTFILES = $(addprefix kern/,device.c disk.c dl.c err.c file.c \
fs.c loader.c main.c misc.c mm.c rescue.c term.c) \
kern/i386/dl.c \
$(addprefix kern/i386/pc/,init.c startup.S)
LOADER_DISTFILES = $(addprefix loader/i386/pc/,chainloader.c)
TERM_DISTFILES = $(addprefix term/i386/pc/,console.c)
UTIL_DISTFILES = $(addprefix util/,genmoddep.c misc.c resolve.c) \
util/i386/pc/pupa-mkimage.c
DISTFILES = $(COMMON_DISTFILES) $(BOOT_DISTFILES) $(CONF_DISTFILES) \
$(DISK_DISTFILES) $(FS_DISTFILES) $(INCLUDE_DISTFILES) \
$(KERN_DISTFILES) $(LOADER_DISTFILES) $(TERM_DISTFILES) \
$(UTIL_DISTFILES)
DATA = $(pkgdata_IMAGES) $(pkgdata_MODULES)
PROGRAMS = $(bin_UTILITIES) $(sbin_UTILITIES)
SCRIPTS =
CLEANFILES =
MOSTLYCLEANFILES =
DISTCLEANFILES = config.status config.cache config.log config.h \
Makefile stamp-h include/pupa/cpu include/pupa/machine
MAINTAINER_CLEANFILES = $(srcdir)/configure $(addprefix $(srcdir)/,$(MKFILES))
# The default target.
all: all-local
### Include an arch-specific Makefile.
$(addprefix $(srcdir)/,$(MKFILES)): %.mk: %.rmk genmk.rb
if test "x$(RUBY)" = x; then \
touch $@; \
else \
$(RUBY) $(srcdir)/genmk.rb < $< > $@; \
fi
include $(srcdir)/conf/$(host_cpu)-$(host_vendor).mk
### General targets.
all-local: $(PROGRAMS) $(DATA) $(SCRIPTS)
install: install-local
install-local: all
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
@list='$(pkgdata_IMAGES) $(pkgdata_MODULES)'; for file in $$list; do \
if test -f "$$file"; then dir=; else dir="$(srcdir)"; fi; \
dest="`echo $$file | sed 's,.*/,,'`"; \
$(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkgdatadir)/$$dest; \
done
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_UTILITIES)'; for file in $$list; do \
if test -f "$$file"; then dir=; else dir="$(srcdir)"; fi; \
dest="`echo $$file | sed 's,.*/,,'`"; \
$(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(bindir)/$$dest; \
done
install-strip:
$(MAKE) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" install
uninstall:
@list='$(pkgdata_IMAGES) $(pkgdata_MODULES)'; for file in $$list; do \
dest="`echo $$file | sed 's,.*/,,'`"; \
rm -f $(DESTDIR)$(pkgdatadir)/$$dest; \
done
@list = '$(bin_UTILITIES)'; for file in $$list; do \
dest="`echo $$file | sed 's,.*/,,'`"; \
rm -f $(DESTDIR)$(bindir)/$$dest; \
done
clean:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
mostlyclean: clean
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
distclean: mostlyclean
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
-rm -rf $(srcdir)/autom4te.cache
maintainer-clean: distclean
-test -z "$(MAINTAINER_CLEANFILES)" || rm -f $(MAINTAINER_CLEANFILES)
info:
dvi:
distdir=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
distdir: $(DISTFILES)
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
$(mkinstalldirs) $(distdir)
for i in $(DISTFILES); do \
dir=`echo "$$i" | sed 's:/[^/]*$$::'`; \
if test -d $(srcdir)/$$dir; then \
$(mkinstalldirs) $(distdir)/$$dir; \
fi; \
cp -p $(srcdir)/$$i $(distdir)/$$i || exit 1; \
done
chmod -R a+r $(distdir)
GZIP_ENV = --best
dist: distdir
tar chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
distcheck: dist
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
GZIP=$(GZIP_ENV) gzip -cd $(distdir).tar.gz | tar xf -
chmod -R a-w $(distdir)
chmod a+w $(distdir)
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
chmod a-w $(distdir)
dc_instdir=`CDPATH=: && cd $(distdir)/=inst && pwd` \
&& cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_instdir \
&& $(MAKE) all dvi check install uninstall \
&& (test `find $$dc_instdir -type f -print | wc -l` -le 1 \
|| (echo "Error: files left after uninstall" 1>&2; \
exit 1)) \
&& $(MAKE) dist distclean \
&& rm -f $(distdir).tar.gz \
&& (test `find . -type f -print | wc -l` -eq 0 \
|| (echo "Error: files left after distclean" 1>&2; \
exit 1))
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
@echo "$(distdir).tar.gz is ready for distribution" | \
sed 'h;s/./=/g;p;x;p;x'
check:
.SUFFIX:
.SUFFIX: .c .o .S .d
# Regenerate configure and Makefile automatically.
$(srcdir)/configure: configure.ac aclocal.m4
cd $(srcdir) && autoconf
$(srcdir)/config.h.in: stamp-h.in
$(srcdir)/stamp-h.in: configure.ac aclocal.m4
cd $(srcdir) && autoheader
echo timestamp > $(srcdir)/stamp-h.in
config.h: stamp-h
stamp-h: config.h.in config.status
./config.status
Makefile: Makefile.in config.status
./config.status
config.status: configure
./config.status --recheck
.PHONY: all install install-strip uninstall clean mostlyclean distclean
.PHONY: maintainer-clean info dvi dist check
# Prevent an overflow.
.NOEXPORT:
New in 0.6 - 2002-12-27, Yoshinori K. Okuji:
* The chainloader and the FAT filesystem are modularized.
* The structure of the source tree is a bit changed.
* Support for building loadable modules is added.
* Some generic parts of pupa-mkimage are segregated.
* Some documentation files are added, according to the GNU Coding
Standards.
This is PUPA, the Preliminary Universal Programming Architecture for
GRUB. PUPA is a research project for the next generation of GNU GRUB.
The most important goal is to make GNU GRUB cleaner, safer, more robust,
more powerful, and more portable.
See the file NEWS for a description of recent changes to PUPA.
See the file INSTALL for instructions on how to build and install the
PUPA data and program files.
Please visit the official web page of PUPA, for more information.
The URL is <http://www.nongnu.org/pupa/>.
Because PUPA is still in developmental stage, PUPA is not for general
use (yet). For now, you can install PUPA into a floppy by these
instructions:
$ configure && make
$ ./pupa-mkimage -v -d . -o core.img chain fat
$ dd if=boot.img of=/dev/fd0 bs=512 count=1
$ dd if=core.img of=/dev/fd0 bs=512 seek=1
It would be easier to use Bochs <http://bochs.sf.net/> than a real
machine.
PUPA would not be what it is today without the invaluable help of
everybody who was kind enough to spend time testing it and reporting
bugs.
The following people made especially gracious contributions of their
time and energy in helping to track down bugs, add new features, and
generally assist in the PUPA maintainership process:
NIIBE Yutaka <gniibe@m17n.org>
Tsuneyoshi Yasuo <tuneyoshi@naic.co.jp>
Also, we thank the projects GNU GRUB and GNU Automake. Some code were
stolen from them.
This project is supported by Information-technology Promotion Agency,
Japan.
-*- Mode: Outline -*-
Before working on anything in this file, it's very important that you
make contact with the core PUPA developers. Things herein might be
slightly out of date or otherwise not easy to understand at first
glance. So write to <pupa-devel@nongnu.org> first.
Priorities:
Reported bugs generally have top priority.
Non-reported and non-encountered bugs (things we know don't work,
but don't really impede things) have lower priority.
Things in this file are ranked with one to three !; the more, the
higher priority.
* Add more filesystems (such as ext2fs, ffs, and reiserfs). !
* Add support for internationalization. !!!
* Add more loaders (such as Multiboot, Linux and FreeBSD). !!
* Implement an installer. !!!
* Add more terminals (such as serial). !
* Implement a normal mode. !!!
* Write a manual.
* Shrink the kernel code.
* Add support for compressed files.
* Add support for network devices.
* Compress the core image and decompress it at loading time, to make it
smaller. ?
dnl pupa_ASM_USCORE checks if C symbols get an underscore after
dnl compiling to assembler.
dnl Written by Pavel Roskin. Based on grub_ASM_EXT_C written by
dnl Erich Boleyn and modified by Yoshinori K. Okuji.
AC_DEFUN(pupa_ASM_USCORE,
[AC_REQUIRE([AC_PROG_CC])
AC_MSG_CHECKING([if C symbols get an underscore after compilation])
AC_CACHE_VAL(pupa_cv_asm_uscore,
[cat > conftest.c <<\EOF
int
func (int *list)
{
*list = 0;
return *list;
}
EOF
if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -S conftest.c]) && test -s conftest.s; then
true
else
AC_MSG_ERROR([${CC-cc} failed to produce assembly code])
fi
if grep _func conftest.s >/dev/null 2>&1; then
pupa_cv_asm_uscore=yes
else
pupa_cv_asm_uscore=no
fi
rm -f conftest*])
if test "x$pupa_cv_asm_uscore" = xyes; then
AC_DEFINE_UNQUOTED([HAVE_ASM_USCORE], $pupa_cv_asm_uscore,
[Define if C symbols get an underscore after compilation])
fi
AC_MSG_RESULT([$pupa_cv_asm_uscore])
])
dnl Some versions of `objcopy -O binary' vary their output depending
dnl on the link address.
AC_DEFUN(pupa_PROG_OBJCOPY_ABSOLUTE,
[AC_MSG_CHECKING([whether ${OBJCOPY} works for absolute addresses])
AC_CACHE_VAL(pupa_cv_prog_objcopy_absolute,
[cat > conftest.c <<\EOF
void
cmain (void)
{
*((int *) 0x1000) = 2;
}
EOF
if AC_TRY_EVAL(ac_compile) && test -s conftest.o; then :
else
AC_MSG_ERROR([${CC-cc} cannot compile C source code])
fi
pupa_cv_prog_objcopy_absolute=yes
for link_addr in 2000 8000 7C00; do
if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,$link_addr conftest.o -o conftest.exec]); then :
else
AC_MSG_ERROR([${CC-cc} cannot link at address $link_addr])
fi
if AC_TRY_COMMAND([${OBJCOPY-objcopy} -O binary conftest.exec conftest]); then :
else
AC_MSG_ERROR([${OBJCOPY-objcopy} cannot create binary files])
fi
if test ! -f conftest.old || AC_TRY_COMMAND([cmp -s conftest.old conftest]); then
mv -f conftest conftest.old
else
pupa_cv_prog_objcopy_absolute=no
break
fi
done
rm -f conftest*])
AC_MSG_RESULT([$pupa_cv_prog_objcopy_absolute])
if test "x$pupa_cv_prog_objcopy_absolute" = xno; then
AC_MSG_ERROR([PUPA requires a working absolute objcopy; upgrade your binutils])
fi
])
dnl Mass confusion!
dnl Older versions of GAS interpret `.code16' to mean ``generate 32-bit
dnl instructions, but implicitly insert addr32 and data32 bytes so
dnl that the code works in real mode''.
dnl
dnl Newer versions of GAS interpret `.code16' to mean ``generate 16-bit
dnl instructions,'' which seems right. This requires the programmer
dnl to explicitly insert addr32 and data32 instructions when they want
dnl them.
dnl
dnl We only support the newer versions, because the old versions cause
dnl major pain, by requiring manual assembly to get 16-bit instructions into
dnl asm files.
AC_DEFUN(pupa_I386_ASM_ADDR32,
[AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([pupa_I386_ASM_PREFIX_REQUIREMENT])
AC_MSG_CHECKING([for .code16 addr32 assembler support])
AC_CACHE_VAL(pupa_cv_i386_asm_addr32,
[cat > conftest.s.in <<\EOF
.code16
l1: @ADDR32@ movb %al, l1
EOF
if test "x$pupa_cv_i386_asm_prefix_requirement" = xyes; then
sed -e s/@ADDR32@/addr32/ < conftest.s.in > conftest.s
else
sed -e s/@ADDR32@/addr32\;/ < conftest.s.in > conftest.s
fi
if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -c conftest.s]) && test -s conftest.o; then
pupa_cv_i386_asm_addr32=yes
else
pupa_cv_i386_asm_addr32=no
fi
rm -f conftest*])
AC_MSG_RESULT([$pupa_cv_i386_asm_addr32])])
dnl Later versions of GAS requires that addr32 and data32 prefixes
dnl appear in the same lines as the instructions they modify, while
dnl earlier versions requires that they appear in separate lines.
AC_DEFUN(pupa_I386_ASM_PREFIX_REQUIREMENT,
[AC_REQUIRE([AC_PROG_CC])
AC_MSG_CHECKING(dnl
[whether addr32 must be in the same line as the instruction])
AC_CACHE_VAL(pupa_cv_i386_asm_prefix_requirement,
[cat > conftest.s <<\EOF
.code16
l1: addr32 movb %al, l1
EOF
if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -c conftest.s]) && test -s conftest.o; then
pupa_cv_i386_asm_prefix_requirement=yes
else
pupa_cv_i386_asm_prefix_requirement=no
fi
rm -f conftest*])
if test "x$pupa_cv_i386_asm_prefix_requirement" = xyes; then
pupa_tmp_addr32="addr32"
pupa_tmp_data32="data32"
else
pupa_tmp_addr32="addr32;"
pupa_tmp_data32="data32;"
fi
AC_DEFINE_UNQUOTED([ADDR32], $pupa_tmp_addr32,
[Define it to \"addr32\" or \"addr32;\" to make GAS happy])
AC_DEFINE_UNQUOTED([DATA32], $pupa_tmp_data32,
[Define it to \"data32\" or \"data32;\" to make GAS happy])
AC_MSG_RESULT([$pupa_cv_i386_asm_prefix_requirement])])
dnl Older versions of GAS require that absolute indirect calls/jumps are
dnl not prefixed with `*', while later versions warn if not prefixed.
AC_DEFUN(pupa_I386_ASM_ABSOLUTE_WITHOUT_ASTERISK,
[AC_REQUIRE([AC_PROG_CC])
AC_MSG_CHECKING(dnl
[whether an absolute indirect call/jump must not be prefixed with an asterisk])
AC_CACHE_VAL(pupa_cv_i386_asm_absolute_without_asterisk,
[cat > conftest.s <<\EOF
lcall *(offset)
offset:
.long 0
.word 0
EOF
if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -c conftest.s]) && test -s conftest.o; then
pupa_cv_i386_asm_absolute_without_asterisk=no
else
pupa_cv_i386_asm_absolute_without_asterisk=yes
fi
rm -f conftest*])
if test "x$pupa_cv_i386_asm_absolute_without_asterisk" = xyes; then
AC_DEFINE([ABSOLUTE_WITHOUT_ASTERISK], 1,
[Define it if GAS requires that absolute indirect calls/jumps are not prefixed with an asterisk])
fi
AC_MSG_RESULT([$pupa_cv_i386_asm_absolute_without_asterisk])])
dnl Check what symbol is defined as a start symbol.
dnl Written by Yoshinori K. Okuji.
AC_DEFUN(pupa_CHECK_START_SYMBOL,
[AC_REQUIRE([AC_PROG_CC])
AC_MSG_CHECKING([if start is defined by the compiler])
AC_CACHE_VAL(pupa_cv_check_start_symbol,
[AC_TRY_LINK([], [asm ("incl start")],
pupa_cv_check_start_symbol=yes,
pupa_cv_check_start_symbol=no)])
AC_MSG_RESULT([$pupa_cv_check_start_symbol])
AC_MSG_CHECKING([if _start is defined by the compiler])
AC_CACHE_VAL(pupa_cv_check_uscore_start_symbol,
[AC_TRY_LINK([], [asm ("incl _start")],
pupa_cv_check_uscore_start_symbol=yes,
pupa_cv_check_uscore_start_symbol=no)])
AC_MSG_RESULT([$pupa_cv_check_uscore_start_symbol])
AH_TEMPLATE([START_SYMBOL], [Define it to either start or _start])
if test "x$pupa_cv_check_start_symbol" = xyes; then
AC_DEFINE([START_SYMBOL], [start])
elif test "x$pupa_cv_check_uscore_start_symbol" = xyes; then
AC_DEFINE([START_SYMBOL], [_start])
else
AC_MSG_ERROR([neither start nor _start is defined])
fi
])
dnl Check what symbol is defined as a bss start symbol.
dnl Written by Michael Hohmoth and Yoshinori K. Okuji.
AC_DEFUN(pupa_CHECK_BSS_START_SYMBOL,