commit 4b46c1f6e891b1ddd5968536440b888661fade3e Author: Richard Purdie Date: Wed Aug 31 10:45:47 2005 +0000 Initial population git-svn-id: https://svn.o-hand.com/repos/poky@1 311d38ba-8fff-0310-9ca6-ca027cbcb966 diff --git a/openembedded/classes/autotools.bbclass b/openembedded/classes/autotools.bbclass new file mode 100644 index 0000000000..8a387da5ca --- /dev/null +++ b/openembedded/classes/autotools.bbclass @@ -0,0 +1,153 @@ +inherit base + +def autotools_dep_prepend(d): + import bb; + + if bb.data.getVar('INHIBIT_AUTOTOOLS_DEPS', d, 1): + return '' + + pn = bb.data.getVar('PN', d, 1) + deps = '' + + if pn in ['autoconf-native', 'automake-native']: + return deps + deps += 'autoconf-native automake-native ' + + if not pn in ['libtool', 'libtool-native', 'libtool-cross']: + deps += 'libtool-native ' + + return deps + 'gnu-config-native ' + +EXTRA_OEMAKE = "" +DEPENDS_prepend = "${@autotools_dep_prepend(d)}" +acpaths = "default" +EXTRA_AUTORECONF = "--exclude=autopoint" + +def autotools_set_crosscompiling(d): + import bb + if not bb.data.inherits_class('native', d): + return " cross_compiling=yes" + return "" + +# EXTRA_OECONF_append = "${@autotools_set_crosscompiling(d)}" + +oe_runconf () { + if [ -x ${S}/configure ] ; then + cfgcmd="${S}/configure \ + --build=${BUILD_SYS} \ + --host=${HOST_SYS} \ + --target=${TARGET_SYS} \ + --prefix=${prefix} \ + --exec_prefix=${exec_prefix} \ + --bindir=${bindir} \ + --sbindir=${sbindir} \ + --libexecdir=${libexecdir} \ + --datadir=${datadir} \ + --sysconfdir=${sysconfdir} \ + --sharedstatedir=${sharedstatedir} \ + --localstatedir=${localstatedir} \ + --libdir=${libdir} \ + --includedir=${includedir} \ + --oldincludedir=${oldincludedir} \ + --infodir=${infodir} \ + --mandir=${mandir} \ + ${EXTRA_OECONF} \ + $@" + oenote "Running $cfgcmd..." + $cfgcmd || oefatal "oe_runconf failed" + else + oefatal "no configure script found" + fi +} + +autotools_do_configure() { + case ${PN} in + autoconf*) + ;; + automake*) + ;; + *) + # WARNING: gross hack follows: + # An autotools built package generally needs these scripts, however only + # automake or libtoolize actually install the current versions of them. + # This is a problem in builds that do not use libtool or automake, in the case + # where we -need- the latest version of these scripts. e.g. running a build + # for a package whose autotools are old, on an x86_64 machine, which the old + # config.sub does not support. Work around this by installing them manually + # regardless. + ( for ac in `find ${S} -name configure.in -o -name configure.ac`; do + rm -f `dirname $ac`/configure + done ) + if [ -e ${S}/configure.in -o -e ${S}/configure.ac ]; then + olddir=`pwd` + cd ${S} + if [ x"${acpaths}" = xdefault ]; then + acpaths= + for i in `find ${S} -maxdepth 2 -name \*.m4|grep -v 'aclocal.m4'| \ + grep -v 'acinclude.m4' | sed -e 's,\(.*/\).*$,\1,'|sort -u`; do + acpaths="$acpaths -I $i" + done + else + acpaths="${acpaths}" + fi + AUTOV=`automake --version |head -n 1 |sed "s/.* //;s/\.[0-9]\+$//"` + automake --version + echo "AUTOV is $AUTOV" + install -d ${STAGING_DIR}/${HOST_SYS}/share/aclocal + install -d ${STAGING_DIR}/${HOST_SYS}/share/aclocal-$AUTOV + acpaths="$acpaths -I ${STAGING_DIR}/${HOST_SYS}/share/aclocal-$AUTOV -I ${STAGING_DIR}/${HOST_SYS}/share/aclocal" + # autoreconf is too shy to overwrite aclocal.m4 if it doesn't look + # like it was auto-generated. Work around this by blowing it away + # by hand, unless the package specifically asked not to run aclocal. + if ! echo ${EXTRA_AUTORECONF} | grep -q "aclocal"; then + rm -f aclocal.m4 + fi + if [ -e configure.in ]; then + CONFIGURE_AC=configure.in + else + CONFIGURE_AC=configure.ac + fi + if grep "^AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then + if grep "sed.*POTFILES" $CONFIGURE_AC >/dev/null; then + : do nothing -- we still have an old unmodified configure.ac + else + oenote Executing glib-gettextize --force --copy + echo "no" | glib-gettextize --force --copy + fi + fi + if grep "^AC_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then + oenote Executing intltoolize --copy --force --automake + intltoolize --copy --force --automake + fi + oenote Executing autoreconf --verbose --install --force ${EXTRA_AUTORECONF} $acpaths + mkdir -p m4 + autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || oefatal "autoreconf execution failed." + cd $olddir + fi + ;; + esac + if [ -e ${S}/configure ]; then + oe_runconf + else + oenote "nothing to configure" + fi +} + +autotools_do_install() { + oe_runmake 'DESTDIR=${D}' install +} + +STAGE_TEMP="${WORKDIR}/temp-staging" + +autotools_stage_includes() { + if [ "${INHIBIT_AUTO_STAGE_INCLUDES}" != "1" ] + then + rm -rf ${STAGE_TEMP} + mkdir -p ${STAGE_TEMP} + make DESTDIR="${STAGE_TEMP}" install + cp -a ${STAGE_TEMP}/${includedir}/* ${STAGING_INCDIR} + rm -rf ${STAGE_TEMP} + fi +} + +EXPORT_FUNCTIONS do_configure do_install diff --git a/openembedded/classes/base.bbclass b/openembedded/classes/base.bbclass new file mode 100644 index 0000000000..37254b94ba --- /dev/null +++ b/openembedded/classes/base.bbclass @@ -0,0 +1,801 @@ +PATCHES_DIR="${S}" + +def base_dep_prepend(d): + import bb; + # + # Ideally this will check a flag so we will operate properly in + # the case where host == build == target, for now we don't work in + # that case though. + # + deps = "" + + # INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not + # we need that built is the responsibility of the patch function / class, not + # the application. + patchdeps = bb.data.getVar("PATCH_DEPENDS", d, 1) + if patchdeps and not patchdeps in bb.data.getVar("PROVIDES", d, 1): + deps = patchdeps + + if not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d): + if (bb.data.getVar('HOST_SYS', d, 1) != + bb.data.getVar('BUILD_SYS', d, 1)): + deps += " virtual/${TARGET_PREFIX}gcc virtual/libc " + return deps + +def base_read_file(filename): + import bb + try: + f = file( filename, "r" ) + except IOError, reason: + raise bb.build.FuncFailed("can't read from file '%s' (%s)", (filename,reason)) + else: + return f.read().strip() + return None + +def base_conditional(variable, checkvalue, truevalue, falsevalue, d): + import bb + if bb.data.getVar(variable,d,1) == checkvalue: + return truevalue + else: + return falsevalue + +DEPENDS_prepend="${@base_dep_prepend(d)} " + +def base_set_filespath(path, d): + import os, bb + filespath = [] + for p in path: + overrides = bb.data.getVar("OVERRIDES", d, 1) or "" + overrides = overrides + ":" + for o in overrides.split(":"): + filespath.append(os.path.join(p, o)) + bb.data.setVar("FILESPATH", ":".join(filespath), d) + +FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}" + +def oe_filter(f, str, d): + from re import match + return " ".join(filter(lambda x: match(f, x, 0), str.split())) + +def oe_filter_out(f, str, d): + from re import match + return " ".join(filter(lambda x: not match(f, x, 0), str.split())) + +die() { + oefatal "$*" +} + +oenote() { + echo "NOTE:" "$*" +} + +oewarn() { + echo "WARNING:" "$*" +} + +oefatal() { + echo "FATAL:" "$*" + exit 1 +} + +oedebug() { + test $# -ge 2 || { + echo "Usage: oedebug level \"message\"" + exit 1 + } + + test ${OEDEBUG:-0} -ge $1 && { + shift + echo "DEBUG:" $* + } +} + +oe_runmake() { + if [ x"$MAKE" = x ]; then MAKE=make; fi + oenote ${MAKE} ${EXTRA_OEMAKE} "$@" + ${MAKE} ${EXTRA_OEMAKE} "$@" || die "oe_runmake failed" +} + +oe_soinstall() { + # Purpose: Install shared library file and + # create the necessary links + # Example: + # + # oe_ + # + #oenote installing shared library $1 to $2 + # + libname=`basename $1` + install -m 755 $1 $2/$libname + sonamelink=`${HOST_PREFIX}readelf -d $1 |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'` + solink=`echo $libname | sed -e 's/\.so\..*/.so/'` + ln -sf $libname $2/$sonamelink + ln -sf $libname $2/$solink +} + +oe_libinstall() { + # Purpose: Install a library, in all its forms + # Example + # + # oe_libinstall libltdl ${STAGING_LIBDIR}/ + # oe_libinstall -C src/libblah libblah ${D}/${libdir}/ + dir="" + libtool="" + silent="" + require_static="" + require_shared="" + while [ "$#" -gt 0 ]; do + case "$1" in + -C) + shift + dir="$1" + ;; + -s) + silent=1 + ;; + -a) + require_static=1 + ;; + -so) + require_shared=1 + ;; + -*) + oefatal "oe_libinstall: unknown option: $1" + ;; + *) + break; + ;; + esac + shift + done + + libname="$1" + shift + destpath="$1" + if [ -z "$destpath" ]; then + oefatal "oe_libinstall: no destination path specified" + fi + + __runcmd () { + if [ -z "$silent" ]; then + echo >&2 "oe_libinstall: $*" + fi + $* + } + + if [ -z "$dir" ]; then + dir=`pwd` + fi + if [ -d "$dir/.libs" ]; then + dir=$dir/.libs + fi + olddir=`pwd` + __runcmd cd $dir + + lafile=$libname.la + if [ -f "$lafile" ]; then + # libtool archive + eval `cat $lafile|grep "^library_names="` + libtool=1 + else + library_names="$libname.so* $libname.dll.a" + fi + + __runcmd install -d $destpath/ + dota=$libname.a + if [ -f "$dota" -o -n "$require_static" ]; then + __runcmd install -m 0644 $dota $destpath/ + fi + dotlai=$libname.lai + if [ -f "$dotlai" -a -n "$libtool" ]; then + __runcmd install -m 0644 $dotlai $destpath/$libname.la + fi + + for name in $library_names; do + files=`eval echo $name` + for f in $files; do + if [ ! -e "$f" ]; then + if [ -n "$libtool" ]; then + oefatal "oe_libinstall: $dir/$f not found." + fi + elif [ -L "$f" ]; then + __runcmd cp -P "$f" $destpath/ + elif [ ! -L "$f" ]; then + libfile="$f" + __runcmd install -m 0755 $libfile $destpath/ + fi + done + done + + if [ -z "$libfile" ]; then + if [ -n "$require_shared" ]; then + oefatal "oe_libinstall: unable to locate shared library" + fi + elif [ -z "$libtool" ]; then + # special case hack for non-libtool .so.#.#.# links + baselibfile=`basename "$libfile"` + if (echo $baselibfile | grep -qE '^lib.*\.so\.[0-9.]*$'); then + sonamelink=`${HOST_PREFIX}readelf -d $libfile |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'` + solink=`echo $baselibfile | sed -e 's/\.so\..*/.so/'` + if [ -n "$sonamelink" -a x"$baselibfile" != x"$sonamelink" ]; then + __runcmd ln -sf $baselibfile $destpath/$sonamelink + fi + __runcmd ln -sf $baselibfile $destpath/$solink + fi + fi + + __runcmd cd "$olddir" +} + +oe_machinstall() { + # Purpose: Install machine dependent files, if available + # If not available, check if there is a default + # If no default, just touch the destination + # Example: + # $1 $2 $3 $4 + # oe_machinstall -m 0644 fstab ${D}/etc/fstab + # + # TODO: Check argument number? + # + filename=`basename $3` + dirname=`dirname $3` + + for o in `echo ${OVERRIDES} | tr ':' ' '`; do + if [ -e $dirname/$o/$filename ]; then + oenote $dirname/$o/$filename present, installing to $4 + install $1 $2 $dirname/$o/$filename $4 + return + fi + done +# oenote overrides specific file NOT present, trying default=$3... + if [ -e $3 ]; then + oenote $3 present, installing to $4 + install $1 $2 $3 $4 + else + oenote $3 NOT present, touching empty $4 + touch $4 + fi +} + +addtask showdata +do_showdata[nostamp] = "1" +python do_showdata() { + import sys + # emit variables and shell functions + bb.data.emit_env(sys.__stdout__, d, True) + # emit the metadata which isnt valid shell + for e in d.keys(): + if bb.data.getVarFlag(e, 'python', d): + sys.__stdout__.write("\npython %s () {\n%s}\n" % (e, bb.data.getVar(e, d, 1))) +} + +addtask listtasks +do_listtasks[nostamp] = "1" +python do_listtasks() { + import sys + # emit variables and shell functions + #bb.data.emit_env(sys.__stdout__, d) + # emit the metadata which isnt valid shell + for e in d.keys(): + if bb.data.getVarFlag(e, 'task', d): + sys.__stdout__.write("%s\n" % e) +} + +addtask clean +do_clean[dirs] = "${TOPDIR}" +do_clean[nostamp] = "1" +do_clean[bbdepcmd] = "" +python base_do_clean() { + """clear the build and temp directories""" + dir = bb.data.expand("${WORKDIR}", d) + if dir == '//': raise bb.build.FuncFailed("wrong DATADIR") + bb.note("removing " + dir) + os.system('rm -rf ' + dir) + + dir = "%s.*" % bb.data.expand(bb.data.getVar('STAMP', d), d) + bb.note("removing " + dir) + os.system('rm -f '+ dir) +} + +addtask mrproper +do_mrproper[dirs] = "${TOPDIR}" +do_mrproper[nostamp] = "1" +do_mrproper[bbdepcmd] = "" +python base_do_mrproper() { + """clear downloaded sources, build and temp directories""" + dir = bb.data.expand("${DL_DIR}", d) + if dir == '/': bb.build.FuncFailed("wrong DATADIR") + bb.debug(2, "removing " + dir) + os.system('rm -rf ' + dir) + bb.build.exec_task('do_clean', d) +} + +addtask fetch +do_fetch[dirs] = "${DL_DIR}" +do_fetch[nostamp] = "1" +python base_do_fetch() { + import sys + + localdata = bb.data.createCopy(d) + bb.data.update_data(localdata) + + src_uri = bb.data.getVar('SRC_URI', localdata, 1) + if not src_uri: + return 1 + + try: + bb.fetch.init(src_uri.split(),d) + except bb.fetch.NoMethodError: + (type, value, traceback) = sys.exc_info() + raise bb.build.FuncFailed("No method: %s" % value) + + try: + bb.fetch.go(localdata) + except bb.fetch.MissingParameterError: + (type, value, traceback) = sys.exc_info() + raise bb.build.FuncFailed("Missing parameters: %s" % value) + except bb.fetch.FetchError: + (type, value, traceback) = sys.exc_info() + raise bb.build.FuncFailed("Fetch failed: %s" % value) +} + +def oe_unpack_file(file, data, url = None): + import bb, os + if not url: + url = "file://%s" % file + dots = file.split(".") + if dots[-1] in ['gz', 'bz2', 'Z']: + efile = os.path.join(bb.data.getVar('WORKDIR', data, 1),os.path.basename('.'.join(dots[0:-1]))) + else: + efile = file + cmd = None + if file.endswith('.tar'): + cmd = 'tar x --no-same-owner -f %s' % file + elif file.endswith('.tgz') or file.endswith('.tar.gz'): + cmd = 'tar xz --no-same-owner -f %s' % file + elif file.endswith('.tbz') or file.endswith('.tar.bz2'): + cmd = 'bzip2 -dc %s | tar x --no-same-owner -f -' % file + elif file.endswith('.gz') or file.endswith('.Z') or file.endswith('.z'): + cmd = 'gzip -dc %s > %s' % (file, efile) + elif file.endswith('.bz2'): + cmd = 'bzip2 -dc %s > %s' % (file, efile) + elif file.endswith('.zip'): + cmd = 'unzip -q %s' % file + elif os.path.isdir(file): + filesdir = os.path.realpath(bb.data.getVar("FILESDIR", data, 1)) + destdir = "." + if file[0:len(filesdir)] == filesdir: + destdir = file[len(filesdir):file.rfind('/')] + destdir = destdir.strip('/') + if len(destdir) < 1: + destdir = "." + elif not os.access("%s/%s" % (os.getcwd(), destdir), os.F_OK): + os.makedirs("%s/%s" % (os.getcwd(), destdir)) + cmd = 'cp -a %s %s/%s/' % (file, os.getcwd(), destdir) + else: + (type, host, path, user, pswd, parm) = bb.decodeurl(url) + if not 'patch' in parm: + # The "destdir" handling was specifically done for FILESPATH + # items. So, only do so for file:// entries. + if type == "file": + destdir = bb.decodeurl(url)[1] or "." + else: + destdir = "." + bb.mkdirhier("%s/%s" % (os.getcwd(), destdir)) + cmd = 'cp %s %s/%s/' % (file, os.getcwd(), destdir) + if not cmd: + return True + cmd = "PATH=\"%s\" %s" % (bb.data.getVar('PATH', data, 1), cmd) + bb.note("Unpacking %s to %s/" % (file, os.getcwd())) + ret = os.system(cmd) + return ret == 0 + +addtask unpack after do_fetch +do_unpack[dirs] = "${WORKDIR}" +python base_do_unpack() { + import re, os + + localdata = bb.data.createCopy(d) + bb.data.update_data(localdata) + + src_uri = bb.data.getVar('SRC_URI', localdata) + if not src_uri: + return + src_uri = bb.data.expand(src_uri, localdata) + for url in src_uri.split(): + try: + local = bb.data.expand(bb.fetch.localpath(url, localdata), localdata) + except bb.MalformedUrl, e: + raise FuncFailed('Unable to generate local path for malformed uri: %s' % e) + # dont need any parameters for extraction, strip them off + local = re.sub(';.*$', '', local) + local = os.path.realpath(local) + ret = oe_unpack_file(local, localdata, url) + if not ret: + raise bb.build.FuncFailed() +} + +addtask patch after do_unpack +do_patch[dirs] = "${WORKDIR}" +python base_do_patch() { + import re + import bb.fetch + + src_uri = (bb.data.getVar('SRC_URI', d, 1) or '').split() + if not src_uri: + return + + patchcleancmd = bb.data.getVar('PATCHCLEANCMD', d, 1) + if patchcleancmd: + bb.data.setVar("do_patchcleancmd", patchcleancmd, d) + bb.data.setVarFlag("do_patchcleancmd", "func", 1, d) + bb.build.exec_func("do_patchcleancmd", d) + + workdir = bb.data.getVar('WORKDIR', d, 1) + for url in src_uri: + + (type, host, path, user, pswd, parm) = bb.decodeurl(url) + if not "patch" in parm: + continue + + bb.fetch.init([url], d) + url = bb.encodeurl((type, host, path, user, pswd, [])) + local = os.path.join('/', bb.fetch.localpath(url, d)) + + # did it need to be unpacked? + dots = os.path.basename(local).split(".") + if dots[-1] in ['gz', 'bz2', 'Z']: + unpacked = os.path.join(bb.data.getVar('WORKDIR', d),'.'.join(dots[0:-1])) + else: + unpacked = local + unpacked = bb.data.expand(unpacked, d) + + if "pnum" in parm: + pnum = parm["pnum"] + else: + pnum = "1" + + if "pname" in parm: + pname = parm["pname"] + else: + pname = os.path.basename(unpacked) + + bb.note("Applying patch '%s'" % pname) + bb.data.setVar("do_patchcmd", bb.data.getVar("PATCHCMD", d, 1) % (pnum, pname, unpacked), d) + bb.data.setVarFlag("do_patchcmd", "func", 1, d) + bb.data.setVarFlag("do_patchcmd", "dirs", "${WORKDIR} ${S}", d) + bb.build.exec_func("do_patchcmd", d) +} + + +addhandler base_eventhandler +python base_eventhandler() { + from bb import note, error, data + from bb.event import Handled, NotHandled, getName + import os + + messages = {} + messages["Completed"] = "completed" + messages["Succeeded"] = "completed" + messages["Started"] = "started" + messages["Failed"] = "failed" + + name = getName(e) + msg = "" + if name.startswith("Pkg"): + msg += "package %s: " % data.getVar("P", e.data, 1) + msg += messages.get(name[3:]) or name[3:] + elif name.startswith("Task"): + msg += "package %s: task %s: " % (data.getVar("PF", e.data, 1), e.task) + msg += messages.get(name[4:]) or name[4:] + elif name.startswith("Build"): + msg += "build %s: " % e.name + msg += messages.get(name[5:]) or name[5:] + elif name == "UnsatisfiedDep": + msg += "package %s: dependency %s %s" % (e.pkg, e.dep, name[:-3].lower()) + note(msg) + + if name.startswith("BuildStarted"): + statusvars = ['TARGET_ARCH', 'TARGET_OS', 'MACHINE', 'DISTRO', + 'TARGET_FPU'] + statuslines = ["%-13s = \"%s\"" % (i, bb.data.getVar(i, e.data, 1) or '') for i in statusvars] + statusmsg = "\nOE Build Configuration:\n%s\n" % '\n'.join(statuslines) + print statusmsg + + needed_vars = [ "TARGET_ARCH", "TARGET_OS" ] + pesteruser = [] + for v in needed_vars: + val = bb.data.getVar(v, e.data, 1) + if not val or val == 'INVALID': + pesteruser.append(v) + if pesteruser: + bb.fatal('The following variable(s) were not set: %s\nPlease set them directly, or choose a MACHINE or DISTRO that sets them.' % ', '.join(pesteruser)) + + if not data in e.__dict__: + return NotHandled + + log = data.getVar("EVENTLOG", e.data, 1) + if log: + logfile = file(log, "a") + logfile.write("%s\n" % msg) + logfile.close() + + return NotHandled +} + +addtask configure after do_unpack do_patch +do_configure[dirs] = "${S} ${B}" +do_configure[bbdepcmd] = "do_populate_staging" +base_do_configure() { + : +} + +addtask compile after do_configure +do_compile[dirs] = "${S} ${B}" +do_compile[bbdepcmd] = "do_populate_staging" +base_do_compile() { + if [ -e Makefile -o -e makefile ]; then + oe_runmake || die "make failed" + else + oenote "nothing to compile" + fi +} + + +addtask stage after do_compile +base_do_stage () { + : +} + +do_populate_staging[dirs] = "${STAGING_DIR}/${TARGET_SYS}/bin ${STAGING_DIR}/${TARGET_SYS}/lib \ + ${STAGING_DIR}/${TARGET_SYS}/include \ + ${STAGING_DIR}/${BUILD_SYS}/bin ${STAGING_DIR}/${BUILD_SYS}/lib \ + ${STAGING_DIR}/${BUILD_SYS}/include \ + ${STAGING_DATADIR} \ + ${S} ${B}" + +addtask populate_staging after do_compile + +#python do_populate_staging () { +# if not bb.data.getVar('manifest', d): +# bb.build.exec_func('do_emit_manifest', d) +# if bb.data.getVar('do_stage', d): +# bb.build.exec_func('do_stage', d) +# else: +# bb.build.exec_func('manifest_do_populate_staging', d) +#} + +python do_populate_staging () { + if bb.data.getVar('manifest_do_populate_staging', d): + bb.build.exec_func('manifest_do_populate_staging', d) + else: + bb.build.exec_func('do_stage', d) +} + +#addtask install +addtask install after do_compile +do_install[dirs] = "${S} ${B}" + +base_do_install() { + : +} + +#addtask populate_pkgs after do_compile +#python do_populate_pkgs () { +# if not bb.data.getVar('manifest', d): +# bb.build.exec_func('do_emit_manifest', d) +# bb.build.exec_func('manifest_do_populate_pkgs', d) +# bb.build.exec_func('package_do_shlibs', d) +#} + +base_do_package() { + : +} + +addtask build after do_populate_staging +do_build = "" +do_build[func] = "1" + +# Functions that update metadata based on files outputted +# during the build process. + +SHLIBS = "" +RDEPENDS_prepend = " ${SHLIBS}" + +python read_manifest () { + import sys + mfn = bb.data.getVar("MANIFEST", d, 1) + if os.access(mfn, os.R_OK): + # we have a manifest, so emit do_stage and do_populate_pkgs, + # and stuff some additional bits of data into the metadata store + mfile = file(mfn, "r") + manifest = bb.manifest.parse(mfile, d) + if not manifest: + return + + bb.data.setVar('manifest', manifest, d) +} + +python parse_manifest () { + manifest = bb.data.getVar("manifest", d) + if not manifest: + return + for func in ("do_populate_staging", "do_populate_pkgs"): + value = bb.manifest.emit(func, manifest, d) + if value: + bb.data.setVar("manifest_" + func, value, d) + bb.data.delVarFlag("manifest_" + func, "python", d) + bb.data.delVarFlag("manifest_" + func, "fakeroot", d) + bb.data.setVarFlag("manifest_" + func, "func", 1, d) + packages = [] + for l in manifest: + if "pkg" in l and l["pkg"] is not None: + packages.append(l["pkg"]) + bb.data.setVar("PACKAGES", " ".join(packages), d) +} + +def explode_deps(s): + r = [] + l = s.split() + flag = False + for i in l: + if i[0] == '(': + flag = True + j = [] + if flag: + j.append(i) + if i.endswith(')'): + flag = False + r[-1] += ' ' + ' '.join(j) + else: + r.append(i) + return r + +python read_shlibdeps () { + packages = (bb.data.getVar('PACKAGES', d, 1) or "").split() + for pkg in packages: + rdepends = explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "") + shlibsfile = bb.data.expand("${WORKDIR}/install/" + pkg + ".shlibdeps", d) + if os.access(shlibsfile, os.R_OK): + fd = file(shlibsfile) + lines = fd.readlines() + fd.close() + for l in lines: + rdepends.append(l.rstrip()) + pcfile = bb.data.expand("${WORKDIR}/install/" + pkg + ".pcdeps", d) + if os.access(pcfile, os.R_OK): + fd = file(pcfile) + lines = fd.readlines() + fd.close() + for l in lines: + rdepends.append(l.rstrip()) + bb.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d) +} + +python read_subpackage_metadata () { + import re + + def decode(str): + import codecs + c = codecs.getdecoder("string_escape") + return c(str)[0] + + data_file = bb.data.expand("${WORKDIR}/install/${PN}.package", d) + if os.access(data_file, os.R_OK): + f = file(data_file, 'r') + lines = f.readlines() + f.close() + r = re.compile("([^:]+):\s*(.*)") + for l in lines: + m = r.match(l) + if m: + bb.data.setVar(m.group(1), decode(m.group(2)), d) +} + +python __anonymous () { + import exceptions + need_host = bb.data.getVar('COMPATIBLE_HOST', d, 1) + if need_host: + import re + this_host = bb.data.getVar('HOST_SYS', d, 1) + if not re.match(need_host, this_host): + raise bb.parse.SkipPackage("incompatible with host %s" % this_host) + + pn = bb.data.getVar('PN', d, 1) + + cvsdate = bb.data.getVar('CVSDATE_%s' % pn, d, 1) + if cvsdate != None: + bb.data.setVar('CVSDATE', cvsdate, d) + + use_nls = bb.data.getVar('USE_NLS_%s' % pn, d, 1) + if use_nls != None: + bb.data.setVar('USE_NLS', use_nls, d) + + try: + bb.build.exec_func('read_manifest', d) + bb.build.exec_func('parse_manifest', d) + except exceptions.KeyboardInterrupt: + raise + except Exception, e: + bb.error("anonymous function: %s" % e) + pass +} + +python () { + import bb, os + mach_arch = bb.data.getVar('MACHINE_ARCH', d, 1) + old_arch = bb.data.getVar('PACKAGE_ARCH', d, 1) + if (old_arch == mach_arch): + # Nothing to do + return + if (bb.data.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH', d, 1) == '0'): + return + paths = [] + for p in [ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ]: + paths.append(bb.data.expand(os.path.join(p, mach_arch), d)) + for s in bb.data.getVar('SRC_URI', d, 1).split(): + local = bb.data.expand(bb.fetch.localpath(s, d), d) + for mp in paths: + if local.startswith(mp): +# bb.note("overriding PACKAGE_ARCH from %s to %s" % (old_arch, mach_arch)) + bb.data.setVar('PACKAGE_ARCH', mach_arch, d) + return +} + + +addtask emit_manifest +python do_emit_manifest () { +# FIXME: emit a manifest here +# 1) adjust PATH to hit the wrapper scripts + wrappers = bb.which(bb.data.getVar("BBPATH", d, 1), 'build/install', 0) + path = (bb.data.getVar('PATH', d, 1) or '').split(':') + path.insert(0, os.path.dirname(wrappers)) + bb.data.setVar('PATH', ':'.join(path), d) +# 2) exec_func("do_install", d) + bb.build.exec_func('do_install', d) +# 3) read in data collected by the wrappers + bb.build.exec_func('read_manifest', d) +# 4) mangle the manifest we just generated, get paths back into +# our variable form +# 5) write it back out +# 6) re-parse it to ensure the generated functions are proper + bb.build.exec_func('parse_manifest', d) +} + +EXPORT_FUNCTIONS do_clean do_mrproper do_fetch do_unpack do_configure do_compile do_install do_package do_patch do_populate_pkgs do_stage + +MIRRORS[func] = "0" +MIRRORS () { +${DEBIAN_MIRROR}/main http://snapshot.debian.net/archive/pool +${DEBIAN_MIRROR} ftp://ftp.de.debian.org/debian/pool +${DEBIAN_MIRROR} ftp://ftp.au.debian.org/debian/pool +${DEBIAN_MIRROR} ftp://ftp.cl.debian.org/debian/pool +${DEBIAN_MIRROR} ftp://ftp.hr.debian.org/debian/pool +${DEBIAN_MIRROR} ftp://ftp.fi.debian.org/debian/pool +${DEBIAN_MIRROR} ftp://ftp.hk.debian.org/debian/pool +${DEBIAN_MIRROR} ftp://ftp.hu.debian.org/debian/pool +${DEBIAN_MIRROR} ftp://ftp.ie.debian.org/debian/pool +${DEBIAN_MIRROR} ftp://ftp.it.debian.org/debian/pool +${DEBIAN_MIRROR} ftp://ftp.jp.debian.org/debian/pool +${DEBIAN_MIRROR} ftp://ftp.no.debian.org/debian/pool +${DEBIAN_MIRROR} ftp://ftp.pl.debian.org/debian/pool +${DEBIAN_MIRROR} ftp://ftp.ro.debian.org/debian/pool +${DEBIAN_MIRROR} ftp://ftp.si.debian.org/debian/pool +${DEBIAN_MIRROR} ftp://ftp.es.debian.org/debian/pool +${DEBIAN_MIRROR} ftp://ftp.se.debian.org/debian/pool +${DEBIAN_MIRROR} ftp://ftp.tr.debian.org/debian/pool +${GNU_MIRROR} ftp://mirrors.kernel.org/gnu +${GNU_MIRROR} ftp://ftp.matrix.com.br/pub/gnu +${GNU_MIRROR} ftp://ftp.cs.ubc.ca/mirror2/gnu +${GNU_MIRROR} ftp://sunsite.ust.hk/pub/gnu +${GNU_MIRROR} ftp://ftp.ayamura.org/pub/gnu +ftp://ftp.kernel.org/pub http://www.kernel.org/pub +ftp://ftp.kernel.org/pub ftp://ftp.us.kernel.org/pub +ftp://ftp.kernel.org/pub ftp://ftp.uk.kernel.org/pub +ftp://ftp.kernel.org/pub ftp://ftp.hk.kernel.org/pub +ftp://ftp.kernel.org/pub ftp://ftp.au.kernel.org/pub +ftp://ftp.kernel.org/pub ftp://ftp.jp.kernel.org/pub +ftp://.*/.*/ http://www.oesources.org/source/current/ +http://.*/.*/ http://www.oesources.org/source/current/ +} + diff --git a/openembedded/classes/base_srpm.bbclass b/openembedded/classes/base_srpm.bbclass new file mode 100644 index 0000000000..aea6335278 --- /dev/null +++ b/openembedded/classes/base_srpm.bbclass @@ -0,0 +1,20 @@ +inherit base package rpm_core + +SPECFILE="${RPMBUILDPATH}/SPECS/${PN}.spec" + +base_srpm_do_unpack() { + test -e ${SRPMFILE} || die "Source rpm \"${SRPMFILE}\"does not exist" + if ! test -e ${SPECFILE}; then + ${RPM} -i ${SRPMFILE} + fi + test -e ${SPECFILE} || die "Spec file \"${SPECFILE}\" does not exist" + ${RPMBUILD} -bp ${SPECFILE} +} + +base_srpm_do_compile() { + ${RPMBUILD} -bc ${SPECFILE} +} + +base_srpm_do_install() { + ${RPMBUILD} -bi ${SPECFILE} +} diff --git a/openembedded/classes/binconfig.bbclass b/openembedded/classes/binconfig.bbclass new file mode 100644 index 0000000000..a599dec3f2 --- /dev/null +++ b/openembedded/classes/binconfig.bbclass @@ -0,0 +1,34 @@ +inherit base + +# The namespaces can clash here hence the two step replace +def get_binconfig_mangle(d): + import bb.data + s = "-e ''" + if not bb.data.inherits_class('native', d): + s += " -e 's:=${libdir}:=OELIBDIR:;'" + s += " -e 's:=${includedir}:=OEINCDIR:;'" + s += " -e 's:=${datadir}:=OEDATADIR:'" + s += " -e 's:=${prefix}:=OEPREFIX:'" + s += " -e 's:=${exec_prefix}:=OEEXECPREFIX:'" + s += " -e 's:-L${libdir}:-LOELIBDIR:;'" + s += " -e 's:-I${includedir}:-IOEINCDIR:;'" + s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'" + s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'" + s += " -e 's:OEDATADIR:${STAGING_DATADIR}:'" + s += " -e 's:OEPREFIX:${STAGING_LIBDIR}/..:'" + s += " -e 's:OEEXECPREFIX:${STAGING_LIBDIR}/..:'" + return s + +# Native package configurations go in ${BINDIR}/-config-native to prevent a collision with cross packages +def is_native(d): + import bb.data + return ["","-native"][bb.data.inherits_class('native', d)] + +do_stage_append() { + for config in `find ${S} -name '*-config'`; do + configname=`basename $config`${@is_native(d)} + install -d ${STAGING_BINDIR} + cat $config | sed ${@get_binconfig_mangle(d)} > ${STAGING_BINDIR}/$configname + chmod u+x ${STAGING_BINDIR}/$configname + done +} diff --git a/openembedded/classes/ccache.inc b/openembedded/classes/ccache.inc new file mode 100644 index 0000000000..5e9356104b --- /dev/null +++ b/openembedded/classes/ccache.inc @@ -0,0 +1,11 @@ +# Make ccache use a TMPDIR specific ccache directory if using the crosscompiler, +# since it isn't likely to be useful with any other toolchain than the one we just +# built, and would otherwise push more useful things out of the default cache. + +CCACHE_DIR_TARGET = "${TMPDIR}/ccache" + +python () { + if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d): + bb.data.setVar('CCACHE_DIR', '${CCACHE_DIR_TARGET}', d) + bb.data.setVarFlag('CCACHE_DIR', 'export', '1', d) +} diff --git a/openembedded/classes/ccdv.bbclass b/openembedded/classes/ccdv.bbclass new file mode 100644 index 0000000000..edd151ef8c --- /dev/null +++ b/openembedded/classes/ccdv.bbclass @@ -0,0 +1,21 @@ +python () { + if bb.data.getVar('PN', d, 1) in ['ccdv-native']: + if not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d, 1): + bb.data.setVar("DEPENDS", '%s %s' % ("ccdv-native", bb.data.getVar("DEPENDS", d, 1) or ""), d) + bb.data.setVar("CC", '%s %s' % ("ccdv", bb.data.getVar("CC", d, 1) or ""), d) + bb.data.setVar("BUILD_CC", '%s %s' % ("ccdv", bb.data.getVar("BUILD_CC", d, 1) or ""), d) + bb.data.setVar("CCLD", '%s %s' % ("ccdv", bb.data.getVar("CCLD", d, 1) or ""), d) +} + +def quiet_libtool(bb,d): + deps = (bb.data.getVar('DEPENDS', d, 1) or "").split() + if 'libtool-cross' in deps: + return "'LIBTOOL=${STAGING_BINDIR}/${HOST_SYS}-libtool --silent'" + elif 'libtool-native' in deps: + return "'LIBTOOL=${B}/${HOST_SYS}-libtool --silent'" + else: + return "" + +CCDV = "ccdv" +EXTRA_OEMAKE_append = " ${@quiet_libtool(bb,d)}" +MAKE += "-s" diff --git a/openembedded/classes/cml1.bbclass b/openembedded/classes/cml1.bbclass new file mode 100644 index 0000000000..79218b4a12 --- /dev/null +++ b/openembedded/classes/cml1.bbclass @@ -0,0 +1,8 @@ +cml1_do_configure() { + set -e + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + oe_runmake oldconfig +} + +EXPORT_FUNCTIONS do_configure +addtask configure after do_unpack do_patch before do_compile diff --git a/openembedded/classes/cpan.bbclass b/openembedded/classes/cpan.bbclass new file mode 100644 index 0000000000..853abfd1b3 --- /dev/null +++ b/openembedded/classes/cpan.bbclass @@ -0,0 +1,20 @@ +FILES_${PN} += '${libdir}/perl5' + +cpan_do_configure () { + perl Makefile.PL + if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then + . ${STAGING_DIR}/${TARGET_SYS}/perl/config.sh + sed -e "s:\(SITELIBEXP = \).*:\1${sitelibexp}:; s:\(SITEARCHEXP = \).*:\1${sitearchexp}:; s:\(INSTALLVENDORLIB = \).*:\1${D}${libdir}/perl5:; s:\(INSTALLVENDORARCH = \).*:\1${D}${libdir}/perl5:" < Makefile > Makefile.new + mv Makefile.new Makefile + fi +} + +cpan_do_compile () { + oe_runmake PASTHRU_INC="${CFLAGS}" +} + +cpan_do_install () { + oe_runmake install_vendor +} + +EXPORT_FUNCTIONS do_configure do_compile do_install diff --git a/openembedded/classes/cross.bbclass b/openembedded/classes/cross.bbclass new file mode 100644 index 0000000000..5d670ccadc --- /dev/null +++ b/openembedded/classes/cross.bbclass @@ -0,0 +1,54 @@ +# Cross packages are built indirectly via dependency, +# no need for them to be a direct target of 'world' +EXCLUDE_FROM_WORLD = "1" + +PACKAGES = "" + +HOST_ARCH = "${BUILD_ARCH}" +HOST_VENDOR = "${BUILD_VENDOR}" +HOST_OS = "${BUILD_OS}" +HOST_PREFIX = "${BUILD_PREFIX}" +HOST_CC_ARCH = "${BUILD_CC_ARCH}" + +CPPFLAGS = "${BUILD_CPPFLAGS}" +CFLAGS = "${BUILD_CFLAGS}" +CXXFLAGS = "${BUILD_CFLAGS}" +LDFLAGS = "${BUILD_LDFLAGS}" + +# Overrides for paths + +# Path prefixes +base_prefix = "${exec_prefix}" +prefix = "${CROSS_DIR}" +exec_prefix = "${prefix}" + +# Base paths +base_bindir = "${base_prefix}/bin" +base_sbindir = "${base_prefix}/bin" +base_libdir = "${base_prefix}/lib" + +# Architecture independent paths +datadir = "${prefix}/share" +sysconfdir = "${prefix}/etc" +sharedstatedir = "${prefix}/com" +localstatedir = "${prefix}/var" +infodir = "${datadir}/info" +mandir = "${datadir}/man" +docdir = "${datadir}/doc" +servicedir = "${prefix}/srv" + +# Architecture dependent paths +bindir = "${exec_prefix}/bin" +sbindir = "${exec_prefix}/bin" +libexecdir = "${exec_prefix}/libexec" +libdir = "${exec_prefix}/lib" +includedir = "${exec_prefix}/include" +oldincludedir = "${exec_prefix}/include" + +do_stage () { + oe_runmake install +} + +do_install () { + : +} diff --git a/openembedded/classes/debian.bbclass b/openembedded/classes/debian.bbclass new file mode 100644 index 0000000000..d66c1fc763 --- /dev/null +++ b/openembedded/classes/debian.bbclass @@ -0,0 +1,93 @@ +python debian_package_name_hook () { + import glob, copy, stat, errno, re + + workdir = bb.data.getVar('WORKDIR', d, 1) + packages = bb.data.getVar('PACKAGES', d, 1) + + def socrunch(s): + s = s.lower().replace('_', '-') + m = re.match("^(.*)(.)\.so\.(.*)$", s) + if m is None: + return None + if m.group(2) in '0123456789': + bin = '%s%s-%s' % (m.group(1), m.group(2), m.group(3)) + else: + bin = m.group(1) + m.group(2) + m.group(3) + dev = m.group(1) + m.group(2) + return (bin, dev) + + def isexec(path): + try: + s = os.stat(path) + except (os.error, AttributeError): + return 0 + return (s[stat.ST_MODE] & stat.S_IEXEC) + + def auto_libname(packages, orig_pkg): + bin_re = re.compile(".*/s?bin$") + lib_re = re.compile(".*/lib$") + so_re = re.compile("lib.*\.so") + sonames = [] + has_bins = 0 + has_libs = 0 + pkg_dir = os.path.join(workdir, "install", orig_pkg) + for root, dirs, files in os.walk(pkg_dir): + if bin_re.match(root) and files: + has_bins = 1 + if lib_re.match(root) and files: + has_libs = 1 + for f in files: + if so_re.match(f): + fp = os.path.join(root, f) + cmd = (bb.data.getVar('BUILD_PREFIX', d, 1) or "") + "objdump -p " + fp + " 2>/dev/null" + fd = os.popen(cmd) + lines = fd.readlines() + fd.close() + for l in lines: + m = re.match("\s+SONAME\s+([^\s]*)", l) + if m and not m.group(1) in sonames: + sonames.append(m.group(1)) + + bb.debug(1, 'LIBNAMES: pkg %s libs %d bins %d sonames %s' % (orig_pkg, has_libs, has_bins, sonames)) + soname = None + if len(sonames) == 1: + soname = sonames[0] + elif len(sonames) > 1: + lead = bb.data.getVar('LEAD_SONAME', d, 1) + if lead: + r = re.compile(lead) + filtered = [] + for s in sonames: + if r.match(s): + filtered.append(s) + if len(filtered) == 1: + soname = filtered[0] + elif len(filtered) > 1: + bb.note("Multiple matches (%s) for LEAD_SONAME '%s'" % (", ".join(filtered), lead)) + else: + bb.note("Multiple libraries (%s) found, but LEAD_SONAME '%s' doesn't match any of them" % (", ".join(sonames), lead)) + else: + bb.note("Multiple libraries (%s) found and LEAD_SONAME not defined" % ", ".join(sonames)) + + if has_libs and not has_bins and soname: + soname_result = socrunch(soname) + if soname_result: + (pkgname, devname) = soname_result + for pkg in packages.split(): + if (bb.data.getVar('PKG_' + pkg, d)): + continue + if pkg == orig_pkg: + newpkg = pkgname + else: + newpkg = pkg.replace(orig_pkg, devname, 1) + if newpkg != pkg: + bb.data.setVar('PKG_' + pkg, newpkg, d) + + for pkg in (bb.data.getVar('AUTO_LIBNAME_PKGS', d, 1) or "").split(): + auto_libname(packages, pkg) +} + +EXPORT_FUNCTIONS package_name_hook + +DEBIAN_NAMES = 1 + diff --git a/openembedded/classes/distutils-base.bbclass b/openembedded/classes/distutils-base.bbclass new file mode 100644 index 0000000000..68d7112166 --- /dev/null +++ b/openembedded/classes/distutils-base.bbclass @@ -0,0 +1,14 @@ +EXTRA_OEMAKE = "" +DEPENDS += "${@["python-native python", ""][(bb.data.getVar('PACKAGES', d, 1) == '')]}" +RDEPENDS += "python-core" + +def python_dir(d): + import os, bb + staging_incdir = bb.data.getVar( "STAGING_INCDIR", d, 1 ) + if os.path.exists( "%s/python2.3" % staging_incdir ): return "python2.3" + if os.path.exists( "%s/python2.4" % staging_incdir ): return "python2.4" + raise "No Python in STAGING_INCDIR. Forgot to build python-native ?" + +PYTHON_DIR = "${@python_dir(d)}" +FILES_${PN} = "${bindir} ${libdir} ${libdir}/${PYTHON_DIR}" + diff --git a/openembedded/classes/distutils.bbclass b/openembedded/classes/distutils.bbclass new file mode 100644 index 0000000000..a2b0e2b770 --- /dev/null +++ b/openembedded/classes/distutils.bbclass @@ -0,0 +1,15 @@ +inherit distutils-base + +distutils_do_compile() { + BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ + ${STAGING_BINDIR}/python setup.py build || \ + oefatal "python setup.py build execution failed." +} + +distutils_do_install() { + BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ + ${STAGING_BINDIR}/python setup.py install --prefix=${D}/${prefix} --install-data=${D}/${datadir} || \ + oefatal "python setup.py install execution failed." +} + +EXPORT_FUNCTIONS do_compile do_install diff --git a/openembedded/classes/efl.bbclass b/openembedded/classes/efl.bbclass new file mode 100644 index 0000000000..16c2dba0b8 --- /dev/null +++ b/openembedded/classes/efl.bbclass @@ -0,0 +1,76 @@ +MAINTAINER = "Justin Patrin " +HOMEPAGE = "http://www.enlightenment.org" +SECTION = "e/libs" + +SRCNAME = "${@bb.data.getVar('PN', d, 1).replace('-native', '')}" +SRC_URI = "http://enlightenment.freedesktop.org/files/${SRCNAME}-${PV}.tar.gz" +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit autotools pkgconfig binconfig + +do_prepsources () { + make clean distclean || true +} +addtask prepsources after do_fetch before do_unpack + +INHIBIT_AUTO_STAGE_INCLUDES = "1" +INHIBIT_NATIVE_STAGE_INSTALL = "1" + +libdirectory = "src/lib" +libraries = "lib${SRCNAME}" +headers = "${@bb.data.getVar('SRCNAME',d,1).capitalize()}.h" + +def binconfig_suffix(d): + import bb + return ["","-native"][bb.data.inherits_class('native', d)] + +export CURL_CONFIG = "${STAGING_BINDIR}/curl-config${@binconfig_suffix(d)}" +export EDB_CONFIG = "${STAGING_BINDIR}/edb-config${@binconfig_suffix(d)}" +export EET_CONFIG = "${STAGING_BINDIR}/eet-config${@binconfig_suffix(d)}" +export EVAS_CONFIG = "${STAGING_BINDIR}/evas-config${@binconfig_suffix(d)}" +export ECORE_CONFIG = "${STAGING_BINDIR}/ecore-config${@binconfig_suffix(d)}" +export EMBRYO_CONFIG = "${STAGING_BINDIR}/embryo-config${@binconfig_suffix(d)}" +export ENGRAVE_CONFIG = "${STAGING_BINDIR}/engrave-config${@binconfig_suffix(d)}" +export ENLIGHTENMENT_CONFIG = "${STAGING_BINDIR}/enlightenment-config${@binconfig_suffix(d)}" +export EPSILON_CONFIG = "${STAGING_BINDIR}/epsilon-config${@binconfig_suffix(d)}" +export EPEG_CONFIG = "${STAGING_BINDIR}/epeg-config${@binconfig_suffix(d)}" +export ESMART_CONFIG = "${STAGING_BINDIR}/esmart-config${@binconfig_suffix(d)}" +export FREETYPE_CONFIG = "${STAGING_BINDIR}/freetype-config${@binconfig_suffix(d)}" +export IMLIB2_CONFIG = "${STAGING_BINDIR}/imlib2-config${@binconfig_suffix(d)}" + +do_stage_append () { + for i in ${libraries} + do + oe_libinstall -C ${libdirectory} $i ${STAGING_LIBDIR} + done + for i in ${headers} + do + install -m 0644 ${libdirectory}/$i ${STAGING_INCDIR} + done + + # Install binaries automatically for native builds + if [ "${@binconfig_suffix(d)}" = "-native" ] + then + + # Most EFL binaries start with the package name + for i in src/bin/${SRCNAME}* + do + if [ -x $i -a -f $i ] + then + + # Don't install anything with an extension (.so, etc) + if echo $i | grep -v \\. + then + ${HOST_SYS}-libtool --mode=install install -m 0755 $i ${STAGING_BINDIR} + fi + fi + done + fi +} + +PACKAGES = "${SRCNAME} ${SRCNAME}-themes ${SRCNAME}-dev ${SRCNAME}-examples" +FILES_${SRCNAME} = "${libdir}/lib*.so*" +FILES_${SRCNAME}-themes = "${datadir}/${SRCNAME}/themes ${datadir}/${SRCNAME}/data ${datadir}/${SRCNAME}/fonts ${datadir}/${SRCNAME}/pointers ${datadir}/${SRCNAME}/images ${datadir}/${SRCNAME}/users ${datadir}/${SRCNAME}/images ${datadir}/${SRCNAME}/styles" +FILES_${SRCNAME}-dev += "${bindir}/${SRCNAME}-config ${libdir}/pkgconfig ${libdir}/lib*.?a ${datadir}/${SRCNAME}/include" +FILES_${SRCNAME}-examples = "${bindir} ${datadir}" + diff --git a/openembedded/classes/flow-lossage.bbclass b/openembedded/classes/flow-lossage.bbclass new file mode 100644 index 0000000000..3e841e3cae --- /dev/null +++ b/openembedded/classes/flow-lossage.bbclass @@ -0,0 +1,5 @@ +# gcc-3.4 blows up in gtktext with -frename-registers on arm-linux +python () { + cflags = (bb.data.getVar('CFLAGS', d, 1) or '').replace('-frename-registers', '') + bb.data.setVar('CFLAGS', cflags, d) +} diff --git a/openembedded/classes/gconf.bbclass b/openembedded/classes/gconf.bbclass new file mode 100644 index 0000000000..b0c5723873 --- /dev/null +++ b/openembedded/classes/gconf.bbclass @@ -0,0 +1,57 @@ +gconf_postinst() { +if [ "$1" = configure ]; then + if [ "x$D" != "x" ]; then + exit 1 + fi + SCHEMA_LOCATION=/etc/gconf/schemas + for SCHEMA in ${SCHEMA_FILES}; do + if [ -e $SCHEMA_LOCATION/$SCHEMA ]; then + HOME=/root GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \ + gconftool-2 \ + --makefile-install-rule $SCHEMA_LOCATION/$SCHEMA > /dev/null + fi + done +fi +} + +gconf_prerm() { +if [ "$1" = remove ] || [ "$1" = upgrade ]; then + SCHEMA_LOCATION=/etc/gconf/schemas + for SCHEMA in ${SCHEMA_FILES}; do + if [ -e $SCHEMA_LOCATION/$SCHEMA ]; then + HOME=/root GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \ + gconftool-2 \ + --makefile-uninstall-rule $SCHEMA_LOCATION/$SCHEMA > /dev/null + fi + done +fi +} + +python populate_packages_append () { + import os.path, re + packages = bb.data.getVar('PACKAGES', d, 1).split() + workdir = bb.data.getVar('WORKDIR', d, 1) + + for pkg in packages: + schema_dir = '%s/install/%s/etc/gconf/schemas' % (workdir, pkg) + schemas = [] + schema_re = re.compile(".*\.schemas$") + if os.path.exists(schema_dir): + for f in os.listdir(schema_dir): + if schema_re.match(f): + schemas.append(f) + if schemas != []: + bb.note("adding gconf postinst and prerm scripts to %s" % pkg) + bb.data.setVar('SCHEMA_FILES', " ".join(schemas), d) + postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1) or bb.data.getVar('pkg_postinst', d, 1) + if not postinst: + postinst = '#!/bin/sh\n' + postinst += bb.data.getVar('gconf_postinst', d, 1) + bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d) + prerm = bb.data.getVar('pkg_prerm_%s' % pkg, d, 1) or bb.data.getVar('pkg_prerm', d, 1) + if not prerm: + prerm = '#!/bin/sh\n' + prerm += bb.data.getVar('gconf_prerm', d, 1) + bb.data.setVar('pkg_prerm_%s' % pkg, prerm, d) + +} diff --git a/openembedded/classes/gettext.bbclass b/openembedded/classes/gettext.bbclass new file mode 100644 index 0000000000..3785f5acd3 --- /dev/null +++ b/openembedded/classes/gettext.bbclass @@ -0,0 +1,12 @@ +python () { + # Remove the NLS bits if USE_NLS is no. + if bb.data.getVar('USE_NLS', d, 1) == 'no': + cfg = oe_filter_out('^--(dis|en)able-nls$', bb.data.getVar('EXTRA_OECONF', d, 1) or "", d) + cfg += " --disable-nls" + depends = bb.data.getVar('DEPENDS', d, 1) or "" + bb.data.setVar('DEPENDS', oe_filter_out('^(virtual/libiconv|virtual/libintl)$', depends, d), d) + bb.data.setVar('EXTRA_OECONF', cfg, d) +} + +DEPENDS =+ "gettext-native" +EXTRA_OECONF += "--enable-nls" diff --git a/openembedded/classes/gnome.bbclass b/openembedded/classes/gnome.bbclass new file mode 100644 index 0000000000..8643989b73 --- /dev/null +++ b/openembedded/classes/gnome.bbclass @@ -0,0 +1,20 @@ +def gnome_verdir(v): + import re + m = re.match("([0-9]+)\.([0-9]+)\..*", v) + return "%s.%s" % (m.group(1), m.group(2)) + +SECTION ?= "x11/gnome" +SRC_URI = "${GNOME_MIRROR}/${PN}/${@gnome_verdir("${PV}")}/${PN}-${PV}.tar.bz2" + +DEPENDS += "gnome-common" + +FILES_${PN} += "${datadir}/application-registry ${datadir}/mime-info \ + ${datadir}/gnome-2.0" + +inherit autotools pkgconfig gconf + +EXTRA_AUTORECONF += "-I ${STAGING_DIR}/${HOST_SYS}/share/aclocal/gnome2-macros" + +gnome_stage_includes() { + autotools_stage_includes +} diff --git a/openembedded/classes/gpe.bbclass b/openembedded/classes/gpe.bbclass new file mode 100644 index 0000000000..8cd9e4fc5d --- /dev/null +++ b/openembedded/classes/gpe.bbclass @@ -0,0 +1,16 @@ +DEPENDS_prepend = "coreutils-native virtual/libintl intltool-native " +GPE_TARBALL_SUFFIX ?= "gz" +SRC_URI = "${GPE_MIRROR}/${PN}-${PV}.tar.${GPE_TARBALL_SUFFIX}" +FILES_${PN} += "${datadir}/gpe ${datadir}/application-registry" + +inherit gettext + +gpe_do_compile() { + oe_runmake PREFIX=${prefix} +} + +gpe_do_install() { + oe_runmake PREFIX=${prefix} DESTDIR=${D} install +} + +EXPORT_FUNCTIONS do_compile do_install diff --git a/openembedded/classes/icecc.bbclass b/openembedded/classes/icecc.bbclass new file mode 100644 index 0000000000..7dfcfc29a4 --- /dev/null +++ b/openembedded/classes/icecc.bbclass @@ -0,0 +1,156 @@ +# IceCream distributed compiling support +# +# We need to create a tar.bz2 of our toolchain and set +# ICECC_VERSION, ICECC_CXX and ICEC_CC +# + +def create_env(bb,d): + """ + Create a tar.bz of the current toolchain + """ + + # Constin native-native compilation no environment needed if + # host prefix is empty (let us duplicate the query for ease) + prefix = bb.data.expand('${HOST_PREFIX}', d) + if len(prefix) == 0: + return "" + + import tarfile + import socket + import time + import os + ice_dir = bb.data.expand('${CROSS_DIR}', d) + prefix = bb.data.expand('${HOST_PREFIX}' , d) + distro = bb.data.expand('${DISTRO}', d) + target_sys = bb.data.expand('${TARGET_SYS}', d) + #float = bb.data.getVar('${TARGET_FPU}', d) + float = "anyfloat" + name = socket.gethostname() + + try: + os.stat(ice_dir + '/' + target_sys + '/lib/ld-linux.so.2') + os.stat(ice_dir + '/' + target_sys + '/bin/g++') + except: + return "" + + VERSION = '3.4.3' + cross_name = prefix + distro + target_sys + float +VERSION+ name + tar_file = ice_dir + '/ice/' + cross_name + '.tar.bz2' + + try: + os.stat(tar_file) + return tar_file + except: + try: + os.makedirs(ice_dir+'/ice') + except: + pass + + # FIXME find out the version of the compiler + tar = tarfile.open(tar_file, 'w:bz2') + tar.add(ice_dir + '/' + target_sys + '/lib/ld-linux.so.2', + target_sys + 'cross/lib/ld-linux.so.2') + tar.add(ice_dir + '/' + target_sys + '/lib/ld-linux.so.2', + target_sys + 'cross/lib/ld-2.3.3.so') + tar.add(ice_dir + '/' + target_sys + '/lib/libc-2.3.3.so', + target_sys + 'cross/lib/libc-2.3.3.so') + tar.add(ice_dir + '/' + target_sys + '/lib/libc.so.6', + target_sys + 'cross/lib/libc.so.6') + tar.add(ice_dir + '/' + target_sys + '/bin/gcc', + target_sys + 'cross/usr/bin/gcc') + tar.add(ice_dir + '/' + target_sys + '/bin/g++', + target_sys + 'cross/usr/bin/g++') + tar.add(ice_dir + '/' + target_sys + '/bin/as', + target_sys + 'cross/usr/bin/as') + tar.add(ice_dir + '/lib/gcc/' + target_sys +'/'+ VERSION + '/specs', + target_sys+'cross/usr/lib/gcc/'+target_sys+'/'+VERSION+'/lib/specs') + tar.add(ice_dir + '/libexec/gcc/'+target_sys+'/' + VERSION + '/cc1', + target_sys + 'cross/usr/lib/gcc/'+target_sys+'/'+VERSION+'/lib/cc1') + tar.add(ice_dir + '/libexec/gcc/arm-linux/' + VERSION + '/cc1plus', + target_sys+'cross/usr/lib/gcc/'+target_sys+'/'+VERSION+'/lib/cc1plus') + tar.close() + return tar_file + + +def create_path(compilers, type, bb, d): + """ + Create Symlinks for the icecc in the staging directory + """ + import os + + staging = bb.data.expand('${STAGING_DIR}', d) + "/ice/" + type + icecc = bb.data.getVar('ICECC_PATH', d) + + # Create the dir if necessary + try: + os.stat(staging) + except: + os.makedirs(staging) + + + for compiler in compilers: + gcc_path = staging + "/" + compiler + try: + os.stat(gcc_path) + except: + os.symlink(icecc, gcc_path) + + return staging + ":" + + +def use_icc_version(bb,d): + # Constin native native + prefix = bb.data.expand('${HOST_PREFIX}', d) + if len(prefix) == 0: + return "no" + + + native = bb.data.expand('${PN}', d) + blacklist = [ "-cross", "-native" ] + + for black in blacklist: + if black in native: + return "no" + + return "yes" + +def icc_path(bb,d,compile): + native = bb.data.expand('${PN}', d) + blacklist = [ "ulibc", "glibc", "ncurses" ] + for black in blacklist: + if black in native: + return "" + + if "-native" in native: + compile = False + if "-cross" in native: + compile = False + + prefix = bb.data.expand('${HOST_PREFIX}', d) + if compile and len(prefix) != 0: + return create_path( [prefix+"gcc", prefix+"g++"], "cross", bb, d ) + elif not compile or len(prefix) == 0: + return create_path( ["gcc", "g++"], "native", bb, d) + + +def icc_version(bb,d): + return create_env(bb,d) + + +# +# set the IceCream environment variables +do_configure_prepend() { + export PATH=${@icc_path(bb,d,False)}$PATH + export ICECC_CC="gcc" + export ICECC_CXX="g++" +} + +do_compile_prepend() { + export PATH=${@icc_path(bb,d,True)}$PATH + export ICECC_CC="${HOST_PREFIX}gcc" + export ICECC_CXX="${HOST_PREFIX}g++" + + if [ "${@use_icc_version(bb,d)}" = "yes" ]; then + export ICECC_VERSION="${@icc_version(bb,d)}" + fi +} diff --git a/openembedded/classes/image_ipk.bbclass b/openembedded/classes/image_ipk.bbclass new file mode 100644 index 0000000000..5fdd340673 --- /dev/null +++ b/openembedded/classes/image_ipk.bbclass @@ -0,0 +1,72 @@ +inherit rootfs_ipk + +# Images are generally built explicitly, do not need to be part of world. +EXCLUDE_FROM_WORLD = "1" + +USE_DEVFS ?= "0" + +DEPENDS += "makedevs-native" + +def get_image_deps(d): + import bb + str = "" + for type in (bb.data.getVar('IMAGE_FSTYPES', d, 1) or "").split(): + deps = bb.data.getVar('IMAGE_DEPENDS_%s' % type, d) or "" + if deps: + str += " %s" % deps + return str + +DEPENDS += "${@get_image_deps(d)}" + +IMAGE_DEVICE_TABLE ?= "${@bb.which(bb.data.getVar('BBPATH', d, 1), 'files/device_table-minimal.txt')}" +IMAGE_POSTPROCESS_COMMAND ?= "" + +# Must call real_do_rootfs() from inside here, rather than as a separate +# task, so that we have a single fakeroot context for the whole process. +fakeroot do_rootfs () { + set -x + rm -rf ${IMAGE_ROOTFS} + + if [ "${USE_DEVFS}" != "1" ]; then + mkdir -p ${IMAGE_ROOTFS}/dev + makedevs -r ${IMAGE_ROOTFS} -D ${IMAGE_DEVICE_TABLE} + fi + + real_do_rootfs + + insert_feed_uris + + rm -f ${IMAGE_ROOTFS}${libdir}/ipkg/lists/oe + + ${IMAGE_PREPROCESS_COMMAND} + + export TOPDIR=${TOPDIR} + + for type in ${IMAGE_FSTYPES}; do + if test -z "$FAKEROOTKEY"; then + fakeroot -i ${TMPDIR}/fakedb.image bbimage -t $type -e ${FILE} + else + bbimage -n "${IMAGE_NAME}" -t "$type" -e "${FILE}" + fi + done + + ${IMAGE_POSTPROCESS_COMMAND} +} + +insert_feed_uris () { + + echo "Building feeds for [${DISTRO}].." + + for line in ${FEED_URIS} + do + # strip leading and trailing spaces/tabs, then split into name and uri + line_clean="`echo "$line"|sed 's/^[ \t]*//;s/[ \t]*$//'`" + feed_name="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\1/p'`" + feed_uri="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\2/p'`" + + echo "Added $feed_name feed with URL $feed_uri" + + # insert new feed-sources + echo "src/gz $feed_name $feed_uri" >> ${IMAGE_ROOTFS}/etc/ipkg/${feed_name}-feed.conf + done +} diff --git a/openembedded/classes/kernel-arch.bbclass b/openembedded/classes/kernel-arch.bbclass new file mode 100644 index 0000000000..92a6c982fb --- /dev/null +++ b/openembedded/classes/kernel-arch.bbclass @@ -0,0 +1,26 @@ +# +# set the ARCH environment variable for kernel compilation (including +# modules). return value must match one of the architecture directories +# in the kernel source "arch" directory +# + +valid_archs = "alpha cris ia64 m68knommu ppc sh \ + sparc64 x86_64 arm h8300 m32r mips \ + ppc64 sh64 um arm26 i386 m68k \ + parisc s390 sparc v850" + +def map_kernel_arch(a, d): + import bb, re + + valid_archs = bb.data.getVar('valid_archs', d, 1).split() + + if re.match('(i.86|athlon)$', a): return 'i386' + elif re.match('arm26$', a): return 'arm26' + elif re.match('armeb$', a): return 'arm' + elif re.match('powerpc$', a): return 'ppc' + elif re.match('mipsel$', a): return 'mips' + elif a in valid_archs: return a + else: + bb.error("cannot map '%s' to a linux kernel architecture" % a) + +export ARCH = "${@map_kernel_arch(bb.data.getVar('TARGET_ARCH', d, 1), d)}" diff --git a/openembedded/classes/kernel.bbclass b/openembedded/classes/kernel.bbclass new file mode 100644 index 0000000000..ff9aeeab78 --- /dev/null +++ b/openembedded/classes/kernel.bbclass @@ -0,0 +1,382 @@ +inherit module_strip + +PROVIDES += "virtual/kernel" +DEPENDS += "virtual/${TARGET_PREFIX}depmod-${@get_kernelmajorversion('${PV}')} virtual/${TARGET_PREFIX}gcc${KERNEL_CCSUFFIX} update-modules" + +inherit kernel-arch + +export OS = "${TARGET_OS}" +export CROSS_COMPILE = "${TARGET_PREFIX}" +KERNEL_IMAGETYPE = "zImage" + +KERNEL_PRIORITY = "${@bb.data.getVar('PV',d,1).split('-')[0].split('.')[-1]}" + +KERNEL_CCSUFFIX ?= "" +KERNEL_LDSUFFIX ?= "" + +KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX}" +KERNEL_LD = "${LD}${KERNEL_LDSUFFIX}" + +KERNEL_OUTPUT = "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}" +KERNEL_IMAGEDEST = "boot" + +# +# configuration +# +export CMDLINE_CONSOLE = "console=${@bb.data.getVar("KERNEL_CONSOLE",d,1) or "ttyS0"}" + +# parse kernel ABI version out of +def get_kernelversion(p): + import re + try: + f = open(p, 'r') + except IOError: + return None + l = f.readlines() + f.close() + r = re.compile("#define UTS_RELEASE \"(.*)\"") + for s in l: + m = r.match(s) + if m: + return m.group(1) + return None + +def get_kernelmajorversion(p): + import re + r = re.compile("([0-9]+\.[0-9]+).*") + m = r.match(p); + if m: + return m.group(1) + return None + +KERNEL_VERSION = "${@get_kernelversion('${S}/include/linux/version.h')}" +KERNEL_MAJOR_VERSION = "${@get_kernelmajorversion('${KERNEL_VERSION}')}" + +KERNEL_LOCALVERSION ?= "" + +# kernels are generally machine specific +PACKAGE_ARCH = "${MACHINE_ARCH}" + +kernel_do_compile() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + oe_runmake include/linux/version.h CC="${KERNEL_CC}" LD="${KERNEL_LD}" + oe_runmake dep CC="${KERNEL_CC}" LD="${KERNEL_LD}" + oe_runmake ${KERNEL_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}" + if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then + oe_runmake modules CC="${KERNEL_CC}" LD="${KERNEL_LD}" + else + oenote "no modules to compile" + fi +} + +kernel_do_stage() { + ASMDIR=`readlink include/asm` + + mkdir -p ${STAGING_KERNEL_DIR}/include/$ASMDIR + cp -fR include/$ASMDIR/* ${STAGING_KERNEL_DIR}/include/$ASMDIR/ + ln -sf $ASMDIR ${STAGING_KERNEL_DIR}/include/asm + + mkdir -p ${STAGING_KERNEL_DIR}/include/asm-generic + cp -fR include/asm-generic/* ${STAGING_KERNEL_DIR}/include/asm-generic/ + + mkdir -p ${STAGING_KERNEL_DIR}/include/linux + cp -fR include/linux/* ${STAGING_KERNEL_DIR}/include/linux/ + + mkdir -p ${STAGING_KERNEL_DIR}/include/net + cp -fR include/net/* ${STAGING_KERNEL_DIR}/include/net/ + + mkdir -p ${STAGING_KERNEL_DIR}/include/pcmcia + cp -fR include/pcmcia/* ${STAGING_KERNEL_DIR}/include/pcmcia/ + + if [ -d drivers/sound ]; then + # 2.4 alsa needs some headers from this directory + mkdir -p ${STAGING_KERNEL_DIR}/include/drivers/sound + cp -fR drivers/sound/*.h ${STAGING_KERNEL_DIR}/include/drivers/sound/ + fi + + install -m 0644 .config ${STAGING_KERNEL_DIR}/config-${PV}${KERNEL_LOCALVERSION} + ln -sf config-${PV}${KERNEL_LOCALVERSION} ${STAGING_KERNEL_DIR}/.config + ln -sf config-${PV}${KERNEL_LOCALVERSION} ${STAGING_KERNEL_DIR}/kernel-config + echo "${KERNEL_VERSION}" >${STAGING_KERNEL_DIR}/kernel-abiversion + echo "${S}" >${STAGING_KERNEL_DIR}/kernel-source + echo "${KERNEL_CCSUFFIX}" >${STAGING_KERNEL_DIR}/kernel-ccsuffix + echo "${KERNEL_LDSUFFIX}" >${STAGING_KERNEL_DIR}/kernel-ldsuffix + [ -e Rules.make ] && install -m 0644 Rules.make ${STAGING_KERNEL_DIR}/ + [ -e Makefile ] && install -m 0644 Makefile ${STAGING_KERNEL_DIR}/ + + # Check if arch/${ARCH}/Makefile exists and install it + if [ -e arch/${ARCH}/Makefile ]; then + install -d ${STAGING_KERNEL_DIR}/arch/${ARCH} + install -m 0644 arch/${ARCH}/Makefile ${STAGING_KERNEL_DIR}/arch/${ARCH} + fi + cp -fR include/config* ${STAGING_KERNEL_DIR}/include/ + install -m 0644 ${KERNEL_OUTPUT} ${STAGING_KERNEL_DIR}/${KERNEL_IMAGETYPE} + install -m 0644 System.map ${STAGING_KERNEL_DIR}/System.map-${PV}${KERNEL_LOCALVERSION} + [ -e Module.symvers ] && install -m 0644 Module.symvers ${STAGING_KERNEL_DIR}/ + + cp -fR scripts ${STAGING_KERNEL_DIR}/ +} + +kernel_do_install() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then + oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install + else + oenote "no modules to install" + fi + + install -d ${D}/${KERNEL_IMAGEDEST} + install -d ${D}/boot + install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${PV}${KERNEL_LOCALVERSION} + install -m 0644 System.map ${D}/boot/System.map-${PV}${KERNEL_LOCALVERSION} + install -m 0644 .config ${D}/boot/config-${PV}${KERNEL_LOCALVERSION} + install -d ${D}/etc/modutils + + # Check if scripts/genksyms exists and if so, build it + if [ -e scripts/genksyms/ ]; then + oe_runmake SUBDIRS="scripts/genksyms" + fi + + cp -fR scripts ${STAGING_KERNEL_DIR}/ +} + +kernel_do_configure() { + yes '' | oe_runmake oldconfig +} + +pkg_postinst_kernel () { + update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${PV}${KERNEL_LOCALVERSION} ${KERNEL_PRIORITY} || true +} + +pkg_postrm_kernel () { + update-alternatives --remove ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${PV}${KERNEL_LOCALVERSION} || true +} + +inherit cml1 + +EXPORT_FUNCTIONS do_compile do_install do_stage do_configure + +PACKAGES = "kernel kernel-image kernel-dev" +FILES = "" +FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*" +FILES_kernel-dev = "/boot/System.map* /boot/config*" +RDEPENDS_kernel = "kernel-image-${KERNEL_VERSION}" +PKG_kernel-image = "kernel-image-${KERNEL_VERSION}" +ALLOW_EMPTY_kernel = "1" +ALLOW_EMPTY_kernel-image = "1" + +pkg_postinst_modules () { +if [ -n "$D" ]; then + ${HOST_PREFIX}depmod -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${PV}${KERNEL_LOCALVERSION} ${KERNEL_VERSION} +else + depmod -A + update-modules || true +fi +} + +pkg_postrm_modules () { +update-modules || true +} + +autoload_postinst_fragment() { +if [ x"$D" = "x" ]; then + modprobe %s || true +fi +} + +# autoload defaults (alphabetically sorted) +module_autoload_hidp = "hidp" +module_autoload_ipv6 = "ipv6" +module_autoload_ipsec = "ipsec" +module_autoload_ircomm-tty = "ircomm-tty" +module_autoload_rfcomm = "rfcomm" +module_autoload_sa1100-rtc = "sa1100-rtc" + +# alias defaults (alphabetically sorted) +module_conf_af_packet = "alias net-pf-17 af_packet" +module_conf_bluez = "alias net-pf-31 bluez" +module_conf_bnep = "alias bt-proto-4 bnep" +module_conf_hci_uart = "alias tty-ldisc-15 hci_uart" +module_conf_l2cap = "alias bt-proto-0 l2cap" +module_conf_sco = "alias bt-proto-2 sco" +module_conf_rfcomm = "alias bt-proto-3 rfcomm" + +python populate_packages_prepend () { + def extract_modinfo(file): + import os, re + tmpfile = os.tmpnam() + cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % (bb.data.getVar("PATH", d, 1), bb.data.getVar("HOST_PREFIX", d, 1) or "", file, tmpfile) + os.system(cmd) + f = open(tmpfile) + l = f.read().split("\000") + f.close() + os.unlink(tmpfile) + exp = re.compile("([^=]+)=(.*)") + vals = {} + for i in l: + m = exp.match(i) + if not m: + continue + vals[m.group(1)] = m.group(2) + return vals + + def parse_depmod(): + import os, re + + dvar = bb.data.getVar('D', d, 1) + if not dvar: + bb.error("D not defined") + return + + kernelver = bb.data.getVar('PV', d, 1) + bb.data.getVar('KERNEL_LOCALVERSION', d, 1) + kernelver_stripped = kernelver + m = re.match('^(.*-hh.*)[\.\+].*$', kernelver) + if m: + kernelver_stripped = m.group(1) + path = bb.data.getVar("PATH", d, 1) + host_prefix = bb.data.getVar("HOST_PREFIX", d, 1) or "" + + cmd = "PATH=\"%s\" %sdepmod -n -a -r -b %s -F %s/boot/System.map-%s %s" % (path, host_prefix, dvar, dvar, kernelver, kernelver_stripped) + f = os.popen(cmd, 'r') + + deps = {} + pattern0 = "^(.*\.k?o):..*$" + pattern1 = "^(.*\.k?o):\s*(.*\.k?o)\s*$" + pattern2 = "^(.*\.k?o):\s*(.*\.k?o)\s*\\\$" + pattern3 = "^\t(.*\.k?o)\s*\\\$" + pattern4 = "^\t(.*\.k?o)\s*$" + + line = f.readline() + while line: + if not re.match(pattern0, line): + line = f.readline() + continue + m1 = re.match(pattern1, line) + if m1: + deps[m1.group(1)] = m1.group(2).split() + else: + m2 = re.match(pattern2, line) + if m2: + deps[m2.group(1)] = m2.group(2).split() + line = f.readline() + m3 = re.match(pattern3, line) + while m3: + deps[m2.group(1)].extend(m3.group(1).split()) + line = f.readline() + m3 = re.match(pattern3, line) + m4 = re.match(pattern4, line) + deps[m2.group(1)].extend(m4.group(1).split()) + line = f.readline() + f.close() + return deps + + def get_dependencies(file, pattern, format): + file = file.replace(bb.data.getVar('D', d, 1) or '', '', 1) + + if module_deps.has_key(file): + import os.path, re + dependencies = [] + for i in module_deps[file]: + m = re.match(pattern, os.path.basename(i)) + if not m: + continue + on = legitimize_package_name(m.group(1)) + dependency_pkg = format % on + v = bb.data.getVar("PARALLEL_INSTALL_MODULES", d, 1) or "0" + if v == "1": + kv = bb.data.getVar("KERNEL_MAJOR_VERSION", d, 1) + dependency_pkg = "%s-%s" % (dependency_pkg, kv) + dependencies.append(dependency_pkg) + return dependencies + return [] + + def frob_metadata(file, pkg, pattern, format, basename): + import re + vals = extract_modinfo(file) + + dvar = bb.data.getVar('D', d, 1) + + # If autoloading is requested, output /etc/modutils/ and append + # appropriate modprobe commands to the postinst + autoload = bb.data.getVar('module_autoload_%s' % basename, d, 1) + if autoload: + name = '%s/etc/modutils/%s' % (dvar, basename) + f = open(name, 'w') + for m in autoload.split(): + f.write('%s\n' % m) + f.close() + postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1) + if not postinst: + bb.fatal("pkg_postinst_%s not defined" % pkg) + postinst += bb.data.getVar('autoload_postinst_fragment', d, 1) % autoload + bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d) + + # Write out any modconf fragment + modconf = bb.data.getVar('module_conf_%s' % basename, d, 1) + if modconf: + name = '%s/etc/modutils/%s.conf' % (dvar, basename) + f = open(name, 'w') + f.write("%s\n" % modconf) + f.close() + + files = bb.data.getVar('FILES_%s' % pkg, d, 1) + files = "%s /etc/modutils/%s /etc/modutils/%s.conf" % (files, basename, basename) + bb.data.setVar('FILES_%s' % pkg, files, d) + + if vals.has_key("description"): + old_desc = bb.data.getVar('DESCRIPTION_' + pkg, d, 1) or "" + bb.data.setVar('DESCRIPTION_' + pkg, old_desc + "; " + vals["description"], d) + + rdepends_str = bb.data.getVar('RDEPENDS_' + pkg, d, 1) + if rdepends_str: + rdepends = rdepends_str.split() + else: + rdepends = [] + rdepends.extend(get_dependencies(file, pattern, format)) + bb.data.setVar('RDEPENDS_' + pkg, ' '.join(rdepends), d) + + module_deps = parse_depmod() + module_regex = '^(.*)\.k?o$' + module_pattern = 'kernel-module-%s' + + postinst = bb.data.getVar('pkg_postinst_modules', d, 1) + postrm = bb.data.getVar('pkg_postrm_modules', d, 1) + do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='update-modules kernel-image-%s' % bb.data.getVar("KERNEL_VERSION", d, 1)) + + import re, os + metapkg = "kernel-modules" + bb.data.setVar('ALLOW_EMPTY_' + metapkg, "1", d) + bb.data.setVar('FILES_' + metapkg, "", d) + blacklist = [ 'kernel-dev', 'kernel-image' ] + for l in module_deps.values(): + for i in l: + pkg = module_pattern % legitimize_package_name(re.match(module_regex, os.path.basename(i)).group(1)) + blacklist.append(pkg) + metapkg_rdepends = [] + packages = bb.data.getVar('PACKAGES', d, 1).split() + for pkg in packages[1:]: + if not pkg in blacklist and not pkg in metapkg_rdepends: + metapkg_rdepends.append(pkg) + bb.data.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends), d) + bb.data.setVar('DESCRIPTION_' + metapkg, 'Kernel modules meta package', d) + packages.append(metapkg) + bb.data.setVar('PACKAGES', ' '.join(packages), d) + + v = bb.data.getVar("PARALLEL_INSTALL_MODULES", d, 1) or "0" + if v == "1": + kv = bb.data.getVar("KERNEL_MAJOR_VERSION", d, 1) + packages = bb.data.getVar("PACKAGES", d, 1) + module_re = re.compile("^kernel-module-") + for p in packages.split(): + if not module_re.match(p): + continue + pkg = bb.data.getVar("PKG_%s" % p, d, 1) or p + newpkg = "%s-%s" % (pkg, kv) + bb.data.setVar("PKG_%s" % p, newpkg, d) + rprovides = bb.data.getVar("RPROVIDES_%s" % p, d, 1) + if rprovides: + rprovides = "%s %s" % (rprovides, pkg) + else: + rprovides = pkg + bb.data.setVar("RPROVIDES_%s" % p, rprovides, d) +} diff --git a/openembedded/classes/lib_package.bbclass b/openembedded/classes/lib_package.bbclass new file mode 100644 index 0000000000..e29d2659b0 --- /dev/null +++ b/openembedded/classes/lib_package.bbclass @@ -0,0 +1,9 @@ +PACKAGES = "${PN} ${PN}-dev ${PN}-doc ${PN}-bin" + +FILES_${PN} = "${libexecdir} ${libdir}/lib*.so.* \ + ${sysconfdir} ${sharedstatedir} ${localstatedir} \ + /lib/*.so* ${datadir}/${PN} ${libdir}/${PN}" +FILES_${PN}-dev = "${includedir} ${libdir}/lib*.so ${libdir}/*.la \ + ${libdir}/*.a ${libdir}/pkgconfig /lib/*.a /lib/*.o \ + ${datadir}/aclocal ${bindir}/*-config" +FILES_${PN}-bin = "${bindir} ${sbindir} /bin /sbin" diff --git a/openembedded/classes/linux_modules.bbclass b/openembedded/classes/linux_modules.bbclass new file mode 100644 index 0000000000..d5c4e74ca1 --- /dev/null +++ b/openembedded/classes/linux_modules.bbclass @@ -0,0 +1,19 @@ +def get_kernelmajorversion(p): + import re + r = re.compile("([0-9]+\.[0-9]+).*") + m = r.match(p); + if m: + return m.group(1) + return None + +def linux_module_packages(s, d): + import bb, os.path + suffix = "" + if (bb.data.getVar("PARALLEL_INSTALL_MODULES", d, 1) == "1"): + file = bb.data.expand('${STAGING_KERNEL_DIR}/kernel-abiversion', d) + if (os.path.exists(file)): + suffix = "-%s" % (get_kernelmajorversion(base_read_file(file))) + return " ".join(map(lambda s: "kernel-module-%s%s" % (s.lower().replace('_', '-').replace('@', '+'), suffix), s.split())) + +# that's all + diff --git a/openembedded/classes/module-base.bbclass b/openembedded/classes/module-base.bbclass new file mode 100644 index 0000000000..df0941d561 --- /dev/null +++ b/openembedded/classes/module-base.bbclass @@ -0,0 +1,17 @@ +inherit module_strip + +inherit kernel-arch + +export OS = "${TARGET_OS}" +export CROSS_COMPILE = "${TARGET_PREFIX}" + +export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}" +export KERNEL_SOURCE = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-source')}" +KERNEL_OBJECT_SUFFIX = "${@[".o", ".ko"][base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion') > "2.6.0"]}" +KERNEL_CCSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-ccsuffix')}" +KERNEL_LDSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-ldsuffix')}" +KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX}" +KERNEL_LD = "${LD}${KERNEL_LDSUFFIX}" + +# kernel modules are generally machine specific +PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/openembedded/classes/module.bbclass b/openembedded/classes/module.bbclass new file mode 100644 index 0000000000..8a13f1f858 --- /dev/null +++ b/openembedded/classes/module.bbclass @@ -0,0 +1,51 @@ +RDEPENDS += "kernel (${KERNEL_VERSION})" +DEPENDS += "virtual/kernel" + +inherit module-base + +python populate_packages_prepend() { + v = bb.data.getVar("PARALLEL_INSTALL_MODULES", d, 1) or "0" + if v == "1": + kv = bb.data.getVar("KERNEL_VERSION", d, 1) + packages = bb.data.getVar("PACKAGES", d, 1) + for p in packages.split(): + pkg = bb.data.getVar("PKG_%s" % p, d, 1) or p + newpkg = "%s-%s" % (pkg, kv) + bb.data.setVar("PKG_%s" % p, newpkg, d) + rprovides = bb.data.getVar("RPROVIDES_%s" % p, d, 1) + if rprovides: + rprovides = "%s %s" % (rprovides, pkg) + else: + rprovides = pkg + bb.data.setVar("RPROVIDES_%s" % p, rprovides, d) +} + +module_do_compile() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \ + KERNEL_SRC=${STAGING_KERNEL_DIR} \ + KERNEL_VERSION=${KERNEL_VERSION} \ + CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ + ${MAKE_TARGETS} +} + +module_do_install() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" CC="${KERNEL_CC}" LD="${KERNEL_LD}" modules_install +} + +pkg_postinst_append () { + if [ -n "$D" ]; then + exit 1 + fi + depmod -A + update-modules || true +} + +pkg_postrm_append () { + update-modules || true +} + +EXPORT_FUNCTIONS do_compile do_install + +FILES_${PN} = "/etc /lib/modules" diff --git a/openembedded/classes/module_strip.bbclass b/openembedded/classes/module_strip.bbclass new file mode 100644 index 0000000000..116e8b902f --- /dev/null +++ b/openembedded/classes/module_strip.bbclass @@ -0,0 +1,18 @@ +#DEPENDS_append = " module-strip" + +do_strip_modules () { + for p in ${PACKAGES}; do + if test -e ${WORKDIR}/install/$p/lib/modules; then + modules="`find ${WORKDIR}/install/$p/lib/modules -name \*${KERNEL_OBJECT_SUFFIX}`" + if [ -n "$modules" ]; then + ${STRIP} -v -g $modules +# NM="${CROSS_DIR}/bin/${HOST_PREFIX}nm" OBJCOPY="${CROSS_DIR}/bin/${HOST_PREFIX}objcopy" strip_module $modules + fi + fi + done +} + +python do_package_append () { + if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, 1) != '1'): + bb.build.exec_func('do_strip_modules', d) +} diff --git a/openembedded/classes/mozilla.bbclass b/openembedded/classes/mozilla.bbclass new file mode 100644 index 0000000000..629f2531da --- /dev/null +++ b/openembedded/classes/mozilla.bbclass @@ -0,0 +1,53 @@ +SECTION = "x11/utils" +DEPENDS += "gnu-config-native virtual/libintl xt libxi \ + zip-native gtk+ orbit2 libidl-native" +LICENSE = "MPL NPL" +SRC_URI += "file://mozconfig" + +inherit gettext + +EXTRA_OECONF = "--target=${TARGET_SYS} --host=${BUILD_SYS} \ + --build=${BUILD_SYS} --prefix=${prefix}" +EXTRA_OEMAKE = "'HOST_LIBIDL_LIBS=${HOST_LIBIDL_LIBS}' \ + 'HOST_LIBIDL_CFLAGS=${HOST_LIBIDL_CFLAGS}'" +SELECTED_OPTIMIZATION = "-Os -fsigned-char -fno-strict-aliasing" + +export CROSS_COMPILE = "1" +export MOZCONFIG = "${WORKDIR}/mozconfig" +export MOZ_OBJDIR = "${S}" + +export CONFIGURE_ARGS = "${EXTRA_OECONF}" +export HOST_LIBIDL_CFLAGS = "`${HOST_LIBIDL_CONFIG} --cflags`" +export HOST_LIBIDL_LIBS = "`${HOST_LIBIDL_CONFIG} --libs`" +export HOST_LIBIDL_CONFIG = "PKG_CONFIG_PATH=${STAGING_BINDIR}/../share/pkgconfig pkg-config libIDL-2.0" +export HOST_CC = "${BUILD_CC}" +export HOST_CXX = "${BUILD_CXX}" +export HOST_CFLAGS = "${BUILD_CFLAGS}" +export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}" +export HOST_LDFLAGS = "${BUILD_LDFLAGS}" +export HOST_RANLIB = "${BUILD_RANLIB}" +export HOST_AR = "${BUILD_AR}" + +mozilla_do_configure() { + ( + set -e + for cg in `find ${S} -name config.guess`; do + install -m 0755 \ + ${STAGING_BINDIR}/../share/gnu-config/config.guess \ + ${STAGING_BINDIR}/../share/gnu-config/config.sub \ + `dirname $cg`/ + done + ) + oe_runmake -f client.mk ${MOZ_OBJDIR}/Makefile \ + ${MOZ_OBJDIR}/config.status +} + +mozilla_do_compile() { + oe_runmake -f client.mk build_all +} + +mozilla_do_install() { + oe_runmake DESTDIR="${D}" destdir="${D}" install +} + +EXPORT_FUNCTIONS do_configure do_compile do_install diff --git a/openembedded/classes/multimachine.inc b/openembedded/classes/multimachine.inc new file mode 100644 index 0000000000..1f73ffd30f --- /dev/null +++ b/openembedded/classes/multimachine.inc @@ -0,0 +1,3 @@ +STAMP = "${TMPDIR}/stamps/${PACKAGE_ARCH}-${HOST_OS}/${PF}" +WORKDIR = "${TMPDIR}/work/${PACKAGE_ARCH}-${HOST_OS}/${PF}" +STAGING_KERNEL_DIR = "${STAGING_DIR}/${PACKAGE_ARCH}-${HOST_OS}/kernel" diff --git a/openembedded/classes/native.bbclass b/openembedded/classes/native.bbclass new file mode 100644 index 0000000000..955a8ae646 --- /dev/null +++ b/openembedded/classes/native.bbclass @@ -0,0 +1,68 @@ +inherit base + +# Native packages are built indirectly via dependency, +# no need for them to be a direct target of 'world' +EXCLUDE_FROM_WORLD = "1" + +PACKAGES = "" + +TARGET_ARCH = "${BUILD_ARCH}" +TARGET_OS = "${BUILD_OS}" +TARGET_VENDOR = "${BUILD_VENDOR}" +TARGET_PREFIX = "${BUILD_PREFIX}" +TARGET_CC_ARCH = "${BUILD_CC_ARCH}" + +HOST_ARCH = "${BUILD_ARCH}" +HOST_OS = "${BUILD_OS}" +HOST_VENDOR = "${BUILD_VENDOR}" +HOST_PREFIX = "${BUILD_PREFIX}" +HOST_CC_ARCH = "${BUILD_CC_ARCH}" + +CPPFLAGS = "${BUILD_CPPFLAGS}" +CFLAGS = "${BUILD_CFLAGS}" +CXXFLAGS = "${BUILD_CFLAGS}" +LDFLAGS = "${BUILD_LDFLAGS}" + +# Path prefixes +base_prefix = "${exec_prefix}" +prefix = "${STAGING_DIR}" +exec_prefix = "${STAGING_DIR}/${BUILD_ARCH}-${BUILD_OS}" + +# Base paths +base_bindir = "${base_prefix}/bin" +base_sbindir = "${base_prefix}/bin" +base_libdir = "${base_prefix}/lib" + +# Architecture independent paths +sysconfdir = "${prefix}/etc" +sharedstatedir = "${prefix}/com" +localstatedir = "${prefix}/var" +infodir = "${datadir}/info" +mandir = "${datadir}/man" +docdir = "${datadir}/doc" +servicedir = "${prefix}/srv" + +# Architecture dependent paths +bindir = "${exec_prefix}/bin" +sbindir = "${exec_prefix}/bin" +libexecdir = "${exec_prefix}/libexec" +libdir = "${exec_prefix}/lib" +includedir = "${exec_prefix}/include" +oldincludedir = "${exec_prefix}/include" + +# Datadir is made arch dependent here, primarily +# for autoconf macros, and other things that +# may be manipulated to handle crosscompilation +# issues. +datadir = "${exec_prefix}/share" + +do_stage () { + if [ "${INHIBIT_NATIVE_STAGE_INSTALL}" != "1" ] + then + oe_runmake install + fi +} + +do_install () { + true +} diff --git a/openembedded/classes/nslu2-jffs2-image.bbclass b/openembedded/classes/nslu2-jffs2-image.bbclass new file mode 100644 index 0000000000..56ad0f0659 --- /dev/null +++ b/openembedded/classes/nslu2-jffs2-image.bbclass @@ -0,0 +1,18 @@ +NSLU2_SLUGIMAGE_ARGS ?= "" + +nslu2_pack_image () { + install -d ${DEPLOY_DIR_IMAGE}/slug + install -m 0644 ${STAGING_LIBDIR}/nslu2-binaries/RedBoot \ + ${STAGING_LIBDIR}/nslu2-binaries/Trailer \ + ${STAGING_LIBDIR}/nslu2-binaries/SysConf \ + ${DEPLOY_DIR_IMAGE}/slug/ + install -m 0644 ${DEPLOY_DIR_IMAGE}/zImage-${IMAGE_BASENAME} ${DEPLOY_DIR_IMAGE}/slug/vmlinuz + install -m 0644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${DEPLOY_DIR_IMAGE}/slug/flashdisk.jffs2 + cd ${DEPLOY_DIR_IMAGE}/slug + slugimage -p -b RedBoot -s SysConf -r Ramdisk:1,Flashdisk:flashdisk.jffs2 -t Trailer \ + -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.flashdisk.img ${NSLU2_SLUGIMAGE_ARGS} + rm -rf ${DEPLOY_DIR_IMAGE}/slug +} + +EXTRA_IMAGEDEPENDS += 'slugimage-native nslu2-linksys-firmware' +IMAGE_POSTPROCESS_COMMAND += "nslu2_pack_image; " diff --git a/openembedded/classes/nslu2-mirrors.bbclass b/openembedded/classes/nslu2-mirrors.bbclass new file mode 100644 index 0000000000..1181edc716 --- /dev/null +++ b/openembedded/classes/nslu2-mirrors.bbclass @@ -0,0 +1,4 @@ +MIRRORS_append () { +ftp://.*/.*/ http://sources.nslu2-linux.org/sources/ +http://.*/.*/ http://sources.nslu2-linux.org/sources/ +} diff --git a/openembedded/classes/nslu2-ramdisk-image.bbclass b/openembedded/classes/nslu2-ramdisk-image.bbclass new file mode 100644 index 0000000000..0b545854fd --- /dev/null +++ b/openembedded/classes/nslu2-ramdisk-image.bbclass @@ -0,0 +1,18 @@ +NSLU2_SLUGIMAGE_ARGS ?= "" + +nslu2_pack_image () { + install -d ${DEPLOY_DIR_IMAGE}/slug + install -m 0644 ${STAGING_LIBDIR}/nslu2-binaries/RedBoot \ + ${STAGING_LIBDIR}/nslu2-binaries/Trailer \ + ${STAGING_LIBDIR}/nslu2-binaries/SysConf \ + ${DEPLOY_DIR_IMAGE}/slug/ + install -m 0644 ${DEPLOY_DIR_IMAGE}/zImage-${IMAGE_BASENAME} ${DEPLOY_DIR_IMAGE}/slug/vmlinuz + install -m 0644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2.gz ${DEPLOY_DIR_IMAGE}/slug/ramdisk.ext2.gz + cd ${DEPLOY_DIR_IMAGE}/slug + slugimage -p -b RedBoot -s SysConf -r Ramdisk:ramdisk.ext2.gz -t Trailer \ + -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ramdisk.img ${NSLU2_SLUGIMAGE_ARGS} + rm -rf ${DEPLOY_DIR_IMAGE}/slug +} + +EXTRA_IMAGEDEPENDS += 'slugimage-native nslu2-linksys-firmware' +IMAGE_POSTPROCESS_COMMAND += "nslu2_pack_image; " diff --git a/openembedded/classes/nylon-mirrors.bbclass b/openembedded/classes/nylon-mirrors.bbclass new file mode 100644 index 0000000000..2986bd8f80 --- /dev/null +++ b/openembedded/classes/nylon-mirrors.bbclass @@ -0,0 +1,6 @@ +MIRRORS_append () { +ftp://.*/.*/ http://meshcube.org/nylon/stable/sources/ +http://.*/.*/ http://meshcube.org/nylon/stable/sources/ +ftp://.*/.*/ http://meshcube.org/nylon/unstable/sources/ +http://.*/.*/ http://meshcube.org/nylon/unstable/sources/ +} \ No newline at end of file diff --git a/openembedded/classes/oebuildstamp.bbclass b/openembedded/classes/oebuildstamp.bbclass new file mode 100644 index 0000000000..1de1b95c2e --- /dev/null +++ b/openembedded/classes/oebuildstamp.bbclass @@ -0,0 +1,16 @@ +# +# Because base.oeclasses set the variable +# +# do_fetch[nostamp] = "1" +# do_build[nostamp] = "1" +# +# for every build we're doing oemake calls all of the phases to check if +# something new is to download. This class unset's this nostamp flag. This +# makes a package "finished", once it's completely build. +# +# This means that the subsequent builds are faster, but when you change the +# behaviour of the package, e.g. by adding INHERIT="package_ipk", you won't +# get the ipk file except you delete the build stamp manually or all of them +# with oebuild clean . + +do_build[nostamp] = "" diff --git a/openembedded/classes/oelint.bbclass b/openembedded/classes/oelint.bbclass new file mode 100644 index 0000000000..baa1c630b4 --- /dev/null +++ b/openembedded/classes/oelint.bbclass @@ -0,0 +1,174 @@ +addtask lint before do_fetch +do_lint[nostamp] = 1 +python do_lint() { + def testVar(var, explain=None): + try: + s = d[var] + return s["content"] + except KeyError: + bb.error("%s is not set" % var) + if explain: bb.note(explain) + return None + + + ############################## + # Test that DESCRIPTION exists + # + testVar("DESCRIPTION") + + + ############################## + # Test that HOMEPAGE exists + # + s = testVar("HOMEPAGE") + if s=="unknown": + bb.error("HOMEPAGE is not set") + elif not s.startswith("http://"): + bb.error("HOMEPAGE doesn't start with http://") + + + + ############################## + # Test for valid LICENSE + # + valid_licenses = { + "GPL-2" : "GPLv2", + "GPL LGPL FDL" : True, + "GPL PSF" : True, + "GPL/QPL" : True, + "GPL" : True, + "GPLv2" : True, + "IBM" : True, + "LGPL GPL" : True, + "LGPL" : True, + "MIT" : True, + "OSL" : True, + "Perl" : True, + "Public Domain" : True, + "QPL" : "GPL/QPL", + } + s = testVar("LICENSE") + if s=="unknown": + bb.error("LICENSE is not set") + elif s.startswith("Vendor"): + pass + else: + try: + newlic = valid_licenses[s] + if newlic == False: + bb.note("LICENSE '%s' is not recommended" % s) + elif newlic != True: + bb.note("LICENSE '%s' is not recommended, better use '%s'" % (s, newsect)) + except: + bb.note("LICENSE '%s' is not recommended" % s) + + + ############################## + # Test for valid MAINTAINER + # + s = testVar("MAINTAINER") + if s=="OpenEmbedded Team ": + bb.error("explicit MAINTAINER is missing, using default") + elif s and s.find("@") == -1: + bb.error("You forgot to put an e-mail address into MAINTAINER") + + + ############################## + # Test for valid SECTION + # + # if Correct section: True section name is valid + # False section name is invalid, no suggestion + # string section name is invalid, better name suggested + # + valid_sections = { + # Current Section Correct section + "apps" : True, + "audio" : True, + "base" : True, + "console/games" : True, + "console/net" : "console/network", + "console/network" : True, + "console/utils" : True, + "devel" : True, + "developing" : "devel", + "devel/python" : True, + "fonts" : True, + "games" : True, + "games/libs" : True, + "gnome/base" : True, + "gnome/libs" : True, + "gpe" : True, + "gpe/libs" : True, + "gui" : False, + "libc" : "libs", + "libs" : True, + "libs/net" : True, + "multimedia" : True, + "net" : "network", + "NET" : "network", + "network" : True, + "opie/applets" : True, + "opie/applications" : True, + "opie/base" : True, + "opie/codecs" : True, + "opie/decorations" : True, + "opie/fontfactories" : True, + "opie/fonts" : True, + "opie/games" : True, + "opie/help" : True, + "opie/inputmethods" : True, + "opie/libs" : True, + "opie/multimedia" : True, + "opie/pim" : True, + "opie/setting" : "opie/settings", + "opie/settings" : True, + "opie/Shell" : False, + "opie/styles" : True, + "opie/today" : True, + "scientific" : True, + "utils" : True, + "x11" : True, + "x11/libs" : True, + "x11/wm" : True, + } + s = testVar("SECTION") + if s: + try: + newsect = valid_sections[s] + if newsect == False: + bb.note("SECTION '%s' is not recommended" % s) + elif newsect != True: + bb.note("SECTION '%s' is not recommended, better use '%s'" % (s, newsect)) + except: + bb.note("SECTION '%s' is not recommended" % s) + + if not s.islower(): + bb.error("SECTION should only use lower case") + + + + + ############################## + # Test for valid PRIORITY + # + valid_priorities = { + "standard" : True, + "required" : True, + "optional" : True, + "extra" : True, + } + s = testVar("PRIORITY") + if s: + try: + newprio = valid_priorities[s] + if newprio == False: + bb.note("PRIORITY '%s' is not recommended" % s) + elif newprio != True: + bb.note("PRIORITY '%s' is not recommended, better use '%s'" % (s, newprio)) + except: + bb.note("PRIORITY '%s' is not recommended" % s) + + if not s.islower(): + bb.error("PRIORITY should only use lower case") + +} diff --git a/openembedded/classes/opie.bbclass b/openembedded/classes/opie.bbclass new file mode 100644 index 0000000000..7326128d98 --- /dev/null +++ b/openembedded/classes/opie.bbclass @@ -0,0 +1,99 @@ +# +# This oeclass takes care about some of the itchy details of installing parts +# of Opie applications. Depending on quicklaunch or not, plugin or not, the +# TARGET is either a shared object, a shared object with a link to quicklauncher, +# or a usual binary. +# +# You have to provide two things: 1.) A proper SECTION field, and 2.) a proper APPNAME +# Then opie.oeclass will: +# * create the directory for the binary and install the binary file(s) +# * for applications: create the directory for the .desktop and install the .desktop file +# * for quicklauncher applications: create the startup symlink to the quicklauncher +# You can override the automatic detection of APPTYPE, valid values are 'quicklaunch', 'binary', 'plugin' +# You can override the default location of APPDESKTOP (/apps/
/) +# + +inherit palmtop + +DEPENDS_prepend = "${@["libopie2 ", ""][(bb.data.getVar('PN', d, 1) == 'libopie2')]}" + +# to be consistent, put all targets into workdir +EXTRA_QMAKEVARS_POST_append = " DESTDIR=${S}" + +# Opie standard TAG value +TAG = "${@'v' + bb.data.getVar('PV',d,1).replace('.', '_')}" + +# plan for later: +# add common scopes for opie applications, see qmake-native/common.pro +# qmake should care about all the details then. qmake can do that, i know it :) +# + +python opie_do_opie_install() { + import os, shutil + section = bb.data.getVar( "SECTION", d ).split( '/' )[1] or "Applications" + section = section.title() + if section in ( "Base", "Libs" ): + bb.note( "Section = Base or Libs. Target won't be installed automatically." ) + return + + # SECTION : BINDIR DESKTOPDIR + dirmap = { "Applets" : ( "/plugins/applets", None ), + "Applications" : ( "", "/apps/Applications" ), + "Multimedia" : ( "", "/apps/Applications" ), + "Games" : ( "", "/apps/Games" ), + "Settings" : ( "", "/apps/Settings" ), + "Pim" : ( "", "/apps/1Pim" ), + "Examples" : ( "", "/apps/Examples" ), + "Shell" : ( "/bin", "/apps/Opie-SH" ), + "Codecs" : ( "/plugins/codecs", None ), + "Decorations" : ( "/plugins/decorations", None ), + "Inputmethods" : ( "/plugins/inputmethods", None ), + "Fontfactories" : ( "/plugins/fontfactories", None ), + "Security" : ( "/plugins/security", None ), + "Styles" : ( "/plugins/styles", None ), + "Today" : ( "/plugins/today", None ), + "Datebook" : ( "/plugins/holidays", None ), + "Networksettings" : ( "/plugins/networksettings", None ) } + + if section not in dirmap: + raise ValueError, "Unknown section '%s'. Valid sections are: %s" % ( section, dirmap.keys() ) + + bindir, desktopdir = dirmap[section] + APPNAME = bb.data.getVar( "APPNAME", d, True ) or bb.data.getVar( "PN", d, True ) + APPTYPE = bb.data.getVar( "APPTYPE", d, True ) + if not APPTYPE: + if bindir == "": + APPTYPE = "quicklaunch" + else: + APPTYPE = "plugin" + + appmap = { "binary":"/bin", "quicklaunch":"/plugins/application" } + if bindir == "": bindir = appmap[APPTYPE] + + bb.note( "Section='%s', bindir='%s', desktopdir='%s', name='%s', type='%s'" % + ( section, bindir, desktopdir, APPNAME, APPTYPE ) ) + + S = bb.data.getVar( "S", d, 1 ) + D = "%s/image" % bb.data.getVar( "WORKDIR", d, True ) + WORKDIR = bb.data.getVar( "WORKDIR", d, True ) + palmtopdir = bb.data.getVar( "palmtopdir", d ) + APPDESKTOP = bb.data.getVar( "APPDESKTOP", d, True ) or "%s/%s" % ( WORKDIR, desktopdir ) + + if desktopdir is not None: + os.system( "install -d %s%s%s/" % ( D, palmtopdir, desktopdir ) ) + os.system( "install -m 0644 %s/%s.desktop %s%s%s/" % ( APPDESKTOP, APPNAME, D, palmtopdir, desktopdir ) ) + + os.system( "install -d %s%s%s/" % ( D, palmtopdir, bindir ) ) + + if APPTYPE == "binary": + os.system( "install -m 0755 %s/%s %s%s%s/" % ( S, APPNAME, D, palmtopdir, bindir ) ) + elif APPTYPE == "quicklaunch": + os.system( "install -m 0755 %s/lib%s.so %s%s%s/" % ( S, APPNAME, D, palmtopdir, bindir ) ) + os.system( "install -d %s%s/bin/" % ( D, palmtopdir ) ) + os.system( "ln -sf %s/bin/quicklauncher %s%s/bin/%s" % ( palmtopdir, D, palmtopdir, APPNAME ) ) + elif APPTYPE == "plugin": + os.system( "install -m 0755 %s/lib%s.so %s%s%s/" % ( S, APPNAME, D, palmtopdir, bindir ) ) +} + +EXPORT_FUNCTIONS do_opie_install +addtask opie_install after do_compile before do_populate_staging diff --git a/openembedded/classes/opie_i18n.bbclass b/openembedded/classes/opie_i18n.bbclass new file mode 100644 index 0000000000..cb3d07de75 --- /dev/null +++ b/openembedded/classes/opie_i18n.bbclass @@ -0,0 +1,163 @@ +# classes/opie_i18n.oeclass Matthias 'CoreDump' Hentges 16-10-2004 +# +# Automatically builds i18n ipks for opie packages. It downloads opie-i18n from opie CVS +# and tries to guess the name of the .ts file based on the package name: +# ${PN}.ts, lib${PN}.ts and opie-${PN}.ts are all valid. The .ts "guessing" can be +# disabled by setting I18N_FILES in the .oe file. +# +# Todo: +# + +I18N_STATS = "1" +SRC_URI += "${HANDHELDS_CVS};module=opie/i18n" +DEPENDS += "opie-i18n" + +die () { + echo -e "opie_18n: ERROR: $1" + exit 1 +} + +python do_build_opie_i18n_data() { + + import os, bb, re + workdir = bb.data.getVar("WORKDIR", d, 1) + packages = bb.data.getVar("PACKAGES", d, 1) + files = bb.data.getVar("FILES", d, 1) + section = bb.data.getVar("SECTION", d, 1) + pn = bb.data.getVar("PN", d, 1) + rdepends = bb.data.getVar("RDEPENDS", d, 1) + + if os.path.exists(workdir + "/PACKAGES.tmp"): + fd = open(workdir + "/PACKAGES.tmp", 'r') + lines = fd.readlines() + fd.close() + + bb.data.setVar('PACKAGES', " ".join(lines).lower() + " " + packages, d) + + fd = open(workdir + "/FILES.tmp", 'r') + lines = fd.readlines() + fd.close() + + for l in lines: + x = re.split("\#", l) + bb.data.setVar('FILES_%s' % x[0].lower(), " " + x[1].strip('\n'), d) + bb.data.setVar('SECTION_%s' % x[0].lower(), "opie/translations", d) + bb.data.setVar('RDEPENDS_%s' % x[0].lower(), pn, d) + + bb.data.setVar('SECTION_%s' % pn, section, d) + bb.data.setVar('RDEPENDS', rdepends, d) + else: + bb.note("No translations found for package " + pn) +} + +do_build_opie_i18n () { + + cd "${WORKDIR}/i18n" || die "ERROR:\nCouldn't find Opies i18n sources in ${PN}/i18n\nMake sure that or is *below* !" + + if test -z "${I18N_FILES}" + then + package_name="`echo "${PN}"| sed "s/^opie\-//"`" + package_name2="`echo "${PN}"| sed "s/^opie\-//;s/\-//"`" + test "$package_name" != "$package_name2" && I18N_FILES="${package_name}.ts lib${package_name}.ts opie-${package_name}.ts ${package_name2}.ts lib${package_name2}.ts opie-${package_name2}.ts" + test "$package_name" = "$package_name2" && I18N_FILES="${package_name}.ts lib${package_name}.ts opie-${package_name}.ts" + echo -e "I18N Datafiles: ${I18N_FILES} (auto-detected)\nYou can overide the auto-detection by setting I18N_FILES in your .oe file" + else + echo "I18N Datafiles: ${I18N_FILES} (provided by .bb)" + fi + + rm -f "${WORKDIR}/FILES.tmp" "${WORKDIR}/PACKAGES.tmp" + + echo -e "\nFILES is set to [${FILES}]\n" + + for file in ${I18N_FILES} + do + echo "Working on [$file]" + for ts_file in `ls -1 */*.ts | egrep "/$file"` + do + echo -e "\tCompiling [$ts_file]" + cd "${WORKDIR}/i18n/`dirname $ts_file`" || die "[${WORKDIR}/i18n/`dirname $ts_file`] not found" + opie-lrelease "`basename $ts_file`" || die "lrelease failed! Make sure that or is *below* !" + + # $lang is the language as in de_DE, $lang_sane replaces "_" with "-" + # to allow packaging as "_" is not allowed in a package name + lang="`echo "$ts_file" | sed -n "s#\(.*\)/\(.*\)#\1#p"`" + lang_sane="`echo "$ts_file" | sed -n "s#\(.*\)/\(.*\)#\1#p"|sed s/\_/\-/`" + echo -e "\tPackaging [`basename $ts_file`] for language [$lang]" + + install -d ${D}${palmtopdir}/i18n/$lang + install -m 0644 ${WORKDIR}/i18n/$lang/.directory ${D}${palmtopdir}/i18n/$lang/ + install -m 0644 ${WORKDIR}/i18n/$lang/*.qm "${D}${palmtopdir}/i18n/$lang/" + + # As it is not possible to modify OE vars from within a _shell_ function, + # some major hacking was needed. These two files will be read by the python + # function do_build_opie_i18n_data() which sets the variables FILES_* and + # PACKAGES as needed. + echo -n "${PN}-${lang_sane} " >> "${WORKDIR}/PACKAGES.tmp" + echo -e "${PN}-${lang_sane}#${palmtopdir}/i18n/$lang" >> "${WORKDIR}/FILES.tmp" + + ts_found_something=1 + done + + if test "$ts_found_something" != 1 + then + echo -e "\tNo translations found" + else + ts_found_something="" + ts_found="$ts_found $file" + fi + + # Only used for debugging purposes + test "${I18N_STATS}" = 1 && cd "${WORKDIR}/i18n" + + echo -e "Completed [$file]\n\n" + done + + qt_dirs="apps bin etc lib pics plugins share sounds" + + for dir in $qt_dirs + do + dir_="$dir_ ${palmtopdir}/$dir " + done + + + # If we don't adjust FILES to exclude the i18n directory, we will end up with + # _lots_ of empty i18n/$lang directories in the original .ipk. + if (echo "${FILES}" | egrep "${palmtopdir}/? |${palmtopdir}/?$") &>/dev/null + then + echo "NOTE: FILES was set to ${palmtopdir} which would include the i18n directory" + echo -e "\n\nI'll remove ${palmtopdir} from FILES and replace it with all directories" + echo "below QtPalmtop, except i18n ($qt_dirs). See classes/opie_i18n.oeclass for details" + + # Removes /opt/QtPalmtop from FILES but keeps /opt/QtPalmtop/$some_dir + FILES="`echo "$FILES"| sed "s#${palmtopdir}[/]\?\$\|${palmtopdir}[/]\? ##"`" + + echo "${PN}#$FILES $dir_" >> "${WORKDIR}/FILES.tmp" + fi + + # This is the common case for OPIE apps which are installed by opie.oeclass magic + if test -z "${FILES}" + then + echo "NOTE:" + echo -e "Since FILES is empty, i'll add all directories below ${palmtopdir} to it,\nexcluding i18n: ( $qt_dirs )" + echo "${PN}#$FILES $dir_" >> "${WORKDIR}/FILES.tmp" + fi + + if ! test -e "${WORKDIR}/PACKAGES.tmp" -a "${I18N_STATS}" = 1 + then + echo "No translations for package [${PN}]" >> /tmp/oe-i18n-missing.log + else + echo "Using [$ts_found ] for package [${PN}]" >> /tmp/oe-i18n.log + fi + + # While this might not be very elegant, it safes a _ton_ of space (~30Mb) for + # each opie package. + for file in $(ls */*.ts | egrep -v "`echo "$ts_found"| sed "s/^\ //;s/\ /\|/"`") + do + rm "$file" + done + + return 0 +} + +addtask build_opie_i18n before do_compile +addtask build_opie_i18n_data after do_build_opie_i18n before do_compile diff --git a/openembedded/classes/package.bbclass b/openembedded/classes/package.bbclass new file mode 100644 index 0000000000..90dfec9fa7 --- /dev/null +++ b/openembedded/classes/package.bbclass @@ -0,0 +1,596 @@ +def legitimize_package_name(s): + return s.lower().replace('_', '-').replace('@', '+').replace(',', '+').replace('/', '-') + +def do_split_packages(d, root, file_regex, output_pattern, description, postinst=None, recursive=False, hook=None, extra_depends=None, aux_files_pattern=None, postrm=None, allow_dirs=False, prepend=False, match_path=False): + import os, os.path, bb + + dvar = bb.data.getVar('D', d, 1) + if not dvar: + bb.error("D not defined") + return + + packages = bb.data.getVar('PACKAGES', d, 1).split() + if not packages: + # nothing to do + return + + if postinst: + postinst = '#!/bin/sh\n' + postinst + '\n' + if postrm: + postrm = '#!/bin/sh\n' + postrm + '\n' + if not recursive: + objs = os.listdir(dvar + root) + else: + objs = [] + for walkroot, dirs, files in os.walk(dvar + root): + for file in files: + relpath = os.path.join(walkroot, file).replace(dvar + root + '/', '', 1) + if relpath: + objs.append(relpath) + + if extra_depends == None: + extra_depends = bb.data.getVar('PKG_' + packages[0], d, 1) or packages[0] + + for o in objs: + import re, stat + if match_path: + m = re.match(file_regex, o) + else: + m = re.match(file_regex, os.path.basename(o)) + + if not m: + continue + f = os.path.join(dvar + root, o) + mode = os.lstat(f).st_mode + if not (stat.S_ISREG(mode) or (allow_dirs and stat.S_ISDIR(mode))): + continue + on = legitimize_package_name(m.group(1)) + pkg = output_pattern % on + if not pkg in packages: + if prepend: + packages = [pkg] + packages + else: + packages.append(pkg) + the_files = [os.path.join(root, o)] + if aux_files_pattern: + if type(aux_files_pattern) is list: + for fp in aux_files_pattern: + the_files.append(fp % on) + else: + the_files.append(aux_files_pattern % on) + bb.data.setVar('FILES_' + pkg, " ".join(the_files), d) + if extra_depends != '': + the_depends = bb.data.getVar('RDEPENDS_' + pkg, d, 1) + if the_depends: + the_depends = '%s %s' % (the_depends, extra_depends) + else: + the_depends = extra_depends + bb.data.setVar('RDEPENDS_' + pkg, the_depends, d) + bb.data.setVar('DESCRIPTION_' + pkg, description % on, d) + if postinst: + bb.data.setVar('pkg_postinst_' + pkg, postinst, d) + if postrm: + bb.data.setVar('pkg_postrm_' + pkg, postrm, d) + else: + oldfiles = bb.data.getVar('FILES_' + pkg, d, 1) + if not oldfiles: + bb.fatal("Package '%s' exists but has no files" % pkg) + bb.data.setVar('FILES_' + pkg, oldfiles + " " + os.path.join(root, o), d) + if callable(hook): + hook(f, pkg, file_regex, output_pattern, m.group(1)) + + bb.data.setVar('PACKAGES', ' '.join(packages), d) + +python populate_packages () { + import glob, stat, errno, re + + workdir = bb.data.getVar('WORKDIR', d, 1) + if not workdir: + bb.error("WORKDIR not defined, unable to package") + return + + import os # path manipulations + outdir = bb.data.getVar('DEPLOY_DIR', d, 1) + if not outdir: + bb.error("DEPLOY_DIR not defined, unable to package") + return + bb.mkdirhier(outdir) + + dvar = bb.data.getVar('D', d, 1) + if not dvar: + bb.error("D not defined, unable to package") + return + bb.mkdirhier(dvar) + + packages = bb.data.getVar('PACKAGES', d, 1) + if not packages: + bb.debug(1, "PACKAGES not defined, nothing to package") + return + + pn = bb.data.getVar('PN', d, 1) + if not pn: + bb.error("PN not defined") + return + + os.chdir(dvar) + + def isexec(path): + try: + s = os.stat(path) + except (os.error, AttributeError): + return 0 + return (s[stat.ST_MODE] & stat.S_IEXEC) + + for pkg in packages.split(): + localdata = bb.data.createCopy(d) + root = os.path.join(workdir, "install", pkg) + + os.system('rm -rf %s' % root) + + bb.data.setVar('ROOT', '', localdata) + bb.data.setVar('ROOT_%s' % pkg, root, localdata) + pkgname = bb.data.getVar('PKG_%s' % pkg, localdata, 1) + if not pkgname: + pkgname = pkg + bb.data.setVar('PKG', pkgname, localdata) + + overrides = bb.data.getVar('OVERRIDES', localdata, 1) + if not overrides: + raise bb.build.FuncFailed('OVERRIDES not defined') + bb.data.setVar('OVERRIDES', overrides+':'+pkg, localdata) + + bb.data.update_data(localdata) + + root = bb.data.getVar('ROOT', localdata, 1) + bb.mkdirhier(root) + filesvar = bb.data.getVar('FILES', localdata, 1) or "" + files = filesvar.split() + stripfunc = "" + for file in files: + if os.path.isabs(file): + file = '.' + file + if not os.path.islink(file): + if os.path.isdir(file): + newfiles = [ os.path.join(file,x) for x in os.listdir(file) ] + if newfiles: + files += newfiles + continue + globbed = glob.glob(file) + if globbed: + if [ file ] != globbed: + files += globbed + continue + if (not os.path.islink(file)) and (not os.path.exists(file)): + continue + fpath = os.path.join(root,file) + dpath = os.path.dirname(fpath) + bb.mkdirhier(dpath) + if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, 1) != '1') and not os.path.islink(file) and isexec(file): + stripfunc += "${STRIP} %s || : ;\n" % fpath + ret = bb.movefile(file,fpath) + if ret is None or ret == 0: + raise bb.build.FuncFailed("File population failed") + if not stripfunc == "": + from bb import build + # strip + bb.data.setVar('RUNSTRIP', '%s\nreturn 0' % stripfunc, localdata) + bb.data.setVarFlag('RUNSTRIP', 'func', 1, localdata) + bb.build.exec_func('RUNSTRIP', localdata) + del localdata + os.chdir(workdir) + + unshipped = [] + for root, dirs, files in os.walk(dvar): + for f in files: + path = os.path.join(root[len(dvar):], f) + unshipped.append(path) + + if unshipped != []: + bb.note("the following files were installed but not shipped in any package:") + for f in unshipped: + bb.note(" " + f) + + bb.build.exec_func("package_name_hook", d) + + for pkg in packages.split(): + if bb.data.getVar('PKG_%s' % pkg, d, 1) is None: + bb.data.setVar('PKG_%s' % pkg, pkg, d) + + dangling_links = {} + pkg_files = {} + for pkg in packages.split(): + dangling_links[pkg] = [] + pkg_files[pkg] = [] + inst_root = os.path.join(workdir, "install", pkg) + for root, dirs, files in os.walk(inst_root): + for f in files: + path = os.path.join(root, f) + rpath = path[len(inst_root):] + pkg_files[pkg].append(rpath) + try: + s = os.stat(path) + except OSError, (err, strerror): + if err != errno.ENOENT: + raise + target = os.readlink(path) + if target[0] != '/': + target = os.path.join(root[len(inst_root):], target) + dangling_links[pkg].append(os.path.normpath(target)) + + for pkg in packages.split(): + rdepends = explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 1) or bb.data.getVar('RDEPENDS', d, 1) or "") + for l in dangling_links[pkg]: + found = False + bb.debug(1, "%s contains dangling link %s" % (pkg, l)) + for p in packages.split(): + for f in pkg_files[p]: + if f == l: + found = True + bb.debug(1, "target found in %s" % p) + if p == pkg: + break + dp = bb.data.getVar('PKG_' + p, d, 1) or p + if not dp in rdepends: + rdepends.append(dp) + break + if found == False: + bb.note("%s contains dangling symlink to %s" % (pkg, l)) + bb.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d) + + def write_if_exists(f, pkg, var): + def encode(str): + import codecs + c = codecs.getencoder("string_escape") + return c(str)[0] + + val = bb.data.getVar('%s_%s' % (var, pkg), d, 1) + if val: + f.write('%s_%s: %s\n' % (var, pkg, encode(val))) + + data_file = os.path.join(workdir, "install", pn + ".package") + f = open(data_file, 'w') + f.write("PACKAGES: %s\n" % packages) + for pkg in packages.split(): + write_if_exists(f, pkg, 'DESCRIPTION') + write_if_exists(f, pkg, 'RDEPENDS') + write_if_exists(f, pkg, 'RPROVIDES') + write_if_exists(f, pkg, 'PKG') + write_if_exists(f, pkg, 'ALLOW_EMPTY') + write_if_exists(f, pkg, 'FILES') + write_if_exists(f, pkg, 'pkg_postinst') + write_if_exists(f, pkg, 'pkg_postrm') + f.close() + bb.build.exec_func("read_subpackage_metadata", d) +} + +ldconfig_postinst_fragment() { +if [ x"$D" = "x" ]; then + ldconfig +fi +} + +python package_do_shlibs() { + import os, re, os.path + + exclude_shlibs = bb.data.getVar('EXCLUDE_FROM_SHLIBS', d, 0) + if exclude_shlibs: + bb.note("not generating shlibs") + return + + lib_re = re.compile("^lib.*\.so") + libdir_re = re.compile(".*/lib$") + + packages = bb.data.getVar('PACKAGES', d, 1) + if not packages: + bb.debug(1, "no packages to build; not calculating shlibs") + return + + workdir = bb.data.getVar('WORKDIR', d, 1) + if not workdir: + bb.error("WORKDIR not defined") + return + + staging = bb.data.getVar('STAGING_DIR', d, 1) + if not staging: + bb.error("STAGING_DIR not defined") + return + + ver = bb.data.getVar('PV', d, 1) + if not ver: + bb.error("PV not defined") + return + + target_sys = bb.data.getVar('TARGET_SYS', d, 1) + if not target_sys: + bb.error("TARGET_SYS not defined") + return + + shlibs_dir = os.path.join(staging, target_sys, "shlibs") + old_shlibs_dir = os.path.join(staging, "shlibs") + bb.mkdirhier(shlibs_dir) + + needed = {} + for pkg in packages.split(): + needs_ldconfig = False + bb.debug(2, "calculating shlib provides for %s" % pkg) + + pkgname = bb.data.getVar('PKG_%s' % pkg, d, 1) + if not pkgname: + pkgname = pkg + + needed[pkg] = [] + sonames = list() + top = os.path.join(workdir, "install", pkg) + for root, dirs, files in os.walk(top): + for file in files: + soname = None + path = os.path.join(root, file) + if os.access(path, os.X_OK) or lib_re.match(file): + cmd = (bb.data.getVar('BUILD_PREFIX', d, 1) or "") + "objdump -p " + path + " 2>/dev/null" + fd = os.popen(cmd) + lines = fd.readlines() + fd.close() + for l in lines: + m = re.match("\s+NEEDED\s+([^\s]*)", l) + if m: + needed[pkg].append(m.group(1)) + m = re.match("\s+SONAME\s+([^\s]*)", l) + if m and not m.group(1) in sonames: + sonames.append(m.group(1)) + if m and libdir_re.match(root): + needs_ldconfig = True + shlibs_file = os.path.join(shlibs_dir, pkgname + ".list") + if os.path.exists(shlibs_file): + os.remove(shlibs_file) + shver_file = os.path.join(shlibs_dir, pkgname + ".ver") + if os.path.exists(shver_file): + os.remove(shver_file) + if len(sonames): + fd = open(shlibs_file, 'w') + for s in sonames: + fd.write(s + '\n') + fd.close() + fd = open(shver_file, 'w') + fd.write(ver + '\n') + fd.close() + if needs_ldconfig: + bb.debug(1, 'adding ldconfig call to postinst for %s' % pkg) + postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1) or bb.data.getVar('pkg_postinst', d, 1) + if not postinst: + postinst = '#!/bin/sh\n' + postinst += bb.data.getVar('ldconfig_postinst_fragment', d, 1) + bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d) + + shlib_provider = {} + list_re = re.compile('^(.*)\.list$') + for dir in [old_shlibs_dir, shlibs_dir]: + if not os.path.exists(dir): + continue + for file in os.listdir(dir): + m = list_re.match(file) + if m: + dep_pkg = m.group(1) + fd = open(os.path.join(dir, file)) + lines = fd.readlines() + fd.close() + ver_file = os.path.join(dir, dep_pkg + '.ver') + lib_ver = None + if os.path.exists(ver_file): + fd = open(ver_file) + lib_ver = fd.readline().rstrip() + fd.close() + for l in lines: + shlib_provider[l.rstrip()] = (dep_pkg, lib_ver) + + + for pkg in packages.split(): + bb.debug(2, "calculating shlib requirements for %s" % pkg) + + p_pkg = bb.data.getVar("PKG_%s" % pkg, d, 1) or pkg + + deps = list() + for n in needed[pkg]: + if n in shlib_provider.keys(): + (dep_pkg, ver_needed) = shlib_provider[n] + + if dep_pkg == p_pkg: + continue + + if ver_needed: + dep = "%s (>= %s)" % (dep_pkg, ver_needed) + else: + dep = dep_pkg + if not dep in deps: + deps.append(dep) + else: + bb.note("Couldn't find shared library provider for %s" % n) + + + deps_file = os.path.join(workdir, "install", pkg + ".shlibdeps") + if os.path.exists(deps_file): + os.remove(deps_file) + if len(deps): + fd = open(deps_file, 'w') + for dep in deps: + fd.write(dep + '\n') + fd.close() +} + +python package_do_pkgconfig () { + import re, os + + packages = bb.data.getVar('PACKAGES', d, 1) + if not packages: + bb.debug(1, "no packages to build; not calculating pkgconfig dependencies") + return + + workdir = bb.data.getVar('WORKDIR', d, 1) + if not workdir: + bb.error("WORKDIR not defined") + return + + staging = bb.data.getVar('STAGING_DIR', d, 1) + if not staging: + bb.error("STAGING_DIR not defined") + return + + target_sys = bb.data.getVar('TARGET_SYS', d, 1) + if not target_sys: + bb.error("TARGET_SYS not defined") + return + + shlibs_dir = os.path.join(staging, target_sys, "shlibs") + old_shlibs_dir = os.path.join(staging, "shlibs") + bb.mkdirhier(shlibs_dir) + + pc_re = re.compile('(.*)\.pc$') + var_re = re.compile('(.*)=(.*)') + field_re = re.compile('(.*): (.*)') + + pkgconfig_provided = {} + pkgconfig_needed = {} + for pkg in packages.split(): + pkgconfig_provided[pkg] = [] + pkgconfig_needed[pkg] = [] + top = os.path.join(workdir, "install", pkg) + for root, dirs, files in os.walk(top): + for file in files: + m = pc_re.match(file) + if m: + pd = bb.data.init() + name = m.group(1) + pkgconfig_provided[pkg].append(name) + path = os.path.join(root, file) + if not os.access(path, os.R_OK): + continue + f = open(path, 'r') + lines = f.readlines() + f.close() + for l in lines: + m = var_re.match(l) + if m: + name = m.group(1) + val = m.group(2) + bb.data.setVar(name, bb.data.expand(val, pd), pd) + continue + m = field_re.match(l) + if m: + hdr = m.group(1) + exp = bb.data.expand(m.group(2), pd) + if hdr == 'Requires': + pkgconfig_needed[pkg] += exp.replace(',', ' ').split() + + for pkg in packages.split(): + ppkg = bb.data.getVar("PKG_" + pkg, d, 1) or pkg + pkgs_file = os.path.join(shlibs_dir, ppkg + ".pclist") + if os.path.exists(pkgs_file): + os.remove(pkgs_file) + if pkgconfig_provided[pkg] != []: + f = open(pkgs_file, 'w') + for p in pkgconfig_provided[pkg]: + f.write('%s\n' % p) + f.close() + + for dir in [old_shlibs_dir, shlibs_dir]: + if not os.path.exists(dir): + continue + for file in os.listdir(dir): + m = re.match('^(.*)\.pclist$', file) + if m: + pkg = m.group(1) + fd = open(os.path.join(dir, file)) + lines = fd.readlines() + fd.close() + pkgconfig_provided[pkg] = [] + for l in lines: + pkgconfig_provided[pkg].append(l.rstrip()) + + for pkg in packages.split(): + deps = [] + for n in pkgconfig_needed[pkg]: + found = False + for k in pkgconfig_provided.keys(): + if n in pkgconfig_provided[k]: + if k != pkg and not (k in deps): + deps.append(k) + found = True + if found == False: + bb.note("couldn't find pkgconfig module '%s' in any package" % n) + deps_file = os.path.join(workdir, "install", pkg + ".pcdeps") + if os.path.exists(deps_file): + os.remove(deps_file) + if len(deps): + fd = open(deps_file, 'w') + for dep in deps: + fd.write(dep + '\n') + fd.close() +} + +python package_do_split_locales() { + import os + + if (bb.data.getVar('PACKAGE_NO_LOCALE', d, 1) == '1'): + bb.debug(1, "package requested not splitting locales") + return + + packages = (bb.data.getVar('PACKAGES', d, 1) or "").split() + if not packages: + bb.debug(1, "no packages to build; not splitting locales") + return + + datadir = bb.data.getVar('datadir', d, 1) + if not datadir: + bb.note("datadir not defined") + return + + dvar = bb.data.getVar('D', d, 1) + if not dvar: + bb.error("D not defined") + return + + pn = bb.data.getVar('PN', d, 1) + if not pn: + bb.error("PN not defined") + return + + if pn + '-locale' in packages: + packages.remove(pn + '-locale') + + localedir = os.path.join(dvar + datadir, 'locale') + + if not os.path.isdir(localedir): + bb.debug(1, "No locale files in this package") + return + + locales = os.listdir(localedir) + + mainpkg = packages[0] + + for l in locales: + ln = legitimize_package_name(l) + pkg = pn + '-locale-' + ln + packages.append(pkg) + bb.data.setVar('FILES_' + pkg, os.path.join(datadir, 'locale', l), d) + bb.data.setVar('RDEPENDS_' + pkg, '${PKG_%s} virtual-locale-%s' % (mainpkg, ln), d) + bb.data.setVar('RPROVIDES_' + pkg, '%s-locale %s-translation' % (pn, ln), d) + bb.data.setVar('DESCRIPTION_' + pkg, '%s translation for %s' % (l, pn), d) + + bb.data.setVar('PACKAGES', ' '.join(packages), d) + + rdep = (bb.data.getVar('RDEPENDS_%s' % mainpkg, d, 1) or bb.data.getVar('RDEPENDS', d, 1) or "").split() + rdep.append('%s-locale*' % pn) + bb.data.setVar('RDEPENDS_%s' % mainpkg, ' '.join(rdep), d) +} + +PACKAGEFUNCS = "do_install package_do_split_locales \ + populate_packages package_do_shlibs \ + package_do_pkgconfig read_shlibdeps" +python package_do_package () { + for f in (bb.data.getVar('PACKAGEFUNCS', d, 1) or '').split(): + bb.build.exec_func(f, d) +} + +do_package[dirs] = "${D}" +populate_packages[dirs] = "${D}" +EXPORT_FUNCTIONS do_package do_shlibs do_split_locales +addtask package before do_build after do_populate_staging diff --git a/openembedded/classes/package_ipk.bbclass b/openembedded/classes/package_ipk.bbclass new file mode 100644 index 0000000000..3c6125d9e3 --- /dev/null +++ b/openembedded/classes/package_ipk.bbclass @@ -0,0 +1,231 @@ +inherit package +DEPENDS_prepend="${@["ipkg-utils-native ", ""][(bb.data.getVar('PACKAGES', d, 1) == '')]}" +BOOTSTRAP_EXTRA_RDEPENDS += "ipkg-collateral ipkg ipkg-link" +BOOTSTRAP_EXTRA_DEPENDS += "ipkg-collateral ipkg ipkg-link" +PACKAGEFUNCS += "do_package_ipk" + +python package_ipk_fn () { + from bb import data + bb.data.setVar('PKGFN', bb.data.getVar('PKG',d), d) +} + +python package_ipk_install () { + import os, sys + pkg = bb.data.getVar('PKG', d, 1) + pkgfn = bb.data.getVar('PKGFN', d, 1) + rootfs = bb.data.getVar('IMAGE_ROOTFS', d, 1) + ipkdir = bb.data.getVar('DEPLOY_DIR_IPK', d, 1) + stagingdir = bb.data.getVar('STAGING_DIR', d, 1) + tmpdir = bb.data.getVar('TMPDIR', d, 1) + + if None in (pkg,pkgfn,rootfs): + raise bb.build.FuncFailed("missing variables (one or more of PKG, PKGFN, IMAGEROOTFS)") + try: + bb.mkdirhier(rootfs) + os.chdir(rootfs) + except OSError: + (type, value, traceback) = sys.exc_info() + print value + raise bb.build.FuncFailed + + # Generate ipk.conf if it or the stamp doesnt exist + conffile = os.path.join(stagingdir,"ipkg.conf") + if not os.access(conffile, os.R_OK): + ipkg_archs = bb.data.getVar('IPKG_ARCHS',d) + if ipkg_archs is None: + bb.error("IPKG_ARCHS missing") + raise FuncFailed + ipkg_archs = ipkg_archs.split() + arch_priority = 1 + + f = open(conffile,"w") + for arch in ipkg_archs: + f.write("arch %s %s\n" % ( arch, arch_priority )) + arch_priority += 1 + f.write("src local file:%s" % ipkdir) + f.close() + + + if (not os.access(os.path.join(ipkdir,"Packages"), os.R_OK) or + not os.access(os.path.join(os.path.join(tmpdir, "stamps"),"do_packages"),os.R_OK)): + ret = os.system('ipkg-make-index -p %s %s ' % (os.path.join(ipkdir, "Packages"), ipkdir)) + if (ret != 0 ): + raise bb.build.FuncFailed + f=open(os.path.join(os.path.join(tmpdir, "stamps"),"do_packages"),"w") + f.close() + + ret = os.system('ipkg-cl -o %s -f %s update' % (rootfs, conffile)) + ret = os.system('ipkg-cl -o %s -f %s install %s' % (rootfs, conffile, pkgfn)) + if (ret != 0 ): + raise bb.build.FuncFailed +} + +python do_package_ipk () { + import copy # to back up env data + import sys + import re + + workdir = bb.data.getVar('WORKDIR', d, 1) + if not workdir: + bb.error("WORKDIR not defined, unable to package") + return + + import os # path manipulations + outdir = bb.data.getVar('DEPLOY_DIR_IPK', d, 1) + if not outdir: + bb.error("DEPLOY_DIR_IPK not defined, unable to package") + return + bb.mkdirhier(outdir) + + dvar = bb.data.getVar('D', d, 1) + if not dvar: + bb.error("D not defined, unable to package") + return + bb.mkdirhier(dvar) + + packages = bb.data.getVar('PACKAGES', d, 1) + if not packages: + bb.debug(1, "PACKAGES not defined, nothing to package") + return + + tmpdir = bb.data.getVar('TMPDIR', d, 1) + # Invalidate the packages file + if os.access(os.path.join(os.path.join(tmpdir, "stamps"),"do_packages"),os.R_OK): + os.unlink(os.path.join(os.path.join(tmpdir, "stamps"),"do_packages")) + + if packages == []: + bb.debug(1, "No packages; nothing to do") + return + + for pkg in packages.split(): + localdata = bb.data.createCopy(d) + root = "%s/install/%s" % (workdir, pkg) + + bb.data.setVar('ROOT', '', localdata) + bb.data.setVar('ROOT_%s' % pkg, root, localdata) + pkgname = bb.data.getVar('PKG_%s' % pkg, localdata, 1) + if not pkgname: + pkgname = pkg + bb.data.setVar('PKG', pkgname, localdata) + + overrides = bb.data.getVar('OVERRIDES', localdata) + if not overrides: + raise bb.build.FuncFailed('OVERRIDES not defined') + overrides = bb.data.expand(overrides, localdata) + bb.data.setVar('OVERRIDES', overrides + ':' + pkg, localdata) + + bb.data.update_data(localdata) + basedir = os.path.join(os.path.dirname(root)) + pkgoutdir = outdir + bb.mkdirhier(pkgoutdir) + os.chdir(root) + from glob import glob + g = glob('*') + try: + del g[g.index('CONTROL')] + del g[g.index('./CONTROL')] + except ValueError: + pass + if not g and not bb.data.getVar('ALLOW_EMPTY', localdata): + from bb import note + note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PV', localdata, 1), bb.data.getVar('PR', localdata, 1))) + continue + controldir = os.path.join(root, 'CONTROL') + bb.mkdirhier(controldir) + try: + ctrlfile = file(os.path.join(controldir, 'control'), 'w') + except OSError: + raise bb.build.FuncFailed("unable to open control file for writing.") + + fields = [] + fields.append(["Version: %s-%s\n", ['PV', 'PR']]) + fields.append(["Description: %s\n", ['DESCRIPTION']]) + fields.append(["Section: %s\n", ['SECTION']]) + fields.append(["Priority: %s\n", ['PRIORITY']]) + fields.append(["Maintainer: %s\n", ['MAINTAINER']]) + fields.append(["Architecture: %s\n", ['PACKAGE_ARCH']]) + fields.append(["OE: %s\n", ['P']]) + + def pullData(l, d): + l2 = [] + for i in l: + l2.append(bb.data.getVar(i, d, 1)) + return l2 + + ctrlfile.write("Package: %s\n" % pkgname) + # check for required fields + try: + for (c, fs) in fields: + for f in fs: + if bb.data.getVar(f, localdata) is None: + raise KeyError(f) + ctrlfile.write(c % tuple(pullData(fs, localdata))) + except KeyError: + (type, value, traceback) = sys.exc_info() + ctrlfile.close() + raise bb.build.FuncFailed("Missing field for ipk generation: %s" % value) + # more fields + rdepends = explode_deps(bb.data.getVar("RDEPENDS", localdata, 1) or "") + rrecommends = explode_deps(bb.data.getVar("RRECOMMENDS", localdata, 1) or "") + rsuggests = (bb.data.getVar("RSUGGESTS", localdata, 1) or "").split() + rprovides = (bb.data.getVar("RPROVIDES", localdata, 1) or "").split() + rreplaces = (bb.data.getVar("RREPLACES", localdata, 1) or "").split() + rconflicts = (bb.data.getVar("RCONFLICTS", localdata, 1) or "").split() + if rdepends: + ctrlfile.write("Depends: %s\n" % ", ".join(rdepends)) + if rsuggests: + ctrlfile.write("Suggests: %s\n" % ", ".join(rsuggests)) + if rrecommends: + ctrlfile.write("Recommends: %s\n" % ", ".join(rrecommends)) + if rprovides: + ctrlfile.write("Provides: %s\n" % ", ".join(rprovides)) + if rreplaces: + ctrlfile.write("Replaces: %s\n" % ", ".join(rreplaces)) + if rconflicts: + ctrlfile.write("Conflicts: %s\n" % ", ".join(rconflicts)) + src_uri = bb.data.getVar("SRC_URI", localdata, 1) + if src_uri: + src_uri = re.sub("\s+", " ", src_uri) + ctrlfile.write("Source: %s\n" % " ".join(src_uri.split())) + ctrlfile.close() + + for script in ["preinst", "postinst", "prerm", "postrm"]: + scriptvar = bb.data.getVar('pkg_%s' % script, localdata, 1) + if not scriptvar: + continue + try: + scriptfile = file(os.path.join(controldir, script), 'w') + except OSError: + raise bb.build.FuncFailed("unable to open %s script file for writing." % script) + scriptfile.write(scriptvar) + scriptfile.close() + os.chmod(os.path.join(controldir, script), 0755) + + conffiles_str = bb.data.getVar("CONFFILES", localdata, 1) + if conffiles_str: + try: + conffiles = file(os.path.join(controldir, 'conffiles'), 'w') + except OSError: + raise bb.build.FuncFailed("unable to open conffiles for writing.") + for f in conffiles_str.split(): + conffiles.write('%s\n' % f) + conffiles.close() + + os.chdir(basedir) + ret = os.system("PATH=\"%s\" %s %s %s" % (bb.data.getVar("PATH", localdata, 1), + bb.data.getVar("IPKGBUILDCMD",d,1), pkg, pkgoutdir)) + if ret != 0: + raise bb.build.FuncFailed("ipkg-build execution failed") + + for script in ["preinst", "postinst", "prerm", "postrm", "control" ]: + scriptfile = os.path.join(controldir, script) + try: + os.remove(scriptfile) + except OSError: + pass + try: + os.rmdir(controldir) + except OSError: + pass + del localdata +} diff --git a/openembedded/classes/package_rpm.bbclass b/openembedded/classes/package_rpm.bbclass new file mode 100644 index 0000000000..c29ab5f423 --- /dev/null +++ b/openembedded/classes/package_rpm.bbclass @@ -0,0 +1,133 @@ +inherit package +inherit rpm_core + +RPMBUILD="rpmbuild --short-circuit ${RPMOPTS}" +PACKAGEFUNCS += "do_package_rpm" + +python write_specfile() { + from bb import data, build + import sys + out_vartranslate = { + "PKG": "Name", + "PV": "Version", + "PR": "Release", + "DESCRIPTION": "%description", + "ROOT": "BuildRoot", + "LICENSE": "License", + "SECTION": "Group", + } + + root = bb.data.getVar('ROOT', d) + + # get %files + filesvar = bb.data.expand(bb.data.getVar('FILES', d), d) or "" + from glob import glob + files = filesvar.split() + todelete = [] + for file in files: + if file[0] == '.': + newfile = file[1:] + files[files.index(file)] = newfile + file = newfile + else: + newfile = file + realfile = os.path.join(root, './'+file) + if not glob(realfile): + todelete.append(files[files.index(newfile)]) + for r in todelete: + try: + del files[files.index(r)] + except ValueError: + pass + if not files: + from bb import note + note("Not creating empty archive for %s-%s-%s" % (bb.data.getVar('PKG',d, 1), bb.data.getVar('PV', d, 1), bb.data.getVar('PR', d, 1))) + return + + # output .spec using this metadata store + try: + from __builtin__ import file + if not bb.data.getVar('OUTSPECFILE', d): + raise OSError('eek!') + specfile = file(bb.data.getVar('OUTSPECFILE', d), 'w') + except OSError: + raise bb.build.FuncFailed("unable to open spec file for writing.") + +# fd = sys.__stdout__ + fd = specfile + for var in out_vartranslate.keys(): + if out_vartranslate[var][0] == "%": + continue + fd.write("%s\t: %s\n" % (out_vartranslate[var], bb.data.getVar(var, d))) + fd.write("Summary\t: .\n") + + for var in out_vartranslate.keys(): + if out_vartranslate[var][0] != "%": + continue + fd.write(out_vartranslate[var] + "\n") + fd.write(bb.data.getVar(var, d) + "\n\n") + + fd.write("%files\n") + for file in files: + fd.write("%s\n" % file) + + fd.close() + + # call out rpm -bb on the .spec, thereby creating an rpm + + bb.data.setVar('BUILDSPEC', "${RPMBUILD} -bb ${OUTSPECFILE}\n", d) + bb.data.setVarFlag('BUILDSPEC', 'func', '1', d) + bb.build.exec_func('BUILDSPEC', d) + + # move the rpm into the pkgoutdir + rpm = bb.data.expand('${RPMBUILDPATH}/RPMS/${TARGET_ARCH}/${PKG}-${PV}-${PR}.${TARGET_ARCH}.rpm', d) + outrpm = bb.data.expand('${DEPLOY_DIR_RPM}/${PKG}-${PV}-${PR}.${TARGET_ARCH}.rpm', d) + bb.movefile(rpm, outrpm) +} + +python do_package_rpm () { + workdir = bb.data.getVar('WORKDIR', d) + if not workdir: + raise bb.build.FuncFailed("WORKDIR not defined") + workdir = bb.data.expand(workdir, d) + + import os # path manipulations + outdir = bb.data.getVar('DEPLOY_DIR_RPM', d) + if not outdir: + raise bb.build.FuncFailed("DEPLOY_DIR_RPM not defined") + outdir = bb.data.expand(outdir, d) + bb.mkdirhier(outdir) + + packages = bb.data.getVar('PACKAGES', d) + if not packages: + packages = "${PN}" + bb.data.setVar('FILES', '', d) + ddir = bb.data.expand(bb.data.getVar('D', d), d) + bb.mkdirhier(ddir) + bb.data.setVar(bb.data.expand('FILES_${PN}', d), ''.join([ "./%s" % x for x in os.listdir(ddir)]), d) + packages = bb.data.expand(packages, d) + + for pkg in packages.split(): + localdata = bb.data.createCopy(d) + root = "%s/install/%s" % (workdir, pkg) + + bb.data.setVar('ROOT', '', localdata) + bb.data.setVar('ROOT_%s' % pkg, root, localdata) + bb.data.setVar('PKG', pkg, localdata) + + overrides = bb.data.getVar('OVERRIDES', localdata) + if not overrides: + raise bb.build.FuncFailed('OVERRIDES not defined') + overrides = bb.data.expand(overrides, localdata) + bb.data.setVar('OVERRIDES', '%s:%s' % (overrides, pkg), localdata) + + bb.data.update_data(localdata) +# stuff + root = bb.data.getVar('ROOT', localdata) + basedir = os.path.dirname(root) + pkgoutdir = outdir + bb.mkdirhier(pkgoutdir) + bb.data.setVar('OUTSPECFILE', os.path.join(workdir, "%s.spec" % pkg), localdata) + bb.build.exec_func('write_specfile', localdata) + del localdata +} diff --git a/openembedded/classes/package_tar.bbclass b/openembedded/classes/package_tar.bbclass new file mode 100644 index 0000000000..359e35f113 --- /dev/null +++ b/openembedded/classes/package_tar.bbclass @@ -0,0 +1,99 @@ +inherit package + +PACKAGEFUNCS += "do_package_tar" + +python package_tar_fn () { + import os + from bb import data + fn = os.path.join(bb.data.getVar('DEPLOY_DIR_TAR', d), "%s-%s-%s.tar.gz" % (bb.data.getVar('PKG', d), bb.data.getVar('PV', d), bb.data.getVar('PR', d))) + fn = bb.data.expand(fn, d) + bb.data.setVar('PKGFN', fn, d) +} + +python package_tar_install () { + import os, sys + pkg = bb.data.getVar('PKG', d, 1) + pkgfn = bb.data.getVar('PKGFN', d, 1) + rootfs = bb.data.getVar('IMAGE_ROOTFS', d, 1) + + if None in (pkg,pkgfn,rootfs): + bb.error("missing variables (one or more of PKG, PKGFN, IMAGEROOTFS)") + raise bb.build.FuncFailed + try: + bb.mkdirhier(rootfs) + os.chdir(rootfs) + except OSError: + (type, value, traceback) = sys.exc_info() + print value + raise bb.build.FuncFailed + + if not os.access(pkgfn, os.R_OK): + bb.debug(1, "%s does not exist, skipping" % pkgfn) + raise bb.build.FuncFailed + + ret = os.system('zcat %s | tar -xf -' % pkgfn) + if ret != 0: + raise bb.build.FuncFailed +} + +python do_package_tar () { + workdir = bb.data.getVar('WORKDIR', d, 1) + if not workdir: + bb.error("WORKDIR not defined, unable to package") + return + + import os # path manipulations + outdir = bb.data.getVar('DEPLOY_DIR_TAR', d, 1) + if not outdir: + bb.error("DEPLOY_DIR_TAR not defined, unable to package") + return + bb.mkdirhier(outdir) + + dvar = bb.data.getVar('D', d, 1) + if not dvar: + bb.error("D not defined, unable to package") + return + bb.mkdirhier(dvar) + + packages = bb.data.getVar('PACKAGES', d, 1) + if not packages: + bb.debug(1, "PACKAGES not defined, nothing to package") + return + + for pkg in packages.split(): + localdata = bb.data.createCopy(d) + root = "%s/install/%s" % (workdir, pkg) + + bb.data.setVar('ROOT', '', localdata) + bb.data.setVar('ROOT_%s' % pkg, root, localdata) + bb.data.setVar('PKG', pkg, localdata) + + overrides = bb.data.getVar('OVERRIDES', localdata) + if not overrides: + raise bb.build.FuncFailed('OVERRIDES not defined') + overrides = bb.data.expand(overrides, localdata) + bb.data.setVar('OVERRIDES', '%s:%s' % (overrides, pkg), localdata) + + bb.data.update_data(localdata) +# stuff + root = bb.data.getVar('ROOT', localdata) + bb.mkdirhier(root) + basedir = os.path.dirname(root) + pkgoutdir = outdir + bb.mkdirhier(pkgoutdir) + bb.build.exec_func('package_tar_fn', localdata) + tarfn = bb.data.getVar('PKGFN', localdata, 1) +# if os.path.exists(tarfn): +# del localdata +# continue + os.chdir(root) + from glob import glob + if not glob('*'): + bb.note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PV', localdata, 1), bb.data.getVar('PR', localdata, 1))) + continue + ret = os.system("tar -czvf %s %s" % (tarfn, '.')) + if ret != 0: + bb.error("Creation of tar %s failed." % tarfn) +# end stuff + del localdata +} diff --git a/openembedded/classes/palmtop.bbclass b/openembedded/classes/palmtop.bbclass new file mode 100644 index 0000000000..523c3d71bb --- /dev/null +++ b/openembedded/classes/palmtop.bbclass @@ -0,0 +1,10 @@ +# basically a placeholder for something more fancy +# for now, just declare some things + +inherit qmake + +EXTRA_QMAKEVARS_POST_append = " DEFINES+=QWS LIBS+=-lqpe CONFIG+=qt LIBS-=-lstdc++ LIBS+=-lsupc++" + +DEPENDS_prepend = "virtual/libqpe uicmoc-native " + +FILES_${PN} = "${palmtopdir}" diff --git a/openembedded/classes/patcher.bbclass b/openembedded/classes/patcher.bbclass new file mode 100644 index 0000000000..c8a1b0350f --- /dev/null +++ b/openembedded/classes/patcher.bbclass @@ -0,0 +1,7 @@ +# Now that BitBake/OpenEmbedded uses Quilt by default, you can simply add an +# inherit patcher +# to one of your config files to let BB/OE use patcher again. + +PATCHCLEANCMD = "patcher -B" +PATCHCMD = "patcher -R -p '%s' -n '%s' -i '%s'" +PATCH_DEPENDS = "${@["patcher-native", ""][(bb.data.getVar('PN', d, 1) == 'patcher-native')]}" diff --git a/openembedded/classes/pkg_distribute.bbclass b/openembedded/classes/pkg_distribute.bbclass new file mode 100644 index 0000000000..81978e3e3b --- /dev/null +++ b/openembedded/classes/pkg_distribute.bbclass @@ -0,0 +1,29 @@ +PKG_DISTRIBUTECOMMAND[func] = "1" +python do_distribute_packages () { + cmd = bb.data.getVar('PKG_DISTRIBUTECOMMAND', d, 1) + if not cmd: + raise bb.build.FuncFailed("Unable to distribute packages, PKG_DISTRIBUTECOMMAND not defined") + bb.build.exec_func('PKG_DISTRIBUTECOMMAND', d) +} + +addtask distribute_packages before do_build after do_fetch + +PKG_DIST_LOCAL ?= "symlink" +PKG_DISTRIBUTEDIR ?= "${DEPLOY_DIR}/packages" + +PKG_DISTRIBUTECOMMAND () { + p=`dirname ${FILE}` + d=`basename $p` + mkdir -p ${PKG_DISTRIBUTEDIR} + case "${PKG_DIST_LOCAL}" in + copy) + # use this weird tar command to copy because we want to + # exclude the BitKeeper directories + test -e ${PKG_DISTRIBUTEDIR}/${d} || mkdir ${PKG_DISTRIBUTEDIR}/${d}; + (cd ${p}; tar -c --exclude SCCS -f - . ) | tar -C ${PKG_DISTRIBUTEDIR}/${d} -xpf - + ;; + symlink) + ln -sf $p ${PKG_DISTRIBUTEDIR}/ + ;; + esac +} diff --git a/openembedded/classes/pkg_metainfo.bbclass b/openembedded/classes/pkg_metainfo.bbclass new file mode 100644 index 0000000000..ac4f73c77b --- /dev/null +++ b/openembedded/classes/pkg_metainfo.bbclass @@ -0,0 +1,22 @@ +python do_pkg_write_metainfo () { + deploydir = bb.data.getVar('DEPLOY_DIR', d, 1) + if not deploydir: + bb.error("DEPLOY_DIR not defined, unable to write package info") + return + + try: + infofile = file(os.path.join(deploydir, 'package-metainfo'), 'a') + except OSError: + raise bb.build.FuncFailed("unable to open package-info file for writing.") + + name = bb.data.getVar('PN', d, 1) + version = bb.data.getVar('PV', d, 1) + desc = bb.data.getVar('DESCRIPTION', d, 1) + page = bb.data.getVar('HOMEPAGE', d, 1) + lic = bb.data.getVar('LICENSE', d, 1) + + infofile.write("|| "+ name +" || "+ version + " || "+ desc +" || "+ page +" || "+ lic + " ||\n" ) + infofile.close() +} + +addtask pkg_write_metainfo after do_package before do_build \ No newline at end of file diff --git a/openembedded/classes/pkgconfig.bbclass b/openembedded/classes/pkgconfig.bbclass new file mode 100644 index 0000000000..e89e827fc8 --- /dev/null +++ b/openembedded/classes/pkgconfig.bbclass @@ -0,0 +1,28 @@ +inherit base + +DEPENDS_prepend = "pkgconfig-native " + +# The namespaces can clash here hence the two step replace +def get_pkgconfig_mangle(d): + import bb.data + s = "-e ''" + if not bb.data.inherits_class('native', d): + s += " -e 's:=${libdir}:=OELIBDIR:;'" + s += " -e 's:=${includedir}:=OEINCDIR:;'" + s += " -e 's:=${datadir}:=OEDATADIR:'" + s += " -e 's:=${prefix}:=OEPREFIX:'" + s += " -e 's:=${exec_prefix}:=OEEXECPREFIX:'" + s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'" + s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'" + s += " -e 's:OEDATADIR:${STAGING_DATADIR}:'" + s += " -e 's:OEPREFIX:${STAGING_LIBDIR}/..:'" + s += " -e 's:OEEXECPREFIX:${STAGING_LIBDIR}/..:'" + return s + +do_stage_append () { + for pc in `find ${S} -name '*.pc'`; do + pcname=`basename $pc` + install -d ${PKG_CONFIG_PATH} + cat $pc | sed ${@get_pkgconfig_mangle(d)} > ${PKG_CONFIG_PATH}/$pcname + done +} diff --git a/openembedded/classes/qmake-base.bbclass b/openembedded/classes/qmake-base.bbclass new file mode 100644 index 0000000000..4a360dae43 --- /dev/null +++ b/openembedded/classes/qmake-base.bbclass @@ -0,0 +1,42 @@ +DEPENDS_prepend = "qmake-native " + +OE_QMAKE_PLATFORM = "${TARGET_OS}-oe-g++" +QMAKESPEC := "${QMAKE_MKSPEC_PATH}/${OE_QMAKE_PLATFORM}" + +# We override this completely to eliminate the -e normally passed in +EXTRA_OEMAKE = ' MAKEFLAGS= ' + +export OE_QMAKE_CC="${CC}" +export OE_QMAKE_CFLAGS="${CFLAGS}" +export OE_QMAKE_CXX="${CXX}" +export OE_QMAKE_CXXFLAGS="-fno-exceptions -fno-rtti ${CXXFLAGS}" +export OE_QMAKE_LDFLAGS="${LDFLAGS}" +export OE_QMAKE_LINK="${CCLD}" +export OE_QMAKE_AR="${AR}" +export OE_QMAKE_STRIP="${STRIP}" +export OE_QMAKE_UIC="${STAGING_BINDIR}/uic" +export OE_QMAKE_MOC="${STAGING_BINDIR}/moc" +export OE_QMAKE_RPATH="-Wl,-rpath-link," + +# default to qte2 via bb.conf, inherit qt3x11 to configure for qt3x11 +export OE_QMAKE_INCDIR_QT="${QTDIR}/include" +export OE_QMAKE_LIBDIR_QT="${QTDIR}/lib" +export OE_QMAKE_LIBS_QT="qte" +export OE_QMAKE_LIBS_X11="" + +oe_qmake_mkspecs () { + mkdir -p mkspecs/${OE_QMAKE_PLATFORM} + for f in ${QMAKE_MKSPEC_PATH}/${OE_QMAKE_PLATFORM}/*; do + if [ -L $f ]; then + lnk=`readlink $f` + if [ -f mkspecs/${OE_QMAKE_PLATFORM}/$lnk ]; then + ln -s $lnk mkspecs/${OE_QMAKE_PLATFORM}/`basename $f` + else + cp $f mkspecs/${OE_QMAKE_PLATFORM}/ + fi + else + cp $f mkspecs/${OE_QMAKE_PLATFORM}/ + fi + done +} + diff --git a/openembedded/classes/qmake.bbclass b/openembedded/classes/qmake.bbclass new file mode 100644 index 0000000000..10aa8c9f7d --- /dev/null +++ b/openembedded/classes/qmake.bbclass @@ -0,0 +1,57 @@ +inherit qmake-base + +qmake_do_configure() { + case ${QMAKESPEC} in + *linux-oe-g++|*linux-uclibc-oe-g++) + ;; + *-oe-g++) + die Unsupported target ${TARGET_OS} for oe-g++ qmake spec + ;; + *) + oenote Searching for qmake spec file + paths="${QMAKE_MKSPEC_PATH}/qws/${TARGET_OS}-${TARGET_ARCH}-g++" + paths="${QMAKE_MKSPEC_PATH}/${TARGET_OS}-g++ $paths" + + if (echo "${TARGET_ARCH}"|grep -q 'i.86'); then + paths="${QMAKE_MKSPEC_PATH}/qws/${TARGET_OS}-x86-g++ $paths" + fi + for i in $paths; do + if test -e $i; then + export QMAKESPEC=$i + break + fi + done + ;; + esac + + oenote "using qmake spec in ${QMAKESPEC}, using profiles '${QMAKE_PROFILES}'" + + if [ -z "${QMAKE_PROFILES}" ]; then + PROFILES="`ls *.pro`" + else + PROFILES="${QMAKE_PROFILES}" + fi + + if [ -z "$PROFILES" ]; then + die "QMAKE_PROFILES not set and no profiles found in $PWD" + fi + + if [ ! -z "${EXTRA_QMAKEVARS_POST}" ]; then + AFTER="-after" + QMAKE_VARSUBST_POST="${EXTRA_QMAKEVARS_POST}" + oenote "qmake postvar substitution: ${EXTRA_QMAKEVARS_POST}" + fi + + if [ ! -z "${EXTRA_QMAKEVARS_PRE}" ]; then + QMAKE_VARSUBST_PRE="${EXTRA_QMAKEVARS_PRE}" + oenote "qmake prevar substitution: ${EXTRA_QMAKEVARS_PRE}" + fi + +#oenote "Calling 'qmake -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST'" + unset QMAKESPEC || true + qmake -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling qmake on $PROFILES" +} + +EXPORT_FUNCTIONS do_configure + +addtask configure after do_unpack do_patch before do_compile diff --git a/openembedded/classes/qpf.bbclass b/openembedded/classes/qpf.bbclass new file mode 100644 index 0000000000..d6e58871d5 --- /dev/null +++ b/openembedded/classes/qpf.bbclass @@ -0,0 +1,36 @@ +PACKAGE_ARCH = "all" + +do_configure() { + : +} + +do_compile() { + : +} + +pkg_postinst_fonts() { +#!/bin/sh +set -e +. /etc/profile +${sbindir}/update-qtfontdir +} + +pkg_postrm_fonts() { +#!/bin/sh +set -e +. /etc/profile +${sbindir}/update-qtfontdir -f +} + +python populate_packages_prepend() { + postinst = bb.data.getVar('pkg_postinst_fonts', d, 1) + postrm = bb.data.getVar('pkg_postrm_fonts', d, 1) + fontdir = bb.data.getVar('palmtopdir', d, 1) + '/lib/fonts' + pkgregex = "^([a-z-]*_[0-9]*).*.qpf$" + pkgpattern = bb.data.getVar('QPF_PKGPATTERN', d, 1) or 'qpf-%s' + pkgdescription = bb.data.getVar('QPF_DESCRIPTION', d, 1) or 'QPF font %s' + + do_split_packages(d, root=fontdir, file_regex=pkgregex, output_pattern=pkgpattern, + description=pkgdescription, postinst=postinst, postrm=postrm, recursive=True, hook=None, + extra_depends='qpf-font-common') +} diff --git a/openembedded/classes/qt3e.bbclass b/openembedded/classes/qt3e.bbclass new file mode 100644 index 0000000000..c34d7c04f5 --- /dev/null +++ b/openembedded/classes/qt3e.bbclass @@ -0,0 +1,11 @@ +# +# override variables set by qmake-base to compile Qt/X11 apps +# +export QTDIR="${STAGING_DIR}/${HOST_SYS}/qte3" +export QTEDIR="${STAGING_DIR}/${HOST_SYS}/qte3" +export OE_QMAKE_UIC="${STAGING_BINDIR}/uic3" +export OE_QMAKE_MOC="${STAGING_BINDIR}/moc3" +export OE_QMAKE_CXXFLAGS="${CXXFLAGS} " +export OE_QMAKE_INCDIR_QT="${QTEDIR}/include" +export OE_QMAKE_LIBDIR_QT="${QTEDIR}/lib" +export OE_QMAKE_LIBS_QT="qte" diff --git a/openembedded/classes/qt3x11.bbclass b/openembedded/classes/qt3x11.bbclass new file mode 100644 index 0000000000..09b9cbac96 --- /dev/null +++ b/openembedded/classes/qt3x11.bbclass @@ -0,0 +1,11 @@ +# +# override variables set by qmake-base to compile Qt/X11 apps +# +export QTDIR="${STAGING_DIR}/${HOST_SYS}/qt3" +export OE_QMAKE_UIC="${STAGING_BINDIR}/uic3" +export OE_QMAKE_MOC="${STAGING_BINDIR}/moc3" +export OE_QMAKE_CXXFLAGS="${CXXFLAGS} -DQT_NO_XIM" +export OE_QMAKE_INCDIR_QT="${QTDIR}/include" +export OE_QMAKE_LIBDIR_QT="${QTDIR}/lib" +export OE_QMAKE_LIBS_QT="qt" +export OE_QMAKE_LIBS_X11="-lXext -lX11 -lm" diff --git a/openembedded/classes/qt4x11.bbclass b/openembedded/classes/qt4x11.bbclass new file mode 100644 index 0000000000..d4ca0073df --- /dev/null +++ b/openembedded/classes/qt4x11.bbclass @@ -0,0 +1,11 @@ +# +# override variables set by qmake-base to compile Qt/X11 apps +# +export QTDIR="${STAGING_DIR}/${HOST_SYS}/qt4" +export OE_QMAKE_UIC="${STAGING_BINDIR}/uic4" +export OE_QMAKE_MOC="${STAGING_BINDIR}/moc4" +export OE_QMAKE_CXXFLAGS="${CXXFLAGS}" +export OE_QMAKE_INCDIR_QT="${QTDIR}/include" +export OE_QMAKE_LIBDIR_QT="${QTDIR}/lib" +export OE_QMAKE_LIBS_QT="qt" +export OE_QMAKE_LIBS_X11="-lXext -lX11 -lm" diff --git a/openembedded/classes/rm_work.bbclass b/openembedded/classes/rm_work.bbclass new file mode 100644 index 0000000000..340446917e --- /dev/null +++ b/openembedded/classes/rm_work.bbclass @@ -0,0 +1,22 @@ +# +# Removes source after build +# +# To use it add that line to conf/local.conf: +# +# INHERIT += "rm_work" +# + +do_rm_work () { + cd ${WORKDIR} + for dir in * + do + if [ `basename ${S}` == $dir ]; then + rm -rf $dir/* + elif [ $dir != 'temp' ]; then + rm -rf $dir + fi + done +} + +addtask rm_work before do_build +addtask rm_work after do_package diff --git a/openembedded/classes/rootfs_ipk.bbclass b/openembedded/classes/rootfs_ipk.bbclass new file mode 100644 index 0000000000..062c957359 --- /dev/null +++ b/openembedded/classes/rootfs_ipk.bbclass @@ -0,0 +1,136 @@ +# +# Creates a root filesystem out of IPKs +# +# This rootfs can be mounted via root-nfs or it can be put into an cramfs/jffs etc. +# See image_ipk.oeclass for a usage of this. +# + +DEPENDS_prepend="ipkg-native ipkg-utils-native fakeroot-native " +DEPENDS_append=" ${EXTRA_IMAGEDEPENDS}" + +PACKAGES = "" + +do_rootfs[nostamp] = 1 +do_rootfs[dirs] = ${TOPDIR} +do_build[nostamp] = 1 + +IPKG_ARGS = "-f ${T}/ipkg.conf -o ${IMAGE_ROOTFS}" + +ROOTFS_POSTPROCESS_COMMAND ?= "" + +PID = "${@os.getpid()}" + +# some default locales +IMAGE_LINGUAS ?= "de-de fr-fr en-gb" + +LINGUAS_INSTALL = "${@" ".join(map(lambda s: "locale-base-%s" % s, bb.data.getVar('IMAGE_LINGUAS', d, 1).split()))}" + +real_do_rootfs () { + set -x + + mkdir -p ${IMAGE_ROOTFS}/dev + + if [ -z "${DEPLOY_KEEP_PACKAGES}" ]; then + rm -f ${DEPLOY_DIR_IPK}/Packages + touch ${DEPLOY_DIR_IPK}/Packages + ipkg-make-index -r ${DEPLOY_DIR_IPK}/Packages -p ${DEPLOY_DIR_IPK}/Packages -l ${DEPLOY_DIR_IPK}/Packages.filelist -m ${DEPLOY_DIR_IPK} + fi + mkdir -p ${T} + echo "src oe file:${DEPLOY_DIR_IPK}" > ${T}/ipkg.conf + ipkgarchs="all any noarch ${TARGET_ARCH} ${IPKG_ARCHS} ${MACHINE}" + priority=1 + for arch in $ipkgarchs; do + echo "arch $arch $priority" >> ${T}/ipkg.conf + priority=$(expr $priority + 5) + done + ipkg-cl ${IPKG_ARGS} update + if [ ! -z "${LINGUAS_INSTALL}" ]; then + ipkg-cl ${IPKG_ARGS} install glibc-localedata-i18n + for i in ${LINGUAS_INSTALL}; do + ipkg-cl ${IPKG_ARGS} install $i + done + fi + if [ ! -z "${IPKG_INSTALL}" ]; then + ipkg-cl ${IPKG_ARGS} install ${IPKG_INSTALL} + fi + + export D=${IMAGE_ROOTFS} + export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS} + mkdir -p ${IMAGE_ROOTFS}/etc/ipkg/ + grep "^arch" ${T}/ipkg.conf >${IMAGE_ROOTFS}/etc/ipkg/arch.conf + + for i in ${IMAGE_ROOTFS}${libdir}/ipkg/info/*.preinst; do + if [ -f $i ] && ! sh $i; then + ipkg-cl ${IPKG_ARGS} flag unpacked `basename $i .preinst` + fi + done + for i in ${IMAGE_ROOTFS}${libdir}/ipkg/info/*.postinst; do + if [ -f $i ] && ! sh $i configure; then + ipkg-cl ${IPKG_ARGS} flag unpacked `basename $i .postinst` + fi + done + + install -d ${IMAGE_ROOTFS}/${sysconfdir} + echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version + + ${ROOTFS_POSTPROCESS_COMMAND} + + log_check rootfs +} + +log_check() { + set +x + for target in $* + do + lf_path="${WORKDIR}/temp/log.do_$target.${PID}" + + echo "log_check: Using $lf_path as logfile" + + if test -e "$lf_path" + then + lf_txt="`cat $lf_path`" + + for keyword_die in "Cannot find package" "exit 1" ERR Fail + do + + if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") &>/dev/null + then + echo "log_check: There were error messages in the logfile" + echo -e "log_check: Matched keyword: [$keyword_die]\n" + echo "$lf_txt" | grep -v log_check | grep -i "$keyword_die" + echo "" + do_exit=1 + fi + done + test "$do_exit" = 1 && exit 1 + else + echo "Cannot find logfile [$lf_path]" + fi + echo "Logfile is clean" + done + + set -x + +} + +fakeroot do_rootfs () { + rm -rf ${IMAGE_ROOTFS} + real_do_rootfs +} + +# set '*' as the rootpassword so the images +# can decide if they want it or not + +zap_root_password () { + sed 's%^root:[^:]*:%root:*:%' < ${IMAGE_ROOTFS}/etc/passwd >${IMAGE_ROOTFS}/etc/passwd.new + mv ${IMAGE_ROOTFS}/etc/passwd.new ${IMAGE_ROOTFS}/etc/passwd +} + +create_etc_timestamp() { + date +%2m%2d%2H%2M%Y >${IMAGE_ROOTFS}/etc/timestamp +} + +# export the zap_root_password and create_etc_timestamp +EXPORT_FUNCTIONS zap_root_password create_etc_timestamp + +addtask rootfs before do_build after do_install diff --git a/openembedded/classes/rpm_core.bbclass b/openembedded/classes/rpm_core.bbclass new file mode 100644 index 0000000000..f28abbb1c3 --- /dev/null +++ b/openembedded/classes/rpm_core.bbclass @@ -0,0 +1,16 @@ +RPMBUILDPATH="${WORKDIR}/rpm" + +RPMOPTS="--rcfile=${WORKDIR}/rpmrc" +RPMOPTS="--rcfile=${WORKDIR}/rpmrc --target ${TARGET_SYS}" +RPM="rpm ${RPMOPTS}" +RPMBUILD="rpmbuild --buildroot ${D} --short-circuit ${RPMOPTS}" + +rpm_core_do_preprpm() { + mkdir -p ${RPMBUILDPATH}/{SPECS,RPMS/{i386,i586,i686,noarch,ppc,mips,mipsel,arm},SRPMS,SOURCES,BUILD} + echo 'macrofiles:/usr/lib/rpm/macros:${WORKDIR}/macros' > ${WORKDIR}/rpmrc + echo '%_topdir ${RPMBUILDPATH}' > ${WORKDIR}/macros + echo '%_repackage_dir ${WORKDIR}' >> ${WORKDIR}/macros +} + +EXPORT_FUNCTIONS do_preprpm +addtask preprpm before do_fetch diff --git a/openembedded/classes/scons.bbclass b/openembedded/classes/scons.bbclass new file mode 100644 index 0000000000..3160eca69a --- /dev/null +++ b/openembedded/classes/scons.bbclass @@ -0,0 +1,13 @@ +DEPENDS += "python-scons-native" + +scons_do_compile() { + ${STAGING_BINDIR}/scons || \ + oefatal "scons build execution failed." +} + +scons_do_install() { + ${STAGING_BINDIR}/scons install || \ + oefatal "scons install execution failed." +} + +EXPORT_FUNCTIONS do_compile do_install diff --git a/openembedded/classes/sdk.bbclass b/openembedded/classes/sdk.bbclass new file mode 100644 index 0000000000..bd49c51225 --- /dev/null +++ b/openembedded/classes/sdk.bbclass @@ -0,0 +1,22 @@ +# SDK packages are built either explicitly by the user, +# or indirectly via dependency. No need to be in 'world'. +EXCLUDE_FROM_WORLD = "1" + +SDK_NAME = "${TARGET_ARCH}/oe" +PACKAGE_ARCH = "${BUILD_ARCH}" + +HOST_ARCH = "${BUILD_ARCH}" +HOST_VENDOR = "${BUILD_VENDOR}" +HOST_OS = "${BUILD_OS}" +HOST_PREFIX = "${BUILD_PREFIX}" +HOST_CC_ARCH = "${BUILD_CC_ARCH}" + +export CPPFLAGS = "${BUILD_CPPFLAGS}" +export CFLAGS = "${BUILD_CFLAGS}" +export CXXFLAGS = "${BUILD_CFLAGS}" +export LDFLAGS = "${BUILD_LDFLAGS}" + +prefix = "/usr/local/${SDK_NAME}" +exec_prefix = "${prefix}" + +FILES_${PN} = "${prefix}" diff --git a/openembedded/classes/sdl.bbclass b/openembedded/classes/sdl.bbclass new file mode 100644 index 0000000000..541812ed93 --- /dev/null +++ b/openembedded/classes/sdl.bbclass @@ -0,0 +1,27 @@ +FILES_${PN} += '${libdir}/perl5' + +sdl_do_configure () { + if [ -x ${S}/configure ] ; then + cfgcmd="${S}/configure \ + -GL -GLU" + oenote "Running $cfgcmd..." + $cfgcmd || oefatal "oe_runconf failed" + if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then + . ${STAGING_DIR}/${TARGET_SYS}/perl/config.sh + sed -e "s:\(SITELIBEXP = \).*:\1${sitelibexp}:; s:\(SITEARCHEXP = \).*:\1${sitearchexp}:; s:\(INSTALLVENDORLIB = \).*:\1${D}${libdir}/perl5:; s:\(INSTALLVENDORARCH = \).*:\1${D}${libdir}/perl5:" < Makefile > Makefile.new + mv Makefile.new Makefile + fi + else + oefatal "no configure script found" + fi +} + +sdl_do_compile () { + oe_runmake PASTHRU_INC="${CFLAGS}" +} + +sdl_do_install () { + oe_runmake install_vendor +} + +EXPORT_FUNCTIONS do_configure do_compile do_install diff --git a/openembedded/classes/sip.bbclass b/openembedded/classes/sip.bbclass new file mode 100644 index 0000000000..7e049bc65a --- /dev/null +++ b/openembedded/classes/sip.bbclass @@ -0,0 +1,53 @@ +DEPENDS_prepend = "sip-native python-sip " + +#EXTRA_SIPTAGS = "-tWS_QWS -tQtPE_1_6_0 -tQt_2_3_1" + +sip_do_generate() { + if [ -z "${SIP_MODULES}" ]; then + MODULES="`ls sip/*mod.sip`" + else + MODULES="${SIP_MODULES}" + fi + + if [ -z "$MODULES" ]; then + die "SIP_MODULES not set and no modules found in $PWD" + else + oenote "using modules '${SIP_MODULES}' and tags '${EXTRA_SIPTAGS}'" + fi + + if [ -z "${EXTRA_SIPTAGS}" ]; then + die "EXTRA_SIPTAGS needs to be set!" + else + SIPTAGS="${EXTRA_SIPTAGS}" + fi + + if [ ! -z "${SIP_FEATURES}" ]; then + FEATURES="-z ${SIP_FEATURES}" + oenote "sip feature file: ${SIP_FEATURES}" + fi + + for module in $MODULES + do + install -d ${module}/ + oenote "calling 'sip -I sip -I ${STAGING_SIPDIR} ${SIPTAGS} ${FEATURES} -c ${module} -b ${module}/${module}.pro.in sip/${module}/${module}mod.sip'" + sip -I ${STAGING_SIPDIR} -I sip ${SIPTAGS} ${FEATURES} -c ${module} -b ${module}/${module}.sbf sip/${module}/${module}mod.sip \ + || die "Error calling sip on ${module}" + cat ${module}/${module}.sbf | sed s,target,TARGET, \ + | sed s,sources,SOURCES, \ + | sed s,headers,HEADERS, \ + | sed s,"moc_HEADERS =","HEADERS +=", \ + >${module}/${module}.pro + echo "TEMPLATE=lib" >>${module}/${module}.pro + [ "${module}" = "qt" ] && echo "" >>${module}/${module}.pro + [ "${module}" = "qtcanvas" ] && echo "" >>${module}/${module}.pro + [ "${module}" = "qttable" ] && echo "" >>${module}/${module}.pro + [ "${module}" = "qwt" ] && echo "" >>${module}/${module}.pro + [ "${module}" = "qtpe" ] && echo "" >>${module}/${module}.pro + [ "${module}" = "qtpe" ] && echo "LIBS+=-lqpe" >>${module}/${module}.pro + true + done +} + +EXPORT_FUNCTIONS do_generate + +addtask generate after do_unpack do_patch before do_configure diff --git a/openembedded/classes/sourcepkg.bbclass b/openembedded/classes/sourcepkg.bbclass new file mode 100644 index 0000000000..ee022c99d2 --- /dev/null +++ b/openembedded/classes/sourcepkg.bbclass @@ -0,0 +1,111 @@ +DEPLOY_DIR_SRC ?= "${DEPLOY_DIR}/source" +EXCLUDE_FROM ?= ".pc" + +# used as part of a path. make sure it's set +DISTRO ?= "openembedded" + +def get_src_tree(d): + import bb + import os, os.path + + workdir = bb.data.getVar('WORKDIR', d, 1) + if not workdir: + bb.error("WORKDIR not defined, unable to find source tree.") + return + + s = bb.data.getVar('S', d, 0) + if not s: + bb.error("S not defined, unable to find source tree.") + return + + s_tree_raw = s.split('/')[1] + s_tree = bb.data.expand(s_tree_raw, d) + + src_tree_path = os.path.join(workdir, s_tree) + try: + os.listdir(src_tree_path) + except OSError: + bb.fatal("Expected to find source tree in '%s' which doesn't exist." % src_tree_path) + bb.debug("Assuming source tree is '%s'" % src_tree_path) + + return s_tree + +sourcepkg_do_create_orig_tgz(){ + + mkdir -p ${DEPLOY_DIR_SRC} + cd ${WORKDIR} + for i in ${EXCLUDE_FROM}; do + echo $i >> temp/exclude-from-file + done + + src_tree=${@get_src_tree(d)} + + echo $src_tree + oenote "Creating .orig.tar.gz in ${DEPLOY_DIR_SRC}/${P}.orig.tar.gz" + tar cvzf ${DEPLOY_DIR_SRC}/${P}.orig.tar.gz $src_tree --exclude-from temp/exclude-from-file + cp -a $src_tree $src_tree.orig +} + +sourcepkg_do_archive_bb() { + + src_tree=${@get_src_tree(d)} + dest=${WORKDIR}/$src_tree/${DISTRO} + mkdir -p $dest + + cp ${FILE} $dest +} + +python sourcepkg_do_dumpdata() { + import os + import os.path + + workdir = bb.data.getVar('WORKDIR', d, 1) + distro = bb.data.getVar('DISTRO', d, 1) + s_tree = get_src_tree(d) + openembeddeddir = os.path.join(workdir, s_tree, distro) + dumpfile = os.path.join(openembeddeddir, bb.data.expand("${P}-${PR}.showdata.dump",d)) + + try: + os.mkdir(openembeddeddir) + except OSError: + # dir exists + pass + + bb.note("Dumping metadata into '%s'" % dumpfile) + f = open(dumpfile, "w") + # emit variables and shell functions + bb.data.emit_env(f, d, True) + # emit the metadata which isnt valid shell + for e in d.keys(): + if bb.data.getVarFlag(e, 'python', d): + f.write("\npython %s () {\n%s}\n" % (e, bb.data.getVar(e, d, 1))) + f.close() +} + +sourcepkg_do_create_diff_gz(){ + + cd ${WORKDIR} + for i in ${EXCLUDE_FROM}; do + echo $i >> temp/exclude-from-file + done + + + src_tree=${@get_src_tree(d)} + + for i in `find . -maxdepth 1 -type f`; do + mkdir -p $src_tree/${DISTRO}/files + cp $i $src_tree/${DISTRO}/files + done + + oenote "Creating .diff.gz in ${DEPLOY_DIR_SRC}/${P}-${PR}.diff.gz" + LC_ALL=C TZ=UTC0 diff --exclude-from=temp/exclude-from-file -Naur $src_tree.orig $src_tree | gzip -c > ${DEPLOY_DIR_SRC}/${P}-${PR}.diff.gz + rm -rf $src_tree.orig +} + +EXPORT_FUNCTIONS do_create_orig_tgz do_archive_bb do_dumpdata do_create_diff_gz + +addtask create_orig_tgz after do_unpack before do_patch +addtask archive_bb after do_patch before do_dumpdata +addtask dumpdata after archive_bb before do_create_diff_gz +addtask create_diff_gz after do_dump_data before do_configure + diff --git a/openembedded/classes/src_distribute.bbclass b/openembedded/classes/src_distribute.bbclass new file mode 100644 index 0000000000..5daf526018 --- /dev/null +++ b/openembedded/classes/src_distribute.bbclass @@ -0,0 +1,40 @@ +include conf/licenses.conf + +SRC_DISTRIBUTECOMMAND[func] = "1" +python do_distribute_sources () { + l = bb.data.createCopy(d) + bb.data.update_data(l) + licenses = (bb.data.getVar('LICENSE', d, 1) or "").split() + if not licenses: + bb.note("LICENSE not defined") + src_distribute_licenses = (bb.data.getVar('SRC_DISTRIBUTE_LICENSES', d, 1) or "").split() + # Explanation: + # Space seperated items in LICENSE must *all* be distributable + # Each space seperated item may be used under any number of | seperated licenses. + # If any of those | seperated licenses are distributable, then that component is. + # i.e. LICENSE = "GPL LGPL" + # In this case, both components are distributable. + # LICENSE = "GPL|QPL|Proprietary" + # In this case, GPL is distributable, so the component is. + valid = 1 + for l in licenses: + lvalid = 0 + for i in l.split("|"): + if i in src_distribute_licenses: + lvalid = 1 + if lvalid != 1: + valid = 0 + if valid == 0: + bb.note("Licenses (%s) are not all listed in SRC_DISTRIBUTE_LICENSES, skipping source distribution" % licenses) + return + import re + for s in (bb.data.getVar('A', d, 1) or "").split(): + s = re.sub(';.*$', '', s) + cmd = bb.data.getVar('SRC_DISTRIBUTECOMMAND', d, 1) + if not cmd: + raise bb.build.FuncFailed("Unable to distribute sources, SRC_DISTRIBUTECOMMAND not defined") + bb.data.setVar('SRC', s, d) + bb.build.exec_func('SRC_DISTRIBUTECOMMAND', d) +} + +addtask distribute_sources before do_build after do_fetch diff --git a/openembedded/classes/src_distribute_local.bbclass b/openembedded/classes/src_distribute_local.bbclass new file mode 100644 index 0000000000..5f0cef5bec --- /dev/null +++ b/openembedded/classes/src_distribute_local.bbclass @@ -0,0 +1,31 @@ +inherit src_distribute + +# SRC_DIST_LOCAL possible values: +# copy copies the files from ${A} to the distributedir +# symlink symlinks the files from ${A} to the distributedir +# move+symlink moves the files into distributedir, and symlinks them back +SRC_DIST_LOCAL ?= "move+symlink" +SRC_DISTRIBUTEDIR ?= "${DEPLOY_DIR}/sources" +SRC_DISTRIBUTECOMMAND () { + s="${SRC}" + if [ ! -L "$s" ] && (echo "$s"|grep "^${DL_DIR}"); then + : + else + exit 0; + fi + mkdir -p ${SRC_DISTRIBUTEDIR} + case "${SRC_DIST_LOCAL}" in + copy) + test -e $s.md5 && cp -f $s.md5 ${SRC_DISTRIBUTEDIR}/ + cp -f $s ${SRC_DISTRIBUTEDIR}/ + ;; + symlink) + test -e $s.md5 && ln -sf $s.md5 ${SRC_DISTRIBUTEDIR}/ + ln -sf $s ${SRC_DISTRIBUTEDIR}/ + ;; + move+symlink) + mv $s ${SRC_DISTRIBUTEDIR}/ + ln -sf ${SRC_DISTRIBUTEDIR}/`basename $s` $s + ;; + esac +} diff --git a/openembedded/classes/srec.bbclass b/openembedded/classes/srec.bbclass new file mode 100644 index 0000000000..ae46a407fe --- /dev/null +++ b/openembedded/classes/srec.bbclass @@ -0,0 +1,26 @@ +# +# Creates .srec files from images. +# +# Useful for loading with Yamon. + +# Define SREC_VMAADDR in your machine.conf. + +SREC_CMD = "${TARGET_PREFIX}objcopy -O srec -I binary --adjust-vma ${SREC_VMAADDR} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.${type} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.${type}.srec" + +# Do not build srec files for these types of images: +SREC_SKIP = "tar" + +do_srec () { + if [ ${SREC_VMAADDR} = "" ] ; then + oefatal Cannot do_srec without SREC_VMAADDR defined. + fi + for type in ${IMAGE_FSTYPES}; do + for skiptype in ${SREC_SKIP}; do + if [ $type = $skiptype ] ; then continue 2 ; fi + done + ${SREC_CMD} + done + return 0 +} + +addtask srec after do_rootfs before do_build diff --git a/openembedded/classes/tinderclient.bbclass b/openembedded/classes/tinderclient.bbclass new file mode 100644 index 0000000000..290166bb03 --- /dev/null +++ b/openembedded/classes/tinderclient.bbclass @@ -0,0 +1,158 @@ +def tinder_tz_offset(off): + # get the offset.n minutes Either it is a number like + # +200 or -300 + try: + return int(off) + except ValueError: + if off == "Europe/Berlin": + return 120 + else: + return 0 + +def tinder_tinder_time(offset): + import datetime + td = datetime.timedelta(minutes=tinder_tz_offset(offset)) + time = datetime.datetime.utcnow() + td + return time.strftime('%m/%d/%Y %H:%M:%S') + +def tinder_tinder_start(date,offset): + import datetime, time + td = datetime.timedelta(minutes=tinder_tz_offset(offset)) + ti = time.strptime(date, "%m/%d/%Y %H:%M:%S") + time = datetime.datetime(*ti[0:7])+td + return time.strftime('%m/%d/%Y %H:%M:%S') + +def tinder_send_email(da, header, log): + import smtplib + from bb import data + from email.MIMEText import MIMEText + msg = MIMEText(header +'\n' + log) + msg['Subject'] = data.getVar('TINDER_SUBJECT',da, True) or "Tinder-Client build log" + msg['To'] = data.getVar('TINDER_MAILTO' ,da, True) + msg['From'] = data.getVar('TINDER_FROM', da, True) + + + s = smtplib.SMTP() + s.connect() + s.sendmail(data.getVar('TINDER_FROM', da, True), [data.getVar('TINDER_MAILTO', da, True)], msg.as_string()) + s.close() + +def tinder_send_http(da, header, log): + from bb import data + import httplib, urllib + cont = "\n%s\n%s" % ( header, log) + headers = {"Content-type": "multipart/form-data" } + + conn = httplib.HTTPConnection(data.getVar('TINDER_HOST',da, True)) + conn.request("POST", data.getVar('TINDER_URL',da,True), cont, headers) + conn.close() + + +# Prepare tinderbox mail header +def tinder_prepare_mail_header(da, status): + from bb import data + + str = "tinderbox: administrator: %s\n" % data.getVar('TINDER_ADMIN', da, True) + str += "tinderbox: starttime: %s\n" % tinder_tinder_start(data.getVar('TINDER_START', da, True) or data.getVar('BUILDSTART', da, True), data.getVar('TINDER_TZ', da, True)) + str += "tinderbox: buildname: %s\n" % data.getVar('TINDER_BUILD', da, True) + str += "tinderbox: errorparser: %s\n" % data.getVar('TINDER_ERROR', da, True) + str += "tinderbox: status: %s\n" % status + str += "tinderbox: timenow: %s\n" % tinder_tinder_time(data.getVar('TINDER_TZ', da, True)) + str += "tinderbox: tree: %s\n" % data.getVar('TINDER_TREE', da, True) + str += "tinderbox: buildfamily: %s\n" % "unix" + str += "tinderbox: END" + + return str + +def tinder_do_tinder_report(event): + """ + Report to the tinderbox. Either we will report every step + (depending on TINDER_VERBOSE_REPORT) at the end we will send the + tinderclient.log + """ + from bb.event import getName + from bb import data, mkdirhier + import os, glob + + # variables + name = getName(event) + log = "" + header = "" + verbose = data.getVar('TINDER_VERBOSE_REPORT', event.data, True) == "1" + + # Check what we need to do Build* shows we start or are done + if name == "BuildStarted": + header = tinder_prepare_mail_header(event.data, 'building') + # generate + for var in os.environ: + log += "%s=%s\n" % (var, os.environ[var]) + + mkdirhier(data.getVar('TMPDIR', event.data, True)) + file = open(data.getVar('TINDER_LOG', event.data, True), 'w') + file.write(log) + + if not verbose: + header = "" + + if name == "PkgFailed" or name == "BuildCompleted": + status = 'build_failed' + if name == "BuildCompleted": + status = "success" + header = tinder_prepare_mail_header(event.data, status) + # append the log + log_file = data.getVar('TINDER_LOG', event.data, True) + file = open(log_file, 'r') + for line in file.readlines(): + log += line + + if verbose and name == "TaskStarted": + header = tinder_prepare_mail_header(event.data, 'building') + log = "Task %s started" % event.task + + if verbose and name == "PkgStarted": + header = tinder_prepare_mail_header(event.data, 'building') + log = "Package %s started" % data.getVar('P', event.data, True) + + if verbose and name == "PkgSucceeded": + header = tinder_prepare_mail_header(event.data, 'building') + log = "Package %s done" % data.getVar('P', event.data, True) + + # Append the Task Log + if name == "TaskSucceeded" or name == "TaskFailed": + log_file = glob.glob("%s/log.%s.*" % (data.getVar('T', event.data, True), event.task)) + + if len(log_file) != 0: + to_file = data.getVar('TINDER_LOG', event.data, True) + log_txt = open(log_file[0], 'r').readlines() + to_file = open(to_file, 'a') + + to_file.writelines(log_txt) + + # append to the log + if verbose: + header = tinder_prepare_mail_header(event.data, 'building') + for line in log_txt: + log += line + + # now mail the log + if len(log) == 0 or len(header) == 0: + return + + log_post_method = tinder_send_email + if data.getVar('TINDER_SENDLOG', event.data, True) == "http": + log_post_method = tinder_send_http + + log_post_method(event.data, header, log) + + +addhandler tinderclient_eventhandler +python tinderclient_eventhandler() { + from bb import note, error, data + from bb.event import NotHandled + + do_tinder_report = data.getVar('TINDER_REPORT', e.data, True) + if do_tinder_report and do_tinder_report == "1": + tinder_do_tinder_report(e) + + return NotHandled +} diff --git a/openembedded/classes/tmake.bbclass b/openembedded/classes/tmake.bbclass new file mode 100644 index 0000000000..05b82e496d --- /dev/null +++ b/openembedded/classes/tmake.bbclass @@ -0,0 +1,77 @@ +DEPENDS_prepend="tmake " + +python tmake_do_createpro() { + import glob, sys + from bb import note + out_vartranslate = { + "TMAKE_HEADERS": "HEADERS", + "TMAKE_INTERFACES": "INTERFACES", + "TMAKE_TEMPLATE": "TEMPLATE", + "TMAKE_CONFIG": "CONFIG", + "TMAKE_DESTDIR": "DESTDIR", + "TMAKE_SOURCES": "SOURCES", + "TMAKE_DEPENDPATH": "DEPENDPATH", + "TMAKE_INCLUDEPATH": "INCLUDEPATH", + "TMAKE_TARGET": "TARGET", + "TMAKE_LIBS": "LIBS", + } + s = data.getVar('S', d, 1) or "" + os.chdir(s) + profiles = (data.getVar('TMAKE_PROFILES', d, 1) or "").split() + if not profiles: + profiles = ["*.pro"] + for pro in profiles: + ppro = glob.glob(pro) + if ppro: + if ppro != [pro]: + del profiles[profiles.index(pro)] + profiles += ppro + continue + if ppro[0].find('*'): + del profiles[profiles.index(pro)] + continue + else: + del profiles[profiles.index(pro)] + if len(profiles) != 0: + return + + # output .pro using this metadata store + try: + from __builtin__ import file + profile = file(data.expand('${PN}.pro', d), 'w') + except OSError: + raise FuncFailed("unable to open pro file for writing.") + +# fd = sys.__stdout__ + fd = profile + for var in out_vartranslate.keys(): + val = data.getVar(var, d, 1) + if val: + fd.write("%s\t: %s\n" % (out_vartranslate[var], val)) + +# if fd is not sys.__stdout__: + fd.close() +} + +tmake_do_configure() { + paths="${STAGING_DATADIR}/tmake/qws/${TARGET_OS}-${TARGET_ARCH}-g++ $STAGING_DIR/share/tmake/$OS-g++" + if (echo "${TARGET_ARCH}"|grep -q 'i.86'); then + paths="${STAGING_DATADIR}/tmake/qws/${TARGET_OS}-x86-g++ $paths" + fi + for i in $paths; do + if test -e $i; then + export TMAKEPATH=$i + break + fi + done + + if [ -z "${TMAKE_PROFILES}" ]; then + TMAKE_PROFILES="`ls *.pro`" + fi + tmake -o Makefile $TMAKE_PROFILES || die "Error calling tmake on ${TMAKE_PROFILES}" +} + +EXPORT_FUNCTIONS do_configure do_createpro + +addtask configure after do_unpack do_patch before do_compile +addtask createpro before do_configure after do_unpack do_patch diff --git a/openembedded/classes/update-alternatives.bbclass b/openembedded/classes/update-alternatives.bbclass new file mode 100644 index 0000000000..6b2b547d5f --- /dev/null +++ b/openembedded/classes/update-alternatives.bbclass @@ -0,0 +1,33 @@ +# defaults +ALTERNATIVE_PRIORITY = "10" +ALTERNATIVE_LINK = "${bindir}/${ALTERNATIVE_NAME}" + +update_alternatives_postinst() { +update-alternatives --install ${ALTERNATIVE_LINK} ${ALTERNATIVE_NAME} ${ALTERNATIVE_PATH} ${ALTERNATIVE_PRIORITY} +} + +update_alternatives_postrm() { +update-alternatives --remove ${ALTERNATIVE_NAME} ${ALTERNATIVE_PATH} +} + +python __anonymous() { + if bb.data.getVar('ALTERNATIVE_NAME', d) == None: + raise bb.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_NAME" % bb.data.getVar('FILE', d) + if bb.data.getVar('ALTERNATIVE_PATH', d) == None: + raise bb.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_PATH" % bb.data.getVar('FILE', d) +} + +python populate_packages_prepend () { + pkg = bb.data.getVar('PN', d, 1) + bb.note('adding update-alternatives calls to postinst/postrm for %s' % pkg) + postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1) or bb.data.getVar('pkg_postinst', d, 1) + if not postinst: + postinst = '#!/bin/sh\n' + postinst += bb.data.getVar('update_alternatives_postinst', d, 1) + bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d) + postrm = bb.data.getVar('pkg_postrm_%s' % pkg, d, 1) or bb.data.getVar('pkg_postrm', d, 1) + if not postrm: + postrm = '#!/bin/sh\n' + postrm += bb.data.getVar('update_alternatives_postrm', d, 1) + bb.data.setVar('pkg_postrm_%s' % pkg, postrm, d) +} diff --git a/openembedded/classes/update-rc.d.bbclass b/openembedded/classes/update-rc.d.bbclass new file mode 100644 index 0000000000..0bfba467c1 --- /dev/null +++ b/openembedded/classes/update-rc.d.bbclass @@ -0,0 +1,69 @@ +DEPENDS_append = " update-rc.d" +RDEPENDS_append = " update-rc.d" + +INITSCRIPT_PARAMS ?= "defaults" + +INIT_D_DIR = "${sysconfdir}/init.d" + +updatercd_postinst() { +if test "x$D" != "x"; then + D="-r $D" +else + D="-s" +fi +update-rc.d $D ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS} +} + +updatercd_prerm() { +if test "x$D" != "x"; then + D="-r $D" +else + ${INIT_D_DIR}/${INITSCRIPT_NAME} stop +fi +} + +updatercd_postrm() { +update-rc.d $D ${INITSCRIPT_NAME} remove +} + +python __anonymous() { + if bb.data.getVar('INITSCRIPT_PACKAGES', d) == None: + if bb.data.getVar('INITSCRIPT_NAME', d) == None: + raise bb.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_NAME" % bb.data.getVar('FILE', d) + if bb.data.getVar('INITSCRIPT_PARAMS', d) == None: + raise bb.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_PARAMS" % bb.data.getVar('FILE', d) +} + +python populate_packages_prepend () { + def update_rcd_package(pkg): + bb.debug(1, 'adding update-rc.d calls to postinst/postrm for %s' % pkg) + localdata = bb.data.createCopy(d) + overrides = bb.data.getVar("OVERRIDES", localdata, 1) + bb.data.setVar("OVERRIDES", "%s:%s" % (pkg, overrides), localdata) + bb.data.update_data(localdata) + + postinst = bb.data.getVar('pkg_postinst', localdata, 1) + if not postinst: + postinst = '#!/bin/sh\n' + postinst += bb.data.getVar('updatercd_postinst', localdata, 1) + bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d) + prerm = bb.data.getVar('pkg_prerm', localdata, 1) + if not prerm: + prerm = '#!/bin/sh\n' + prerm += bb.data.getVar('updatercd_prerm', localdata, 1) + bb.data.setVar('pkg_prerm_%s' % pkg, prerm, d) + postrm = bb.data.getVar('pkg_postrm', localdata, 1) + if not postrm: + postrm = '#!/bin/sh\n' + postrm += bb.data.getVar('updatercd_postrm', localdata, 1) + bb.data.setVar('pkg_postrm_%s' % pkg, postrm, d) + + pkgs = bb.data.getVar('INITSCRIPT_PACKAGES', d, 1) + if pkgs == None: + pkgs = bb.data.getVar('PN', d, 1) + packages = (bb.data.getVar('PACKAGES', d, 1) or "").split() + if not pkgs in packages and packages != []: + pkgs = packages[0] + for pkg in pkgs.split(): + update_rcd_package(pkg) +} diff --git a/openembedded/classes/wrt-image.bbclass b/openembedded/classes/wrt-image.bbclass new file mode 100644 index 0000000000..ba1163a719 --- /dev/null +++ b/openembedded/classes/wrt-image.bbclass @@ -0,0 +1,33 @@ +# we dont need the kernel in the image +ROOTFS_POSTPROCESS_COMMAND += "rm -f ${IMAGE_ROOTFS}/boot/zImage*" + +def wrt_get_kernel_version(d): + import bb + if bb.data.inherits_class('image_ipk', d): + skd = bb.data.getVar('STAGING_KERNEL_DIR', d, 1) + return base_read_file(skd+'/kernel-abiversion') + return "-no kernel version for available-" + +wrt_create_images() { + I=${DEPLOY_DIR}/images + KERNEL_VERSION="${@wrt_get_kernel_version(d)}" + + for type in ${IMAGE_FSTYPES}; do + # generic + trx -o ${I}/wrt-generic-${type}.trx ${I}/loader.gz \ + ${I}/wrt-kernel-${KERNEL_VERSION}.lzma -a 0x10000 ${I}/${IMAGE_NAME}.rootfs.${type} + + # WRT54GS + addpattern -2 -i ${I}/wrt-generic-${type}.trx -o ${I}/wrt54gs-${type}.trx -g + + # WRT54G + sed "1s,^W54S,W54G," ${I}/wrt54gs-${type}.trx > ${I}/wrt54g-${type}.trx + + # motorola + motorola-bin ${I}/wrt-generic-${type}.trx ${I}/motorola-${type}.bin + done; +} + +IMAGE_POSTPROCESS_COMMAND += "wrt_create_images;" + +DEPENDS_prepend = "${@["wrt-imagetools-native ", ""][(bb.data.getVar('PACKAGES', d, 1) == '')]}" \ No newline at end of file diff --git a/openembedded/classes/xfce.bbclass b/openembedded/classes/xfce.bbclass new file mode 100644 index 0000000000..793348597f --- /dev/null +++ b/openembedded/classes/xfce.bbclass @@ -0,0 +1,19 @@ +# xfce.oeclass +# Copyright (C) 2004, Advanced Micro Devices, Inc. All Rights Reserved +# Released under the MIT license (see packages/COPYING) + +# Global class to make it easier to maintain XFCE packages + +HOMEPAGE = "http://www.xfce.org" +LICENSE = "LGPL-2" + +SRC_URI = "http://www.us.xfce.org/archive/xfce-${PV}/src/${PN}-${PV}.tar.gz" + +inherit autotools + +EXTRA_OECONF += "--with-pluginsdir=${libdir}/xfce4/panel-plugins/" + +# FIXME: Put icons in their own package too? + +FILES_${PN} += "${datadir}/icons/* ${datadir}/applications/* ${libdir}/xfce4/modules/*.so*" +FILES_${PN}-doc += "${datadir}/xfce4/doc" diff --git a/openembedded/classes/xlibs.bbclass b/openembedded/classes/xlibs.bbclass new file mode 100644 index 0000000000..f9a1195663 --- /dev/null +++ b/openembedded/classes/xlibs.bbclass @@ -0,0 +1,15 @@ +LICENSE= "BSD-X" +SECTION = "x11/libs" + +XLIBS_CVS = "cvs://anoncvs:anoncvs@pdx.freedesktop.org/cvs/xlibs" + +inherit autotools pkgconfig + +do_stage() { + oe_runmake install prefix=${STAGING_DIR} \ + bindir=${STAGING_BINDIR} \ + includedir=${STAGING_INCDIR} \ + libdir=${STAGING_LIBDIR} \ + datadir=${STAGING_DATADIR} \ + mandir=${STAGING_DATADIR}/man +} diff --git a/openembedded/conf/bitbake.conf b/openembedded/conf/bitbake.conf new file mode 100644 index 0000000000..04603d393d --- /dev/null +++ b/openembedded/conf/bitbake.conf @@ -0,0 +1,381 @@ +################################################################## +# Standard target filesystem paths. +################################################################## + +# Path prefixes +export base_prefix = "" +export prefix = "/usr" +export exec_prefix = "${prefix}" + +# Base paths +export base_bindir = "${base_prefix}/bin" +export base_sbindir = "${base_prefix}/sbin" +export base_libdir = "${base_prefix}/lib" + +# Architecture independent paths +export datadir = "${prefix}/share" +export sysconfdir = "/etc" +export sharedstatedir = "${prefix}/com" +export localstatedir = "/var" +export infodir = "${datadir}/info" +export mandir = "${datadir}/man" +export docdir = "${datadir}/doc" +export servicedir = "/srv" + +# Architecture dependent paths +export bindir = "${exec_prefix}/bin" +export sbindir = "${exec_prefix}/sbin" +export libexecdir = "${exec_prefix}/libexec" +export libdir = "${exec_prefix}/lib" +export includedir = "${exec_prefix}/include" +export oldincludedir = "${exec_prefix}/include" + +################################################################## +# Architecture-dependent build variables. +################################################################## + +BUILD_ARCH = "${@os.uname()[4]}" +BUILD_OS = "${@os.uname()[0].lower()}" +BUILD_VENDOR = "" +BUILD_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}" +BUILD_PREFIX = "" +BUILD_CC_ARCH = "" + +HOST_ARCH = "${TARGET_ARCH}" +HOST_OS = "${TARGET_OS}" +HOST_VENDOR = "${TARGET_VENDOR}" +HOST_SYS = "${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}" +HOST_PREFIX = "${TARGET_PREFIX}" +HOST_CC_ARCH = "${TARGET_CC_ARCH}" + +TARGET_ARCH = "INVALID" +TARGET_OS = "INVALID" +TARGET_VENDOR = "${BUILD_VENDOR}" +TARGET_SYS = "${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}" +TARGET_PREFIX = "${TARGET_SYS}-" +TARGET_CC_ARCH = "" + +PACKAGE_ARCH = "${HOST_ARCH}" +MACHINE_ARCH = "${@[bb.data.getVar('HOST_ARCH', d, 1), bb.data.getVar('MACHINE', d, 1)][bool(bb.data.getVar('MACHINE', d, 1))]}" + +################################################################## +# Date/time variables. +################################################################## + +DATE := "${@time.strftime('%Y%m%d',time.gmtime())}" +TIME := "${@time.strftime('%H%M%S',time.gmtime())}" +DATETIME = "${DATE}${TIME}" + +################################################################## +# Package default variables. +################################################################## + +PN = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[0] or 'defaultpkgname'}" +PV = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[1] or '1.0'}" +PR = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[2] or 'r0'}" +PF = "${PN}-${PV}-${PR}" +P = "${PN}-${PV}" + +# Package info. + +SECTION = "base" +PRIORITY = "optional" +DESCRIPTION = "Version ${PV}-${PR} of package ${PN}" +LICENSE = "unknown" +MAINTAINER = "OpenEmbedded Team " +HOMEPAGE = "unknown" + +# Package dependencies and provides. + +DEPENDS = "" +RDEPENDS = "" +PROVIDES = "" +PROVIDES_prepend = "${P} ${PF} ${PN} " +RPROVIDES = "" + +PACKAGES = "${PN} ${PN}-doc ${PN}-dev ${PN}-locale" +FILES = "" +FILES_${PN} = "${bindir} ${sbindir} ${libexecdir} ${libdir}/lib*.so.* \ + ${sysconfdir} ${sharedstatedir} ${localstatedir} \ + /bin /sbin /lib/*.so* ${datadir}/${PN} ${libdir}/${PN} \ + ${datadir}/pixmaps ${datadir}/applications \ + ${datadir}/idl ${datadir}/omf ${datadir}/sounds \ + ${libdir}/bonobo/servers" +SECTION_${PN}-doc = "doc" +FILES_${PN}-doc = "${docdir} ${mandir} ${infodir} ${datadir}/gtk-doc \ + ${datadir}/gnome/help" +SECTION_${PN}-dev = "devel" +FILES_${PN}-dev = "${includedir} ${libdir}/lib*.so ${libdir}/*.la \ + ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig \ + /lib/*.a /lib/*.o ${datadir}/aclocal" +FILES_${PN}-locale = "${datadir}/locale" + +# File manifest + +export MANIFEST = "${FILESDIR}/manifest" + +FILE_DIRNAME = "${@os.path.dirname(bb.data.getVar('FILE', d))}" +FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}" +FILESDIR = "${@bb.which(bb.data.getVar('FILESPATH', d, 1), '.')}" + +################################################################## +# General work and output directories for the build system. +################################################################## + +TMPDIR = "${TOPDIR}/tmp" +CACHE = "${TMPDIR}/cache" +DL_DIR = "${TMPDIR}/downloads" +CVSDIR = "${DL_DIR}/cvs" + +STAMP = "${TMPDIR}/stamps/${PF}" +WORKDIR = "${TMPDIR}/work/${PF}" +T = "${WORKDIR}/temp" +D = "${WORKDIR}/image" +S = "${WORKDIR}/${P}" +B = "${S}" + +STAGING_DIR = "${TMPDIR}/staging" +STAGING_BINDIR = "${STAGING_DIR}/${BUILD_SYS}/bin" +STAGING_LIBDIR = "${STAGING_DIR}/${HOST_SYS}/lib" +STAGING_INCDIR = "${STAGING_DIR}/${HOST_SYS}/include" +STAGING_DATADIR = "${STAGING_DIR}/${HOST_SYS}/share" +STAGING_LOADER_DIR = "${STAGING_DIR}/${HOST_SYS}/loader" + +DEPLOY_DIR = "${TMPDIR}/deploy" +DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar" +DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk" +DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm" + +################################################################## +# Kernel info. +################################################################## + +OLDEST_KERNEL = "2.4.0" +STAGING_KERNEL_DIR = "${STAGING_DIR}/${HOST_SYS}/kernel" + +################################################################## +# Specific image creation and rootfs population info. +################################################################## + +DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images" +IMAGE_ROOTFS = "${TMPDIR}/rootfs" +IMAGE_BASENAME = "rootfs" +IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DATETIME}" +IMAGE_CMD = "" +IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime \ + --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \ + ${EXTRA_IMAGECMD}" +IMAGE_CMD_cramfs = "mkcramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}" +IMAGE_CMD_ext2 = "genext2fs -b ${IMAGE_ROOTFS_SIZE} -d ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2 ${EXTRA_IMAGECMD}" +IMAGE_CMD_ext2.gz = "mkdir ${DEPLOY_DIR_IMAGE}/tmp.gz; genext2fs -b ${IMAGE_ROOTFS_SIZE} -d ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2 ${EXTRA_IMAGECMD}; gzip -f -9 ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2; mv ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2.gz; rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz" +IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ${EXTRA_IMAGECMD} -noappend" +IMAGE_CMD_tar = "cd ${IMAGE_ROOTFS} && tar -jcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.bz2 ." +EXTRA_IMAGECMD = "" +EXTRA_IMAGECMD_jffs2 = "--pad --little-endian --eraseblock=0x40000" +EXTRA_IMAGECMD_squashfs = "-le -b 16384" +IMAGE_FSTYPE = "jffs2" +IMAGE_FSTYPES = "${IMAGE_FSTYPE}" +IMAGE_ROOTFS_SIZE_ext2 = "65536" +IMAGE_ROOTFS_SIZE_ext2.gz = "65536" + +IMAGE_DEPENDS = "" +IMAGE_DEPENDS_jffs2 = "mtd-utils-native" +IMAGE_DEPENDS_cramfs = "cramfs-native" +IMAGE_DEPENDS_ext2 = "genext2fs-native" +IMAGE_DEPENDS_ext2.gz = "genext2fs-native" +IMAGE_DEPENDS_squashfs = "squashfs-tools-native" +EXTRA_IMAGEDEPENDS = "" + +################################################################## +# Toolchain info. +################################################################## + +CROSS_DIR = "${TMPDIR}/cross" +CROSS_DATADIR = "${CROSS_DIR}/share" +export PATH_prepend = "${STAGING_BINDIR}/${HOST_SYS}:${STAGING_BINDIR}:${CROSS_DIR}/bin:" + +################################################################## +# Build utility info. +################################################################## + +CCACHE = "${@bb.which(bb.data.getVar('PATH', d), 'ccache') and 'ccache '}" + +export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}" +export CXX = "${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}" +export F77 = "${CCACHE}${HOST_PREFIX}g77 ${HOST_CC_ARCH}" +export CPP = "${HOST_PREFIX}gcc -E" +export LD = "${HOST_PREFIX}ld" +export CCLD = "${CC}" +export AR = "${HOST_PREFIX}ar" +export AS = "${HOST_PREFIX}as" +export RANLIB = "${HOST_PREFIX}ranlib" +export STRIP = "${HOST_PREFIX}strip" + +export BUILD_CC = "${CCACHE}${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}" +export BUILD_CXX = "${CCACHE}${BUILD_PREFIX}g++ ${BUILD_CC_ARCH}" +export BUILD_F77 = "${CCACHE}${BUILD_PREFIX}g77 ${BUILD_CC_ARCH}" +export BUILD_CPP = "${BUILD_PREFIX}cpp" +export BUILD_LD = "${BUILD_PREFIX}ld" +export BUILD_CCLD = "${BUILD_PREFIX}gcc" +export BUILD_AR = "${BUILD_PREFIX}ar" +export BUILD_RANLIB = "${BUILD_PREFIX}ranlib" +export BUILD_STRIP = "${BUILD_PREFIX}strip" + +export MAKE = "make" +EXTRA_OEMAKE = "-e MAKEFLAGS=" + +################################################################## +# Build flags and options. +################################################################## + +export BUILD_CPPFLAGS = "-I${STAGING_DIR}/${BUILD_SYS}/include" +export CPPFLAGS = "${TARGET_CPPFLAGS}" +export TARGET_CPPFLAGS = "-I${STAGING_DIR}/${TARGET_SYS}/include" + +export BUILD_CFLAGS = "${BUILD_CPPFLAGS} ${BUILD_OPTIMIZATION}" +export CFLAGS = "${TARGET_CFLAGS}" +export TARGET_CFLAGS = "${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION}" + +export BUILD_CXXFLAGS = "${BUILD_CFLAGS} -fpermissive" +export CXXFLAGS = "${TARGET_CXXFLAGS}" +export TARGET_CXXFLAGS = "${TARGET_CFLAGS} -fpermissive" + +export BUILD_LDFLAGS = "-L${STAGING_DIR}/${BUILD_SYS}/lib \ + -Wl,-rpath-link,${STAGING_DIR}/${BUILD_SYS}/lib \ + -Wl,-rpath,${STAGING_DIR}/${BUILD_SYS}/lib -Wl,-O1" +export LDFLAGS = "${TARGET_LDFLAGS}" +export TARGET_LDFLAGS = "-L${STAGING_DIR}/${TARGET_SYS}/lib \ + -Wl,-rpath-link,${STAGING_DIR}/${TARGET_SYS}/lib \ + -Wl,-O1" + +# Which flags to leave by strip-flags() in bin/build/oebuild.sh ? +ALLOWED_FLAGS = "-O -mcpu -march -pipe" + +# Pass parallel make options to the compile task only +EXTRA_OEMAKE_prepend_task_do_compile = "${PARALLEL_MAKE} " + +################################################################## +# Optimization flags. +################################################################## + +FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2" +DEBUG_OPTIMIZATION = "-O -g" +SELECTED_OPTIMIZATION = "${@bb.data.getVar(['FULL_OPTIMIZATION', 'DEBUG_OPTIMIZATION'][bb.data.getVar('DEBUG_BUILD', d, 1) == '1'], d, 1)}" +BUILD_OPTIMIZATION = "-O2" + +################################################################## +# Bootstrap stuff. +################################################################## + +BOOTSTRAP_EXTRA_DEPENDS = "" +BOOTSTRAP_EXTRA_RDEPENDS = "" +BOOTSTRAP_EXTRA_RRECOMMENDS = "" + +################################################################## +# Palmtop stuff. +################################################################## + +export QTDIR = "${STAGING_DIR}/${HOST_SYS}/qt2" +export QPEDIR = "${STAGING_DIR}/${HOST_SYS}" +export OPIEDIR = "${STAGING_DIR}/${HOST_SYS}" +export palmtopdir = "/opt/QtPalmtop" +export palmqtdir = "/opt/QtPalmtop" + +################################################################## +# Download locations and utilities. +################################################################## + +GNU_MIRROR = "ftp://ftp.gnu.org/gnu" +DEBIAN_MIRROR = "ftp://ftp.debian.org/debian/pool" +SOURCEFORGE_MIRROR = "http://heanet.dl.sourceforge.net/sourceforge" +GPE_MIRROR = "http://ftp.handhelds.org/pub/projects/gpe/source" +XLIBS_MIRROR = "http://xlibs.freedesktop.org/release" +GNOME_MIRROR = "http://ftp.gnome.org/pub/GNOME/sources" +HANDHELDS_CVS = "cvs://anoncvs:anoncvs@cvs.handhelds.org/cvs" + +# You can use the mirror of your country to get faster downloads by putting +# export DEBIAN_MIRROR = "ftp://ftp.de.debian.org/debian/pool" +# export SOURCEFORGE_MIRROR = "http://belnet.dl.sourceforge.net/sourceforge" +# into your local.conf + +FETCHCOMMAND = "" +FETCHCOMMAND_wget = "/usr/bin/env wget -t 5 --passive-ftp -P ${DL_DIR} ${URI}" +FETCHCOMMAND_cvs = "/usr/bin/env cvs -d${CVSROOT} co ${CVSCOOPTS} ${CVSMODULE}" +RESUMECOMMAND = "" +RESUMECOMMAND_wget = "/usr/bin/env wget -c -t 5 --passive-ftp -P ${DL_DIR} ${URI}" +UPDATECOMMAND = "" +UPDATECOMMAND_cvs = "/usr/bin/env cvs update -d -P ${CVSCOOPTS}" +CVSDATE = "${DATE}" + +SRC_URI = "file://${FILE}" + +################################################################## +# Miscellaneous utilities. +################################################################## + +MKTEMPDIRCMD = "mktemp -d -q ${TMPBASE}" +MKTEMPCMD = "mktemp -q ${TMPBASE}" + +# Program to be used to patch sources, use 'inherit patcher' to overwrite this: + +PATCHCLEANCMD = 'if [ -n "`quilt applied`" ]; then quilt pop -a -R -f || exit 1; fi' +PATCHCMD = "pnum='%s'; name='%s'; patch='%s'; mkdir -p patches ; quilt upgrade >/dev/null 2>&1; quilt import -f -p $pnum -n $name $patch; chmod u+w patches/$name; quilt push" +PATCH_DEPENDS = "quilt-native" + +# GNU patch tries to be intellgent about checking out read-only files from +# a RCS, which freaks out those special folks with active Perforce clients +# the following makes patch ignore RCS: + +export PATCH_GET=0 + +# Program to be used to build ipkg packages + +IPKGBUILDCMD = "ipkg-build -o 0 -g 0" + +################################################################## +# Not sure about the rest of this yet. +################################################################## + +# slot - currently unused by OE. portage remnants +SLOT = "0" + +# Other + +export PKG_CONFIG_PATH = "${STAGING_DATADIR}/pkgconfig" +export PKG_CONFIG_DISABLE_UNINSTALLED = "yes" + +export QMAKE_MKSPEC_PATH = "${STAGING_DIR}/${BUILD_SYS}/share/qmake" +export STAGING_SIPDIR = "${STAGING_DIR}/${BUILD_SYS}/share/sip" +export STAGING_IDLDIR = "${STAGING_DATADIR}/idl" + +# default test results for autoconf +# possible candidate for moving into autotools.oeclass -CL +export CONFIG_SITE = "${@bb.which(bb.data.getVar('BBPATH', d, 1), 'site/%s-%s' % (bb.data.getVar('HOST_ARCH', d, 1), bb.data.getVar('HOST_OS', d, 1)))}" + +# library package naming +AUTO_LIBNAME_PKGS = "${PACKAGES}" + +### +### Config file processing +### + +# This means that an envionment variable named '_arm' overrides an +# environment variable '' (when ${TARGET_ARCH} is arm). And the same: an +# environment variable '_ramses' overrides both '' and '_arm +# when ${MACHINE} is 'ramses'. And finally '_local' overrides anything. +# +# This works for functions as well, they are really just environment variables. +OVERRIDES = "local:${MACHINE}:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}" + +################################################################## +# Include the rest of the config files. +################################################################## + +include conf/site.conf +include conf/auto.conf +include conf/local.conf +include conf/build/${BUILD_SYS}.conf +include conf/target/${TARGET_SYS}.conf +include conf/machine/${MACHINE}.conf +include conf/distro/${DISTRO}.conf +include conf/documentation.conf diff --git a/openembedded/conf/distro/familiar-0.8.3.conf b/openembedded/conf/distro/familiar-0.8.3.conf new file mode 100644 index 0000000000..e26468cff3 --- /dev/null +++ b/openembedded/conf/distro/familiar-0.8.3.conf @@ -0,0 +1,52 @@ +include conf/distro/familiar.conf + +DISTRO = "familiar" +DISTRO_NAME = "Familiar Linux" +DISTRO_VERSION = "v0.8.3-unofficial-unsupported-snapshot-${DATE}" + +DISTRO_TYPE = "debug" +#DISTRO_TYPE = "release" + +FEED_URIS += " \ + base##http://familiar.handhelds.org/releases/${DISTRO_VERSION}/feed/base \ + updates##http://familiar.handhelds.org/releases/${DISTRO_VERSION}/feed/updates" + +#CVSDATE = 20050331 + +PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial" +PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}gcc:gcc-cross" +PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}g++:gcc-cross" + + +# The CSL compiler is unusable because +# 1) certain programs stop to compile +# 2) more programs segfault +PREFERRED_VERSION_gcc = "3.4.4" +PREFERRED_VERSION_gcc-cross = "3.4.4" +PREFERRED_VERSION_gcc-cross-initial = "3.4.4" + +# +# Opie +# + +PREFERRED_PROVIDERS += " virtual/libqpe:libqpe-opie" +PREFERRED_VERSION_qte = "2.3.10" + +#OPIE_VERSION = "1.2.0" +include conf/distro/preferred-opie-versions.inc + +# +# GPE +# + +PREFERRED_PROVIDERS += "virtual/xserver:xserver-kdrive" +PREFERRED_PROVIDERS += "virtual/gconf:gconf-dbus" +#PREFERRED_PROVIDER_x11 = "diet-x11" + +include conf/distro/preferred-gpe-versions-2.7.inc + +# +# E +# +include conf/distro/preferred-e-versions.inc + diff --git a/openembedded/conf/distro/familiar.conf b/openembedded/conf/distro/familiar.conf new file mode 100644 index 0000000000..497ba6a89c --- /dev/null +++ b/openembedded/conf/distro/familiar.conf @@ -0,0 +1,11 @@ +#@TYPE: Distribution +#@NAME: Familiar Linux +#@DESCRIPTION: Distribution configuration for Familiar Linux (handhelds.org) + +INHERIT += "package_ipk debian" +TARGET_OS = "linux" + +PARALLEL_INSTALL_MODULES = "1" + +UDEV_DEVFS_RULES = "1" + diff --git a/openembedded/conf/distro/maemo-1.0.conf b/openembedded/conf/distro/maemo-1.0.conf new file mode 100644 index 0000000000..15ec45f34e --- /dev/null +++ b/openembedded/conf/distro/maemo-1.0.conf @@ -0,0 +1,40 @@ +include conf/distro/familiar.conf + +DISTRO = "maemo" +DISTRO_NAME = "Maemo Linux" +DISTRO_VERSION = "v1.0b-${DATE}" + +DISTRO_TYPE = "debug" +#DISTRO_TYPE = "release" + +FEED_URIS += " \ + base##http://familiar.handhelds.org/releases/${DISTRO_VERSION}/feed/base \ + updates##http://familiar.handhelds.org/releases/${DISTRO_VERSION}/feed/updates" + +#CVSDATE = 20050331 + +PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial" +PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}gcc:gcc-cross" +PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}g++:gcc-cross" + +#PREFERRED_VERSION_binutils-cross = "2.15.91.0.2" +#PREFERRED_VERSION_gcc-cross = "3.4.4" +#PREFERRED_VERSION_gcc-cross-initial = "3.4.4 +#PREFERRED_VERSION_libtool-native = "1.5.6" +#PREFERRED_VERSION_libtool-cross= "1.5.6" + +# +# GPE +# + +PREFERRED_PROVIDERS += "virtual/xserver:xserver-kdrive" +PREFERRED_PROVIDERS += "virtual/gconf:gconf-dbus" +PREFERRED_PROVIDER_x11 = "diet-x11" + +include conf/distro/preferred-gpe-versions.inc + +# +# Maemo +# + +include conf/distro/maemo-preferred.inc diff --git a/openembedded/conf/distro/maemo-preferred.inc b/openembedded/conf/distro/maemo-preferred.inc new file mode 100644 index 0000000000..943f244326 --- /dev/null +++ b/openembedded/conf/distro/maemo-preferred.inc @@ -0,0 +1,10 @@ +PREFERRED_PROVIDER_gconf = "gconf-osso" +PREFERRED_PROVIDER_tslib = "tslib-maemo" +PREFERRED_VERSION_dbus = "0.23.1-osso5" +PREFERRED_VERSION_audiofile = "0.2.6-3osso4" +PREFERRED_PROVIDER_esd = "osso-esd" +PREFERRED_VERSION_gtk+ = "2.6.4-1.osso7" +PREFERRED_VERSION_glib-2.0 = "2.6.4" +PREFERRED_VERSION_pango = "1.8.1" +PREFERRED_VERSION_atk = "1.9.0" +PREFERRED_VERSION_diet-x11 ?= "6.2.1" \ No newline at end of file diff --git a/openembedded/conf/distro/openzaurus-3.5.4.conf b/openembedded/conf/distro/openzaurus-3.5.4.conf new file mode 100644 index 0000000000..93074912f2 --- /dev/null +++ b/openembedded/conf/distro/openzaurus-3.5.4.conf @@ -0,0 +1,58 @@ +include conf/distro/openzaurus.conf +DISTRO = "openzaurus" +DISTRO_NAME = "OpenZaurus" +DISTRO_VERSION = "3.5.3-snapshot-${DATE}" +# DISTRO_VERSION = "3.5.4" +DISTRO_TYPE = "debug" +# DISTRO_TYPE = "release" + +FEED_URIS += " \ + upgrades##http://openzaurus.org/official/unstable/3.5.3/upgrades/ \ + machine##http://openzaurus.org/official/unstable/3.5.3/feed/machine/${MACHINE} \ + base##http://openzaurus.org/official/unstable/3.5.3/feed/base/ \ + libs##http://openzaurus.org/official/unstable/3.5.3/feed/libs/ \ + console##http://openzaurus.org/official/unstable/3.5.3/feed/console \ + devel##http://openzaurus.org/official/unstable/3.5.3/feed/devel" + +# CVSDATE = "20050704" + +# +# Zaurus +# + +ASSUME_PROVIDED += "virtual/arm-linux-gcc-2.95" +OEINCLUDELOGS = "yes" +KERNEL_CONSOLE = "ttyS0" +#DEBUG_OPTIMIZATION = "-O -g3" +#DEBUG_BUILD = "1" +#INHIBIT_PACKAGE_STRIP = "1" + +# +# Base +# +PREFERRED_VERSION_binutils-cross = "2.15.94.0.1" +PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial" +PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc:gcc-cross" +PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross" + +# +# Opie +# +PREFERRED_PROVIDERS += " virtual/libqpe:libqpe-opie" + +OPIE_VERSION = "1.2.1" +include conf/distro/preferred-opie-versions.inc + +# +# GPE +# +PREFERRED_PROVIDERS += "virtual/xserver:xserver-kdrive" +#PREFERRED_PROVIDER_x11 = "diet-x11" +PREFERRED_PROVIDER_x11 = "x11" +include conf/distro/preferred-gpe-versions-2.7.inc + +# +# E +# +include conf/distro/preferred-e-versions.inc + diff --git a/openembedded/conf/distro/openzaurus.conf b/openembedded/conf/distro/openzaurus.conf new file mode 100644 index 0000000000..9208aeda09 --- /dev/null +++ b/openembedded/conf/distro/openzaurus.conf @@ -0,0 +1,12 @@ +#@TYPE: Distribution +#@NAME: OpenZaurus +#@DESCRIPTION: Distribution configuration for OpenZaurus (http://www.openzaurus.org) + +INHERIT += " package_ipk debian" +# For some reason, this doesn't work +# TARGET_OS ?= "linux" +TARGET_OS = "linux" +TARGET_FPU = "soft" + +PARALLEL_INSTALL_MODULES = "1" + diff --git a/openembedded/conf/distro/preferred-e-versions.inc b/openembedded/conf/distro/preferred-e-versions.inc new file mode 100644 index 0000000000..d861944d53 --- /dev/null +++ b/openembedded/conf/distro/preferred-e-versions.inc @@ -0,0 +1,13 @@ +# +# Specify which versions of E-related libraries and applications to build +# + +PREFERRED_VERSION_ecore = "0.9.9.013" +PREFERRED_VERSION_edb = "1.0.5.004" +PREFERRED_VERSION_edje = "0.5.0.013" +PREFERRED_VERSION_eet = "0.9.10.013" +PREFERRED_VERSION_embryo = "0.9.1.013" +PREFERRED_VERSION_etox = "0.9.0.004" +PREFERRED_VERSION_evas = "0.9.9.013" +PREFERRED_VERSION_ewl = "0.0.4.004" +PREFERRED_VERSION_imlib2 = "1.2.1.004" diff --git a/openembedded/conf/distro/preferred-gpe-versions-2.6.inc b/openembedded/conf/distro/preferred-gpe-versions-2.6.inc new file mode 100644 index 0000000000..98c1a969fa --- /dev/null +++ b/openembedded/conf/distro/preferred-gpe-versions-2.6.inc @@ -0,0 +1,86 @@ +# +# Specify which versions of GPE (and related) applications to build +# + +#work around some breakages +CVSDATE_xserver-kdrive=20050207 +CVSDATE_minimo=20050401 +CVSDATE_cairo=20050330 +CVSDATE_xext=20050222 + +#set some preferred providers: +PREFERRED_PROVIDER_gconf=gconf-dbus + +#specify versions, as the header says :) +PREFERRED_VERSION_libmatchbox ?= "1.6" +PREFERRED_VERSION_matchbox ?= "0.9.1" +PREFERRED_VERSION_matchbox-common ?= "0.9.1" +PREFERRED_VERSION_matchbox-desktop ?= "0.9.1" +PREFERRED_VERSION_matchbox-wm ?= "0.9.3" +PREFERRED_VERSION_matchbox-panel ?= "0.9.1" +PREFERRED_VERSION_matchbox-applet-inputmanager ?= "0.6" +PREFERRED_VERSION_gtk+ ?= "2.6.3" +PREFERRED_VERSION_libgpewidget ?= "0.97" +PREFERRED_VERSION_libgpepimc ?= "0.4" +PREFERRED_VERSION_libgpevtype ?= "0.11" +PREFERRED_VERSION_libschedule ?= "0.14" +PREFERRED_VERSION_gpe-icons ?= "0.24" +PREFERRED_VERSION_libgsm ?= "1.0.10" +PREFERRED_VERSION_diet-x11 ?= "6.2.1" +PREFERRED_VERSION_xproto ?= "6.6.2" +PREFERRED_VERSION_xcursor-transparent-theme ?= "0.1.1" +PREFERRED_VERSION_rxvt-unicode ?= "5.3" +PREFERRED_VERSION_gtk2-theme-angelistic ?= "0.3" +PREFERRED_VERSION_xst ?= "0.14" +#PREFERRED_VERSION_xextensions ?= "0.0cvs${CVSDATE}" +PREFERRED_VERSION_xprop ?= "0.0cvs${CVSDATE}" +PREFERRED_VERSION_xhost ?= "0.0cvs20040413" +PREFERRED_VERSION_xrdb ?= "0.0cvs${CVSDATE}" +PREFERRED_VERSION_gpe-login ?= "0.76" +PREFERRED_VERSION_gpe-session-scripts ?= "0.62" +PREFERRED_VERSION_gpe-soundserver ?= "0.4-1" +PREFERRED_VERSION_gpe-todo ?= "0.50" +PREFERRED_VERSION_gpe-calendar ?= "0.61" +PREFERRED_VERSION_gpe-sketchbox ?= "0.2.8" +PREFERRED_VERSION_gpe-contacts ?= "0.36" +PREFERRED_VERSION_gpe-today ?= "0.08" +PREFERRED_VERSION_matchbox-panel-manager ?= "0.1" +PREFERRED_VERSION_dbus ?= "0.23" +PREFERRED_VERSION_gpe-bluetooth ?= "0.38" +PREFERRED_VERSION_gpe-su ?= "0.18" +PREFERRED_VERSION_gpe-conf ?= "0.1.23" +PREFERRED_VERSION_gpe-clock ?= "0.20" +PREFERRED_VERSION_gpe-mininet ?= "0.5" +PREFERRED_VERSION_gpe-mixer ?= "0.40" +PREFERRED_VERSION_gpe-shield ?= "0.7" +PREFERRED_VERSION_gpe-wlancfg ?= "0.2.6" +PREFERRED_VERSION_gpe-taskmanager ?= "0.17" +PREFERRED_VERSION_keylaunch ?= "2.0.7" +PREFERRED_VERSION_minilite ?= "0.47" +PREFERRED_VERSION_xmonobut ?= "0.4" +PREFERRED_VERSION_gpe-edit ?= "0.28" +PREFERRED_VERSION_gpe-gallery ?= "0.95" +PREFERRED_VERSION_gpe-calculator ?= "0.2" +PREFERRED_VERSION_gpe-package ?= "0.2" +PREFERRED_VERSION_gpe-soundbite ?= "1.0.5" +PREFERRED_VERSION_gpe-terminal ?= "1.1" +PREFERRED_VERSION_gpe-watch ?= "0.10" +PREFERRED_VERSION_gpe-what ?= "0.33" +PREFERRED_VERSION_gpe-filemanager ?= "0.20" +PREFERRED_VERSION_gpe-go ?= "0.05" +PREFERRED_VERSION_gpe-irc ?= "0.07" +PREFERRED_VERSION_gpe-lights ?= "0.13" +#PREFERRED_VERSION_gpe-nmf ?= "0.19" +PREFERRED_VERSION_gpe-othello ?= "0.2-1" +PREFERRED_VERSION_gpe-plucker ?= "0.2" +PREFERRED_VERSION_gpe-tetris ?= "0.6-2" +PREFERRED_VERSION_gsoko ?= "0.4.2-gpe6" +PREFERRED_VERSION_xdemineur ?= "2.1.1" +PREFERRED_VERSION_matchbox-panel-hacks ?= "0.3-1" +PREFERRED_VERSION_rosetta ?= "0.0cvs${CVSDATE}" +PREFERRED_VERSION_dillo2 ?= "0.6.6" +PREFERRED_VERSION_minimo ?= "0.0cvs${CVSDATE_minimo}" +PREFERRED_VERSION_linphone-hh ?= "0.12.2.hh1" +PREFERRED_VERSION_linphone ?= "0.12.2" +PREFERRED_VERSION_firefox ?= "1.0" + diff --git a/openembedded/conf/distro/preferred-gpe-versions-2.7.inc b/openembedded/conf/distro/preferred-gpe-versions-2.7.inc new file mode 100644 index 0000000000..2d64cf2b8b --- /dev/null +++ b/openembedded/conf/distro/preferred-gpe-versions-2.7.inc @@ -0,0 +1,88 @@ +# +# Specify which versions of GPE (and related) applications to build +# + +#work around some breakages +#CVSDATE_minimo=20050401 + +#set some preferred providers: +PREFERRED_PROVIDER_gconf=gconf-dbus + +#specify versions, as the header says :) +PREFERRED_VERSION_libmatchbox ?= "1.7" +PREFERRED_VERSION_matchbox ?= "0.9.1" +PREFERRED_VERSION_matchbox-common ?= "0.9.1" +PREFERRED_VERSION_matchbox-desktop ?= "0.9.1" +PREFERRED_VERSION_matchbox-wm ?= "0.9.5" +PREFERRED_VERSION_matchbox-panel ?= "0.9.2" +PREFERRED_VERSION_matchbox-applet-inputmanager ?= "0.6" +PREFERRED_VERSION_atk ?= "1.9.0" +PREFERRED_VERSION_cairo ?= "0.5.2" +PREFERRED_VERSION_glib-2.0 ?= "2.6.4" +PREFERRED_VERSION_gtk+ ?= "2.6.7" +PREFERRED_VERSION_pango ?= "1.8.1" +PREFERRED_VERSION_librsvg ?= "2.6.5" +PREFERRED_VERSION_libgpewidget ?= "0.103" +PREFERRED_VERSION_libgpepimc ?= "0.5" +PREFERRED_VERSION_libgpevtype ?= "0.12" +PREFERRED_VERSION_libschedule ?= "0.15" +PREFERRED_VERSION_gpe-icons ?= "0.24" +PREFERRED_VERSION_libgsm ?= "1.0.10" +PREFERRED_VERSION_diet-x11 ?= "6.2.1" +PREFERRED_VERSION_xproto ?= "6.6.2" +PREFERRED_VERSION_xcursor-transparent-theme ?= "0.1.1" +PREFERRED_VERSION_rxvt-unicode ?= "5.3" +PREFERRED_VERSION_gtk2-theme-angelistic ?= "0.3" +PREFERRED_VERSION_xst ?= "0.14" +#PREFERRED_VERSION_xextensions ?= "0.0cvs${CVSDATE}" +PREFERRED_VERSION_xprop ?= "0.0cvs${CVSDATE}" +PREFERRED_VERSION_xhost ?= "0.0cvs20040413" +PREFERRED_VERSION_xrdb ?= "0.0cvs${CVSDATE}" +PREFERRED_VERSION_gpe-login ?= "0.81" +PREFERRED_VERSION_gpe-session-scripts ?= "0.63" +PREFERRED_VERSION_gpe-soundserver ?= "0.4-1" +PREFERRED_VERSION_gpe-todo ?= "0.54" +PREFERRED_VERSION_gpe-calendar ?= "0.63" +PREFERRED_VERSION_gpe-sketchbox ?= "0.2.8" +PREFERRED_VERSION_gpe-contacts ?= "0.41" +PREFERRED_VERSION_gpe-today ?= "0.08" +PREFERRED_VERSION_matchbox-panel-manager ?= "0.1" +PREFERRED_VERSION_dbus ?= "0.23.4" +PREFERRED_VERSION_gpe-bluetooth ?= "0.43" +PREFERRED_VERSION_gpe-su ?= "0.18" +PREFERRED_VERSION_gpe-conf ?= "0.1.25" +PREFERRED_VERSION_gpe-clock ?= "0.21" +PREFERRED_VERSION_gpe-mininet ?= "0.5" +PREFERRED_VERSION_gpe-mixer ?= "0.42" +PREFERRED_VERSION_gpe-shield ?= "0.7" +PREFERRED_VERSION_gpe-wlancfg ?= "0.2.6" +PREFERRED_VERSION_gpe-taskmanager ?= "0.18" +PREFERRED_VERSION_keylaunch ?= "2.0.7" +PREFERRED_VERSION_minilite ?= "0.49" +PREFERRED_VERSION_xmonobut ?= "0.4" +PREFERRED_VERSION_gpe-edit ?= "0.29" +PREFERRED_VERSION_gpe-gallery ?= "0.96" +PREFERRED_VERSION_gpe-calculator ?= "0.2" +PREFERRED_VERSION_gpe-package ?= "0.3" +PREFERRED_VERSION_gpe-soundbite ?= "1.0.6" +PREFERRED_VERSION_gpe-terminal ?= "1.1" +PREFERRED_VERSION_gpe-watch ?= "0.10" +PREFERRED_VERSION_gpe-what ?= "0.33" +PREFERRED_VERSION_gpe-filemanager ?= "0.23" +PREFERRED_VERSION_gpe-go ?= "0.05" +PREFERRED_VERSION_gpe-irc ?= "0.07" +PREFERRED_VERSION_gpe-lights ?= "0.13" +#PREFERRED_VERSION_gpe-nmf ?= "0.21" +PREFERRED_VERSION_gpe-othello ?= "0.2-1" +PREFERRED_VERSION_gpe-plucker ?= "0.2" +PREFERRED_VERSION_gpe-tetris ?= "0.6-4" +PREFERRED_VERSION_gsoko ?= "0.4.2-gpe6" +PREFERRED_VERSION_xdemineur ?= "2.1.1" +PREFERRED_VERSION_matchbox-panel-hacks ?= "0.3-1" +PREFERRED_VERSION_rosetta ?= "0.0cvs${CVSDATE}" +PREFERRED_VERSION_dillo2 ?= "0.6.6" +PREFERRED_VERSION_minimo ?= "0.0cvs${CVSDATE_minimo}" +PREFERRED_VERSION_linphone-hh ?= "0.12.2.hh1" +PREFERRED_VERSION_linphone ?= "0.12.2" +PREFERRED_VERSION_firefox ?= "1.0" +PREFERRED_VERSION_gpe_mini_browser ?= "0.15" diff --git a/openembedded/conf/distro/preferred-gpe-versions.inc b/openembedded/conf/distro/preferred-gpe-versions.inc new file mode 100644 index 0000000000..b68eb32c2a --- /dev/null +++ b/openembedded/conf/distro/preferred-gpe-versions.inc @@ -0,0 +1,84 @@ +# +# Specify which versions of GPE (and related) applications to build +# + +#work around some breakages +#CVSDATE_xext=20050222 + +#set some preferred providers: +PREFERRED_PROVIDER_gconf=gconf-dbus +PREFERRED_PROVIDER_gnome-vfs=gnome-vfs-dbus + +#specify versions, as the header says :) +#PREFERRED_VERSION_libmatchbox ?= "1.6" +#PREFERRED_VERSION_matchbox ?= "0.9.1" +#PREFERRED_VERSION_matchbox-common ?= "0.9.1" +#PREFERRED_VERSION_matchbox-desktop ?= "0.9.1" +#PREFERRED_VERSION_matchbox-wm ?= "0.9.3" +#PREFERRED_VERSION_matchbox-panel ?= "0.9.1" +#PREFERRED_VERSION_matchbox-applet-inputmanager ?= "0.6" +#PREFERRED_VERSION_gtk+ ?= "2.6.3" +#PREFERRED_VERSION_libgpewidget ?= "0.97" +#PREFERRED_VERSION_libgpepimc ?= "0.4" +#PREFERRED_VERSION_libgpevtype ?= "0.11" +#PREFERRED_VERSION_libschedule ?= "0.14" +#PREFERRED_VERSION_gpe-icons ?= "0.24" +#PREFERRED_VERSION_libgsm ?= "1.0.10" +PREFERRED_VERSION_diet-x11 ?= "6.2.1" +PREFERRED_VERSION_xproto ?= "6.6.2" +#PREFERRED_VERSION_xcursor-transparent-theme ?= "0.1.1" +PREFERRED_VERSION_rxvt-unicode ?= "5.3" +#PREFERRED_VERSION_gtk2-theme-angelistic ?= "0.3" +#PREFERRED_VERSION_xst ?= "0.14" +PREFERRED_VERSION_xextensions ?= "1.0.1" +PREFERRED_VERSION_xprop ?= "0.0cvs${CVSDATE}" +PREFERRED_VERSION_xhost ?= "0.0cvs20040413" +PREFERRED_VERSION_xrdb ?= "0.0cvs${CVSDATE}" +#PREFERRED_VERSION_gpe-login ?= "0.76" +#PREFERRED_VERSION_gpe-session-scripts ?= "0.62" +#PREFERRED_VERSION_gpe-soundserver ?= "0.4-1" +#PREFERRED_VERSION_gpe-todo ?= "0.50" +#PREFERRED_VERSION_gpe-calendar ?= "0.61" +#PREFERRED_VERSION_gpe-sketchbox ?= "0.2.8" +#PREFERRED_VERSION_gpe-contacts ?= "0.36" +#PREFERRED_VERSION_gpe-today ?= "0.08" +#PREFERRED_VERSION_matchbox-panel-manager ?= "0.1" +PREFERRED_VERSION_dbus ?= "0.23.4" +#PREFERRED_VERSION_gpe-bluetooth ?= "0.38" +#PREFERRED_VERSION_gpe-su ?= "0.18" +#PREFERRED_VERSION_gpe-conf ?= "0.1.23" +#PREFERRED_VERSION_gpe-clock ?= "0.20" +#PREFERRED_VERSION_gpe-mininet ?= "0.5" +#PREFERRED_VERSION_gpe-mixer ?= "0.40" +#PREFERRED_VERSION_gpe-shield ?= "0.7" +#PREFERRED_VERSION_gpe-wlancfg ?= "0.2.6" +#PREFERRED_VERSION_gpe-taskmanager ?= "0.17" +#PREFERRED_VERSION_keylaunch ?= "2.0.7" +#PREFERRED_VERSION_minilite ?= "0.47" +#PREFERRED_VERSION_xmonobut ?= "0.4" +#PREFERRED_VERSION_gpe-edit ?= "0.28" +#PREFERRED_VERSION_gpe-gallery ?= "0.95" +#PREFERRED_VERSION_gpe-calculator ?= "0.2" +#PREFERRED_VERSION_gpe-package ?= "0.2" +#PREFERRED_VERSION_gpe-soundbite ?= "1.0.5" +#PREFERRED_VERSION_gpe-terminal ?= "1.1" +#PREFERRED_VERSION_gpe-watch ?= "0.10" +#PREFERRED_VERSION_gpe-what ?= "0.33" +#PREFERRED_VERSION_gpe-filemanager ?= "0.20" +#PREFERRED_VERSION_gpe-go ?= "0.05" +#PREFERRED_VERSION_gpe-irc ?= "0.07" +#PREFERRED_VERSION_gpe-lights ?= "0.13" +#PREFERRED_VERSION_gpe-nmf ?= "0.19" +#PREFERRED_VERSION_gpe-othello ?= "0.2-1" +#PREFERRED_VERSION_gpe-plucker ?= "0.2" +#PREFERRED_VERSION_gpe-tetris ?= "0.6-2" +#PREFERRED_VERSION_gsoko ?= "0.4.2-gpe6" +#PREFERRED_VERSION_xdemineur ?= "2.1.1" +#PREFERRED_VERSION_matchbox-panel-hacks ?= "0.3-1" +PREFERRED_VERSION_rosetta ?= "0.0cvs${CVSDATE}" +#PREFERRED_VERSION_dillo2 ?= "0.6.6" +PREFERRED_VERSION_minimo ?= "0.0cvs${CVSDATE_minimo}" +#PREFERRED_VERSION_linphone-hh ?= "0.12.2.hh1" +#PREFERRED_VERSION_linphone ?= "0.12.2" +#PREFERRED_VERSION_firefox ?= "1.0" + diff --git a/openembedded/conf/distro/preferred-opie-versions.inc b/openembedded/conf/distro/preferred-opie-versions.inc new file mode 100644 index 0000000000..ff608f28f2 --- /dev/null +++ b/openembedded/conf/distro/preferred-opie-versions.inc @@ -0,0 +1,192 @@ +# +# A list of applications. +# + + +PREFERRED_VERSION_libopie2 = "${OPIE_VERSION}" +PREFERRED_VERSION_libopieobex0 = "${OPIE_VERSION}" +PREFERRED_VERSION_libopietooth1 = "${OPIE_VERSION}" +PREFERRED_VERSION_libqpe-opie = "${OPIE_VERSION}" +PREFERRED_VERSION_libqtaux2 = "${OPIE_VERSION}" +PREFERRED_VERSION_libmailwrapper = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-aboutapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-addressbook = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-advancedfm = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-alarm = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-appearance = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-aqpkg = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-autorotateapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-backgammon = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-backup = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-bartender = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-batteryapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-bluepin = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-bluetoothapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-bluetoothmanager = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-bounce = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-brightnessapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-button-settings = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-buzzword = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-calculator = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-calibrate = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-camera = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-cardmon = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-checkbook = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-citytime = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-clipboardapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-clockapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-clock = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-confeditor = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-console = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-dagger = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-dasher = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-datebook = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-datebook-chrisholidayplugin = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-datebook-nationalholidayplugin = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-datebook-birthdayplugin = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-deco-flat = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-deco-liquid = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-deco-polished = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-doctab = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-drawpad = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-dvorak = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-embeddedkonsole = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-euroconv = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-examples-python = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-eye = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-fifteen = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-formatter = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-freetype = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-ftplib = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-ftp = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-go = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-gutenbrowser = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-handwriting = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-helpbrowser = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-help-en = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-homeapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-i18n = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-lrelease-native = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-lupdate-native = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-irc = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-irdaapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-jumpx = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-kbill = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-kcheckers = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-keyboard = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-keypebble = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-keytabs = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-keyview = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-kjumpx = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-kpacman = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-language = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-launcher-settings = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-libqrsync = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-light-and-power = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-login = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-logoutapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-mailapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-mail = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-mediaplayer1-libmadplugin = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-mediaplayer1-libmodplugin = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-mediaplayer1-libtremorplugin = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-mediaplayer1-libwavplugin = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-mediaplayer1 = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-mediaplayer2 = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-mediaplayer2-skin-default = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-mediaplayer2-skin-default-landscape = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-mediaplayer2-skin-pod = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-mediaplayer2-skin-techno = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-mediummount = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-memoryapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-mindbreaker = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-minesweep = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-mobilemsg = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-multikeyapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-multikey = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-networkapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-networksettings = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-notesapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-odict = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-osearch = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-oxygen = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-oyatzee = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-packagemanager = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-parashoot = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-pcmciaapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-performance = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-pickboard = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-pics = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-pimconverter = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-powerchord = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-pyquicklaunchapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-qasteroids = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-qcop = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-quicklauncher = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-qss = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-rdesktop = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-reader = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-recorder = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-remote = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-restartapplet2 = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-restartapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-restartapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-rotateapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-screenshotapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-search = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-security = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-securityplugin-blueping = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-securityplugin-dummy = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-securityplugin-notice = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-securityplugin-pin = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-sfcave = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-sheet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-sh = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-showimg = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-snake = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-solitaire = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-sshkeys = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-style-flat = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-style-fresh = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-style-liquid = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-style-metal = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-style-phase = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-style-web = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-sounds = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-suspendapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-symlinker = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-sysinfo = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-systemtime = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-tableviewer = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-tabmanager = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-taskbar = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-tetrix = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-textedit = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-theme = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-tictac = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-tinykate = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-today-addressbookplugin = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-today-datebookplugin = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-today-fortuneplugin = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-today-mailplugin = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-today = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-today-stocktickerplugin = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-today-todolistplugin = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-today-weatherplugin = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-todo = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-tonleiter = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-unikeyboard = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-usermanager = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-vmemo = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-vmemo-settings = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-volumeapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-vtapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-wellenreiter = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-wirelessapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-wordgame = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-write = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-zkbapplet = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-zlines = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-zsafe = "${OPIE_VERSION}" +PREFERRED_VERSION_opie-zsame = "${OPIE_VERSION}" +PREFERRED_VERSION_konqueror-embedded = "20030705" diff --git a/openembedded/conf/documentation.conf b/openembedded/conf/documentation.conf new file mode 100644 index 0000000000..19aaf2dd48 --- /dev/null +++ b/openembedded/conf/documentation.conf @@ -0,0 +1,75 @@ +# this file holds documentation for known keys, possible values and their meaning +# feel free to send updates and corrections to oe@handhelds.org + +# conf/bitbake.conf +PREFERRED_VERSION[doc] = "Normally use it as PREFERRED_VERSION_package-name = \"\" to set the preferred \ +version of more than one version for the package-name is available." + +BUILD_ARCH[doc] = "The name of the building architecture. For example i686" +BUILD_OS[doc] = "The operating system (in lower case) of the building architecture. For example \ +linux" +BUILD_VENDOR[doc] = "FIXME" +BUILD_SYS[doc] = "FIXME" +BUILD_PREFIX[doc] = "FIXME" +BUILD_CC_ARCH[doc] = "FIXME" + +HOST_ARCH[doc] = "The name of the target architecture. Normally same as the TARGET_ARCH @see TARGET_ARCH @group base" +HOST_OS[doc] = "The name of the target operating system. Normally the same as the TARGET_OS \ +@see TARGET_OS @group base" +HOST_VENDOR[doc] = "The name of the vendor. Normally same as the TARGET_VENDOR @see TARGET_VENDOR" +HOST_SYS[doc] = "FIXME" +HOST_PREFIX[doc] = "Normally same as the TARGET_PREFIX @see TARGET_PREFIX @group base" +HOST_CC_ARCH[doc] = "Normally same as the TARGET_CC_ARCH @see TARGET_CC_ARCH @group base" + +TARGET_ARCH[doc] = "Build for which architecture. Examples are arm, i686, sh3, mips, powerpc" +TARGET_OS[doc] = "Build for which Operating System. Currently possible values are \ +linux and linux-uclibc. When using linux-uclibc you might want to set USE_NLS_gcc-cross to \"no\"." +TARGET_VENDOR[doc] = "FIXME" +TARGET_SYS[doc] = "The target system is composed out of TARGET_ARCH,TARGET_VENDOR and TARGET_OS" +TARGET_PREFIX[doc] = "The prefix for the cross compile toolchain. For example arm-linux-" +TARGET_CC_ARCH[doc] = "FIXME" +TARGET_FPU[doc] = "Floating point option (mostly for FPU-less systems), can be 'soft' or empty" + +PACKAGE_ARCH[doc] = "The architecture needed for using a resulting package. If you have \ +machine dependant configuration options in your bitbake file add a \ +PACKAGE_ARCH = \"${MACHINE_ARCH}\" to the file" + + +DATE[doc] = "The date the build was started Ymd" +TIME[doc] = "The time the build was started HMS" +DATETIME[doc] = "The date and time the build was started at" + +PN[doc] = "PN holds the name of the package (Package Name). It is gathered from the bitbake-file filename" +PV[doc] = "PV holds the version of the package (Package Version). The default value is 1.0, it is \ +retrieved from the bitbake-file filename." +PR[doc] = "PR is the revision of the package (Package Revision). By default it is set to r0" +PF[doc] = "Package name - Package version - Package revision (PN-PV-PR)" +P[doc] = "Package name - Package version (PN-PF)" +S[doc] = "Directory that holds the sources to build, WORKDIR/PN-PV by default. The 'make' or equivalent command is run from here" +SECTION[doc] = "Section of the packages e.g. console/networking" +PRIORITY[doc] = "Importance of package, default values are 'optional' or 'needed'" +DESCRIPTION[doc] = "A small description of the package" +LICENSE[doc] = "The license of the resulting package e.g. GPL" +AUTHOR[doc] = "The author of the stuff contained in the package" +MAINTAINER[doc] = "Maintainer of the .bb and the resulting package" +HOMEPAGE[doc] = "Homepage of the package e.g. http://www.project.net" + + +DEPENDS[doc] = "Build time dependencies, things needed to build the package" +RDEPENDS[doc] = "Run time dependencies, things needed for a given package to run" +PROVIDES[doc] = "Names for additional dependencies that this package will provide" + + +PACKAGES[doc] = "Names of packages to be generated" +FILES[doc] = "Files/Directories belonging to the package" + + + +TMPDIR[doc] = "The temporary directory of openembedded holding work-, deploy, staging- and some more dirs" +CACHE[doc] = "The directory holding the parsing cache." +DL_DIR[doc] = "The directory where tarballs will be downloaded." +CVSDIR[doc] = "The directory where cvs checkouts will be stored in." + +STAMP[doc] = "The directory that holds files to keep track of what was built" +WORKDIR[doc] = "The directory where a concrete package will be unpacked and built" +T[doc] = "Temporary directory within the WORKDIR" diff --git a/openembedded/conf/licenses.conf b/openembedded/conf/licenses.conf new file mode 100644 index 0000000000..e81434da8c --- /dev/null +++ b/openembedded/conf/licenses.conf @@ -0,0 +1,5 @@ +SRC_DISTRIBUTE_LICENSES += "GPL GPLv2 BSD LGPL Apache-2.0 QPL AFL" +SRC_DISTRIBUTE_LICENSES += "MIT Sleepycat Classpath Perl PSF PD Artistic" +SRC_DISTRIBUTE_LICENSES += "bzip2 zlib ntp cron libpng netperf openssl" +SRC_DISTRIBUTE_LICENSES += "Info-ZIP tcp-wrappers" + diff --git a/openembedded/conf/local.conf.sample b/openembedded/conf/local.conf.sample new file mode 100644 index 0000000000..7a7afb4277 --- /dev/null +++ b/openembedded/conf/local.conf.sample @@ -0,0 +1,122 @@ +# +# OpenEmbedded local configuration file (sample) +# +# Please visit the Wiki at http://openembedded.org/ for more info. +# +# +# Be SURE to read this file in its entirety and the GettingStarted page on the +# wiki before proceeding. +# +# Once you have done that, remove the line at the end of this +# file and build away. +# +# WARNING: lines starting with a space (' ') will result in parse failures. +# Remove '# ' from commented lines to activate them. +# +# NOTE: Do NOT use $HOME in your paths, BitBake does NOT expand ~ for you. If you +# must have paths relative to your homedir use ${HOME} (note the {}'s there +# you MUST have them for the variable expansion to be done by BitBake). Your +# paths should all be absolute paths (They should all start with a / after +# expansion. Stuff like starting with ${HOME} or ${TOPDIR} is ok). + +# Use this to specify where BitBake should place the downloaded sources into +DL_DIR = "${HOME}/sources" + +# Delete the line below. Then specify which .bb files to consider for +# your build. Typically this will be something like BBFILES = "/path/to/openembedded/packages/*/*.bb" +BBFILES := "${@bb.fatal('Edit your conf/local.conf: BBFILES')}" + +# Use the BBMASK below to instruct BitBake to _NOT_ consider some .bb files +# This is a regulary expression, so be sure to get your parenthesis balanced. +BBMASK = "" + +# Uncomment this if you want to use a prebuilt toolchain. You will need to +# provide packages for toolchain and additional libraries yourself. You also +# have to set PATH in your environment to make sure BitBake finds additional binaries. +# Note: You will definitely need to say: +# ASSUME_PROVIDED = "virtual/arm-linux-gcc-2.95" +# to build any of two Linux 2.4 Embedix kernels, +# i.e. openzaurus-sa-2.4.18 and openzaurus-pxa-2.4.18 - and don't forget +# to rename the binaries as instructed in the Wiki. +# ASSUME_PROVIDED = "virtual/${TARGET_PREFIX}gcc virtual/libc" + +# Select between multiple alternative providers, if more than one is eligible. +PREFERRED_PROVIDERS = "virtual/qte:qte virtual/libqpe:libqpe-opie" +PREFERRED_PROVIDERS += " virtual/libsdl:libsdl-qpe" +PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial" +PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc:gcc-cross" +PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross" + +# Uncomment this to specify where BitBake should create its temporary files. +# Note that a full build of everything in OpenEmbedded will take GigaBytes of hard +# disk space, so make sure to free enough space. The default TMPDIR is +# /tmp +# Don't use symlinks in in the path to avoid problems +# TMPDIR = /usr/local/projects/oetmp + +# Uncomment this to specify a machine to build for. See the conf directory +# for machines currently known to OpenEmbedded. +# MACHINE = "collie" + +# Use this to specify the target architecture. Note that this is only +# needed when building for a machine not known to OpenEmbedded. Better use +# the MACHINE attribute (see above) +# TARGET_ARCH = "arm" + +# Use this to specify the target operating system. The default is "linux", +# for a normal linux system with glibc. Set this to "linux-uclibc" if you want +# to build a uclibc based system. +# TARGET_OS = "linux" +# TARGET_OS = "linux-uclibc" + +# Uncomment this to select a distribution policy. See the conf directory +# for distributions currently known to OpenEmbedded. +# DISTRO = "familiar" + +# Uncomment this to select a particular kernel version if supported by +# your MACHINE setting. Currently only supported on Zaurus Clamshells. +# KERNEL_VERSION = "2.6" + +# Uncomment one of these to build packages during the build process. +# This is done automatically if you set DISTRO (see above) +# INHERIT = "package_ipk" +# INHERIT = "package_tar" + +# Add the required image file system types below. Valid are jffs2, tar, cramfs +IMAGE_FSTYPES = "jffs2 tar" + +# Uncomment this to disable the parse cache (not recommended). +# CACHE = "" + +# Uncomment this if you want BitBake to emit debugging output +# BBDEBUG = "yes" + +# Uncomment these two if you want BitBake to build images useful for debugging. +# DEBUG_BUILD = "1" +# INHIBIT_PACKAGE_STRIP = "1" + +# Uncomment these to build a package such that you can use gprof to profile it. +# NOTE: This will only work with 'linux' targets, not +# 'linux-uclibc', as uClibc doesn't provide the necessary +# object files. Also, don't build glibc itself with these +# flags, or it'll fail to build. +# +# PROFILE_OPTIMIZATION = "-pg" +# SELECTED_OPTIMIZATION = "${PROFILE_OPTIMIZATION}" +# LDFLAGS =+ "-pg" + +# Uncomment this to enable parallel make. +# This allows make to spawn mutliple processes to take advantage of multiple +# processors. Useful on SMP machines. This may break some packages - we're +# in the process of marking these so let us know if you find any. +# PARALLEL_MAKE = "-j 4" + +# Uncomment this if you want BitBake to emit the log if a build fails. +BBINCLUDELOGS = "yes" + +# Specifies a location to search for pre-generated tarballs when fetching +# a cvs:// URI. Outcomment this, if you always want to pull directly from CVS. +CVS_TARBALL_STASH = "http://www.oesources.org/source/current/" + +# EDIT THIS FILE and then remove the line below before using! +REMOVE_THIS_LINE:="${@oe.fatal('Read the comments in your conf/local.conf')}" diff --git a/openembedded/conf/machine/c7x0.conf b/openembedded/conf/machine/c7x0.conf new file mode 100644 index 0000000000..c5e42a2bed --- /dev/null +++ b/openembedded/conf/machine/c7x0.conf @@ -0,0 +1,12 @@ +#@TYPE: Machine +#@NAME: Sharp Zaurus SL-C7x0 +#@DESCRIPTION: Machine configuration for the Sharp Zaurus SL-C700, Sharp Zaurus SL-C750, Sharp Zaurus SL-C760, Sharp Zaurus SL-C860 devices + +KERNEL_VERSION ?= "2.6" + +include conf/machine/zaurus-clamshell.conf +include conf/machine/zaurus-clamshell-${KERNEL_VERSION}.conf + +ROOT_FLASH_SIZE = "32" +# yes, the husky has 64MB, I know... Be happy, that way you can install more software :) + diff --git a/openembedded/conf/machine/handheld-common.conf b/openembedded/conf/machine/handheld-common.conf new file mode 100644 index 0000000000..2445ee17a6 --- /dev/null +++ b/openembedded/conf/machine/handheld-common.conf @@ -0,0 +1,24 @@ +HANDHELD_MODULES = "ipv6 \ +ipsec \ +nvrd \ +mip6-mn \ +tun \ +ide-cs ide-disk ide-probe-mod \ +loop \ +vfat ext2 \ +sunrpc nfs \ +btuart-cs dtl1-cs bt3c-cs rfcomm bnep l2cap sco hci_uart \ +pcnet-cs serial-cs airo-cs \ +af_packet \ +ppp-async ppp-deflate ppp-mppe \ +ip-gre ip-tables ipip \ +irda irlan irnet irport irtty ircomm-tty \ +input uinput \ +" + +# Configuration bits for "generic handheld" +BOOTSTRAP_EXTRA_DEPENDS += "pcmcia-cs apmd ppp wireless-tools irda-utils openswan wpa-supplicant-nossl lrzsz ppp-dialin scap network-suspend-scripts" +BOOTSTRAP_EXTRA_RDEPENDS += "pcmcia-cs apm apmd network-suspend-scripts" +BOOTSTRAP_EXTRA_RRECOMMENDS += "ppp wireless-tools irda-utils openswan wpa-supplicant-nossl lrzsz ppp-dialin scap ${@linux_module_packages('${HANDHELD_MODULES}', d)}" + +INHERIT += "linux_modules" diff --git a/openembedded/conf/machine/ipaq-common.conf b/openembedded/conf/machine/ipaq-common.conf new file mode 100644 index 0000000000..791abd2103 --- /dev/null +++ b/openembedded/conf/machine/ipaq-common.conf @@ -0,0 +1,9 @@ +IPAQ_MODULES = "apm h3600_generic_sleeve ipaq-sleeve ipaq-mtd-asset nvrd atmelwlandriver sa1100-rtc ipaq-hal h3600_ts usb-eth wavelan_cs keybdev" + +BOOTSTRAP_EXTRA_DEPENDS += "kbdd bl hostap-modules orinoco-modules atmelwlandriver" +BOOTSTRAP_EXTRA_DEPENDS_append_kernel24 += "mipv6" +BOOTSTRAP_EXTRA_RRECOMMENDS += "kbdd bl hostap-modules-cs orinoco-modules-cs atmelwlandriver ${@linux_module_packages('${IPAQ_MODULES}', d)}" +BOOTSTRAP_EXTRA_RRECOMMENDS_append_kernel24 += "mipv6" + +PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive" + diff --git a/openembedded/conf/machine/ipaq-pxa270.conf b/openembedded/conf/machine/ipaq-pxa270.conf new file mode 100644 index 0000000000..9e1b677ecf --- /dev/null +++ b/openembedded/conf/machine/ipaq-pxa270.conf @@ -0,0 +1,33 @@ +#@TYPE: Machine +#@NAME: iPAQ hx47xx hx2xxx +#@DESCRIPTION: Machine configuration for the iPAQ with a pxa27x CPU devices + +TARGET_ARCH = "arm" +IPKG_ARCHS = "all arm armv4 armv5te ipaqpxa hx4700" +PREFERRED_PROVIDER_virtual/kernel = "handhelds-pxa-2.6" + +PREFERRED_VERSION_orinoco-modules = "0.15rc1" + +BOOTSTRAP_EXTRA_DEPENDS = "ipaq-boot-params" +BOOTSTRAP_EXTRA_DEPENDS_append = " handhelds-pxa-2.6 udev modutils-collateral module-init-tools" + +BOOTSTRAP_EXTRA_RDEPENDS = "kernel ipaq-boot-params ${@linux_module_packages('${PXA270_MODULES}', d)}" +BOOTSTRAP_EXTRA_RDEPENDS_append = " udev modutils-collateral module-init-tools" + +PXA270_MODULES = "g_ether pxa27x_udc" + +SERIAL_CONSOLE = "115200 ttyS0" + +include conf/machine/ipaq-common.conf +include conf/machine/handheld-common.conf + +GUI_MACHINE_CLASS = "bigscreen" +GPE_EXTRA_DEPENDS += "gaim sylpheed gpe-filemanager gpe-nmf evince" +GPE_EXTRA_INSTALL += "gaim sylpheed gpe-filemanager gpe-nmf evince" + +# Use tune-xscale per default. Machine independent feeds should be built with tune-strongarm. +include conf/machine/tune-xscale.conf + +BOOTSTRAP_EXTRA_RDEPENDS += "${@linux_module_packages('${HX4700_MODULES}', d)}" +HX4700_MODULES = "asic3_base asic3_mmc hx4700_bt hx4700_core hx4700_leds hx4700_navpt hx4700_pcmcia \ + hx4700_ts hx4700_wlan snd_pxa_i2sound_hx4700" diff --git a/openembedded/conf/machine/jornada7xx.conf b/openembedded/conf/machine/jornada7xx.conf new file mode 100644 index 0000000000..b3e1840469 --- /dev/null +++ b/openembedded/conf/machine/jornada7xx.conf @@ -0,0 +1,8 @@ +#@TYPE: Machine +#@NAME: HP Jornada 7xx +#@DESCRIPTION: Machine configuration for the SA1100 based HP Jornada 7xx palmtop computer + +TARGET_ARCH = "arm" +IPKG_ARCHS = "all arm ${MACHINE}" + +include conf/machine/tune-strongarm.conf \ No newline at end of file diff --git a/openembedded/conf/machine/nokia770.conf b/openembedded/conf/machine/nokia770.conf new file mode 100644 index 0000000000..253f8a43e2 --- /dev/null +++ b/openembedded/conf/machine/nokia770.conf @@ -0,0 +1,58 @@ +#@TYPE: Machine +#@NAME: Nokia 770 internet tablet +#@DESCRIPTION: Machine configuration for the Nokia 770, an omap 1710 based tablet +TARGET_ARCH = "arm" +IPKG_ARCHS = "all arm armv4 armv5te" + +PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive-omap" +PREFERRED_PROVIDER_virtual/bootloader = "" + +XSERVER = "xserver-kdrive-omap" + +# 800x480 is big enough for me +GUI_MACHINE_CLASS = "bigscreen" +GPE_EXTRA_DEPENDS += "gaim sylpheed gpe-mini-browser tscalib" +GPE_EXTRA_INSTALL += "gaim sylpheed gpe-mini-browser tscalib" + +# Use tune-arm926 per default. Machine independent feeds should be built with tune-strongarm. +#include conf/machine/tune-arm926ejs.conf + + +#size of the root partition (yes, it is 123 MB) +ROOT_FLASH_SIZE = "123" +EXTRA_IMAGECMD_jffs2_nokia770 = "--pad --little-endian --eraseblock=0x20000 --no-cleanmarkers" + +# serial console port on devboard rev. B3 +#SERIAL_CONSOLE = "115200 tts/0" +SERIAL_CONSOLE = "115200 ttyS0" + + +#build omap1 till nokia releases the patches +PREFERRED_PROVIDER_virtual/kernel = "linux-omap1" + +BOOTSTRAP_EXTRA_DEPENDS += "virtual/kernel sysfsutils nokia770-init \ +pcmcia-cs apmd ppp wireless-tools console-tools openswan wpa-supplicant-nossl lrzsz ppp-dialin" + +BOOTSTRAP_EXTRA_RDEPENDS += "sysfsutils nokia770-init \ +pcmcia-cs apm ppp wireless-tools console-tools" + +# NFS Modules +#BOOTSTRAP_EXTRA_RDEPENDS += "kernel-module-nfs kernel-module-lockd kernel-module-sunrpc" +# Crypto Modules +#BOOTSTRAP_EXTRA_RDEPENDS += "kernel-module-des kernel-module-md5" +# SMB and CRAMFS +#BOOTSTRAP_EXTRA_RDEPENDS += "kernel-module-smbfs kernel-module-cramfs" +# Serial Modules +#BOOTSTRAP_EXTRA_RDEPENDS += "kernel-module-8250 " +# Bluetooth Modules +#BOOTSTRAP_EXTRA_RDEPENDS += "kernel-module-bluetooth kernel-module-l2cap kernel-module-rfcomm kernel-module-hci-vhci \ +# kernel-module-bnep kernel-module-hidp kernel-module-hci-uart kernel-module-sco" +# PPP Modules +#BOOTSTRAP_EXTRA_RDEPENDS += "kernel-module-ppp-generic kernel-module-ppp-async" + +#USB Gadget Modules +#BOOTSTRAP_EXTRA_RDEPENDS += "kernel-module-gadgetfs kernel-module-g-file-storage kernel-module-g-serial \ +# kernel-module-g-ether" + +include conf/machine/handheld-common.conf + diff --git a/openembedded/conf/machine/spitz.conf b/openembedded/conf/machine/spitz.conf new file mode 100644 index 0000000000..6e6ea7f605 --- /dev/null +++ b/openembedded/conf/machine/spitz.conf @@ -0,0 +1,20 @@ +#@TYPE: Machine +#@NAME: Sharp Zaurus SL-C3000 +#@DESCRIPTION: Machine configuration for the Sharp Zaurus SL-C3000 device + +KERNEL_VERSION ?= "2.4" + +include conf/machine/zaurus-clamshell.conf +include conf/machine/zaurus-clamshell-${KERNEL_VERSION}.conf + +PIVOTBOOT_EXTRA_DEPENDS += "pivotinit pcmcia-cs" +PIVOTBOOT_EXTRA_RDEPENDS += "pivotinit pcmcia-cs" +PIVOTBOOT_EXTRA_RRECOMMENDS += "" + +# Useful things for the built-in Harddisk +BOOTSTRAP_EXTRA_DEPENDS += "hdparm e2fsprogs" +BOOTSTRAP_EXTRA_RDEPENDS += "hdparm e2fsprogs e2fsprogs-e2fsck e2fsprogs-mke2fs" + +IMAGE_FSTYPES = "jffs2 tar" + +ROOT_FLASH_SIZE = "100" diff --git a/openembedded/conf/machine/tune-arm920t.conf b/openembedded/conf/machine/tune-arm920t.conf new file mode 100644 index 0000000000..936b137517 --- /dev/null +++ b/openembedded/conf/machine/tune-arm920t.conf @@ -0,0 +1,2 @@ +TARGET_CC_ARCH = "-march=armv4t -mtune=arm920t" + diff --git a/openembedded/conf/machine/tune-arm926ejs.conf b/openembedded/conf/machine/tune-arm926ejs.conf new file mode 100644 index 0000000000..563586c902 --- /dev/null +++ b/openembedded/conf/machine/tune-arm926ejs.conf @@ -0,0 +1,2 @@ +TARGET_CC_ARCH = "-march=armv5te -mtune=arm926ej-s" +PACKAGE_ARCH = "armv5te" diff --git a/openembedded/conf/machine/tune-arm9tdmi.conf b/openembedded/conf/machine/tune-arm9tdmi.conf new file mode 100644 index 0000000000..cfc3bad1c1 --- /dev/null +++ b/openembedded/conf/machine/tune-arm9tdmi.conf @@ -0,0 +1 @@ +TARGET_CC_ARCH = "-mcpu=arm9tdmi -mtune=arm9tdmi" diff --git a/openembedded/conf/machine/tune-strongarm.conf b/openembedded/conf/machine/tune-strongarm.conf new file mode 100644 index 0000000000..8654c996ef --- /dev/null +++ b/openembedded/conf/machine/tune-strongarm.conf @@ -0,0 +1,2 @@ +TARGET_CC_ARCH = "-march=armv4 -mtune=xscale" + diff --git a/openembedded/conf/machine/tune-xscale.conf b/openembedded/conf/machine/tune-xscale.conf new file mode 100644 index 0000000000..0b98f09fc8 --- /dev/null +++ b/openembedded/conf/machine/tune-xscale.conf @@ -0,0 +1,3 @@ +TARGET_CC_ARCH = "-march=armv5te -mtune=xscale" +PACKAGE_ARCH = "armv5te" + diff --git a/openembedded/conf/machine/zaurus-clamshell-2.4.conf b/openembedded/conf/machine/zaurus-clamshell-2.4.conf new file mode 100644 index 0000000000..d61dc197b2 --- /dev/null +++ b/openembedded/conf/machine/zaurus-clamshell-2.4.conf @@ -0,0 +1,48 @@ +# Zaurus Clamshell specific configuration for kernel 2.4 +# Don't forget to include zaurus-clamshell.conf as well + +PREFERRED_PROVIDERS_append_c7x0 = " virtual/kernel:c7x0-kernels-2.4-embedix" +PREFERRED_PROVIDERS_append_akita = " virtual/kernel:openzaurus-pxa27x" +PREFERRED_PROVIDERS_append_spitz = " virtual/kernel:openzaurus-pxa27x" +PREFERRED_PROVIDERS_append_borzoi = " virtual/kernel:openzaurus-pxa27x" + +# Later versions are broken on kernel 2.4 +PREFERRED_VERSION_orinoco-modules = "0.13e" + +BOOTSTRAP_EXTRA_DEPENDS += "virtual/kernel hostap-modules orinoco-modules sharp-sdmmc-support \ +pcmcia-cs apmd wireless-tools console-tools irda-utils lrzsz hostap-utils prism3-firmware prism3-support \ +wpa-supplicant-nossl ppp ppp-dialin openswan" + +BOOTSTRAP_EXTRA_RDEPENDS += "kernel hostap-modules-cs orinoco-modules-cs sharp-sdmmc-support \ +pcmcia-cs apmd apm wireless-tools console-tools irda-utils hostap-utils prism3-firmware prism3-support \ +wpa-supplicant-nossl ppp ppp-dialin openswan" + +# Misc Modules +BOOTSTRAP_EXTRA_RDEPENDS += "kernel-module-net-fd kernel-module-registers" + +# USB Client Modules +BOOTSTRAP_EXTRA_RDEPENDS += "kernel-module-usbdcore kernel-module-usbdmonitor" + +# Bluetooth Modules +BOOTSTRAP_EXTRA_RDEPENDS += "kernel-module-bluez kernel-module-l2cap kernel-module-rfcomm kernel-module-hci-vhci \ + kernel-module-bnep kernel-module-hidp kernel-module-hci-uart kernel-module-sco \ + kernel-module-bluecard-cs kernel-module-btuart-cs kernel-module-dtl1-cs \ + kernel-module-firmware-class kernel-module-bt3c-cs" + +# BI Module +BOOTSTRAP_EXTRA_RDEPENDS_append_c7x0 = " kernel-module-pxa-bi" +BOOTSTRAP_EXTRA_RDEPENDS_append_spitz = " kernel-module-pxa27x-bi" +BOOTSTRAP_EXTRA_RDEPENDS_append_akita = " kernel-module-pxa27x-bi" +BOOTSTRAP_EXTRA_RDEPENDS_append_borzoi = " kernel-module-pxa27x-bi" + +# USB Host Modules +BOOTSTRAP_EXTRA_RDEPENDS_append_spitz = " kernel-module-usbcore kernel-module-usbmouse kernel-module-usb-monitor \ + kernel-module-usbkbd kernel-module-usb-storage kernel-module-hci-usb \ + kernel-module-usb-ohci-pxa27x kernel-module-bfusb" +BOOTSTRAP_EXTRA_RDEPENDS_append_akita = " kernel-module-usbcore kernel-module-usbmouse kernel-module-usb-monitor \ + kernel-module-usbkbd kernel-module-usb-storage kernel-module-hci-usb \ + kernel-module-usb-ohci-pxa27x kernel-module-bfusb" +BOOTSTRAP_EXTRA_RDEPENDS_append_borzoi = " kernel-module-usbcore kernel-module-usbmouse kernel-module-usb-monitor \ + kernel-module-usbkbd kernel-module-usb-storage kernel-module-hci-usb \ + kernel-module-usb-ohci-pxa27x kernel-module-bfusb" + diff --git a/openembedded/conf/machine/zaurus-clamshell-2.6.conf b/openembedded/conf/machine/zaurus-clamshell-2.6.conf new file mode 100644 index 0000000000..b3e0a50bc6 --- /dev/null +++ b/openembedded/conf/machine/zaurus-clamshell-2.6.conf @@ -0,0 +1,36 @@ +# Zaurus Clamshell specific configuration for kernel 2.6 +# Don't forget to include zaurus-clamshell.conf as well + +PREFERRED_PROVIDER_virtual/kernel = "linux-openzaurus" +PREFERRED_VERSION_orinoco-modules = "0.15rc1" + +BOOTSTRAP_EXTRA_DEPENDS += "virtual/kernel udev sysfsutils hostap-modules orinoco-modules \ +pcmcia-cs apmd wireless-tools console-tools irda-utils lrzsz hostap-utils prism3-firmware prism3-support \ +ppp ppp-dialin openswan wpa-supplicant-nossl" + +BOOTSTRAP_EXTRA_RDEPENDS += "kernel udev sysfsutils hostap-modules-cs orinoco-modules-cs \ +pcmcia-cs apm wireless-tools irda-utils udev-utils console-tools hostap-utils prism3-firmware prism3-support \ +ppp ppp-dialin openswan wpa-supplicant-nossl" + +# Ethernet modules +BOOTSTRAP_EXTRA_RDEPENDS += "kernel-module-pcnet-cs" +# NFS Modules +BOOTSTRAP_EXTRA_RDEPENDS += "kernel-module-nfs kernel-module-lockd kernel-module-sunrpc" +# Crypto Modules +BOOTSTRAP_EXTRA_RDEPENDS += "kernel-module-des kernel-module-md5" +# SMB and CRAMFS +BOOTSTRAP_EXTRA_RDEPENDS += "kernel-module-smbfs kernel-module-cramfs" +# Serial Modules +BOOTSTRAP_EXTRA_RDEPENDS += "kernel-module-8250 kernel-module-serial-cs" +# Bluetooth Modules +BOOTSTRAP_EXTRA_RDEPENDS += "kernel-module-bluetooth kernel-module-l2cap kernel-module-rfcomm kernel-module-hci-vhci \ + kernel-module-bnep kernel-module-hidp kernel-module-hci-uart kernel-module-sco \ + kernel-module-bt3c-cs kernel-module-bluecard-cs kernel-module-btuart-cs kernel-module-dtl1-cs" +# Infrared Modules +#BOOTSTRAP_EXTRA_RDEPENDS += "kernel-module-pxaficp-ir kernel-module-irda kernel-module-ircomm +# kernel-module-ircomm-tty kernel-module-irlan kernel-module-irnet kernel-module-ir-usb" + +# USB Gadget Modules +#BOOTSTRAP_EXTRA_RDEPENDS += "kernel-module-gadgetfs kernel-module-g-file-storage \ +# kernel-module-g-serial kernel-module-g-ether" + diff --git a/openembedded/conf/machine/zaurus-clamshell.conf b/openembedded/conf/machine/zaurus-clamshell.conf new file mode 100644 index 0000000000..f55f2d2554 --- /dev/null +++ b/openembedded/conf/machine/zaurus-clamshell.conf @@ -0,0 +1,25 @@ +TARGET_ARCH = "arm" +IPKG_ARCHS = "all arm armv4 armv5te c7x0" + +PREFERRED_PROVIDER_xserver = "xserver-kdrive" + +EXTRA_IMAGECMD_jffs2 = "--pad --little-endian --eraseblock=0x4000 -n" +EXTRA_IMAGEDEPENDS = "sharp-flash-header-c700" + +IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime \ + --output=${T}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}; \ + cat ${STAGING_LIBDIR}/sharp-flash-header/header-c700.bin \ + ${T}/${IMAGE_NAME}.rootfs.jffs2 > ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.img" + +BOOTSTRAP_EXTRA_DEPENDS += "zaurus-updater" + +GUI_MACHINE_CLASS = "bigscreen" +GPE_EXTRA_DEPENDS += "gaim sylpheed chkhinge" +GPE_EXTRA_INSTALL += "gaim sylpheed chkhinge" + +include conf/machine/handheld-common.conf + +# Use tune-xscale per default. Machine independent feeds should be built with tune-strongarm. +include conf/machine/tune-xscale.conf + +SERIAL_CONSOLE = "115200 ttyS0" diff --git a/openembedded/files/device_table-minimal.txt b/openembedded/files/device_table-minimal.txt new file mode 100644 index 0000000000..66cafae8c5 --- /dev/null +++ b/openembedded/files/device_table-minimal.txt @@ -0,0 +1,20 @@ +/dev/initctl p 600 0 0 - - - - +/dev/apm_bios c 660 0 46 10 134 - - - +/dev/fb0 c 600 0 0 29 0 - - - +/dev/hda b 660 0 6 3 0 - - - +/dev/hda b 660 0 6 3 1 1 1 20 +/dev/kmem c 640 0 15 1 2 - - - +/dev/mem c 640 0 15 1 1 - - - +/dev/null c 666 0 0 1 3 - - - +/dev/ram b 640 0 0 1 0 0 1 4 +/dev/tty c 662 0 5 5 0 - - - +/dev/tty c 666 0 5 4 0 0 1 9 +/dev/ttyS c 640 0 5 4 64 0 1 1 +/dev/ttySA c 640 0 5 204 5 0 1 1 +/dev/zero c 644 0 0 1 5 - - +/dev/mtd c 660 0 6 90 0 0 2 8 +/dev/mtdblock b 640 0 0 31 0 0 1 8 +/dev/console c 662 0 5 5 1 - - +/bin/tinylogin f 4755 0 0 - - - - +/bin/mount f 4755 0 0 - - - - +/bin/umount f 4755 0 0 - - - - diff --git a/openembedded/files/device_table-openslug.txt b/openembedded/files/device_table-openslug.txt new file mode 100644 index 0000000000..b3ee0cb4dc --- /dev/null +++ b/openembedded/files/device_table-openslug.txt @@ -0,0 +1,41 @@ +# +# /dev/mem c 640 0 0 1 1 0 0 - +# f A regular file +# d Directory +# c Character special device file +# b Block special device file +# p Fifo (named pipe) +/dev d 755 0 0 - - - - - +/dev/buzzer c 660 0 0 62 0 - - - +/dev/console c 622 0 0 5 1 - - - +/dev/cua c 622 0 0 5 64 0 1 2 +/dev/flash d 755 0 0 - - - - - +/dev/flash/config c 644 0 0 90 6 - - - +/dev/ipsec c 644 0 0 36 10 - - - +/dev/kmem c 640 0 0 1 2 - - - +/dev/leds c 660 0 0 126 0 - - - +/dev/mem c 640 0 0 1 1 - - - +/dev/mtd c 664 0 0 90 0 0 2 4 +/dev/mtdblock b 644 0 0 31 0 0 1 4 +/dev/mtdr c 664 0 0 90 0 1 2 4 +/dev/null c 666 0 0 1 3 - - - +/dev/pbuttons c 660 0 0 61 0 - - - +/dev/ppp c 644 0 0 108 0 - - - +/dev/ptyp c 644 0 0 2 0 0 1 10 +/dev/ram b 644 0 0 1 0 0 1 4 +/dev/random c 644 0 0 1 8 - - - +/dev/rbuttons c 660 0 0 60 0 - - - +/dev/rtc c 644 0 0 10 135 - - - +/dev/sda b 664 0 0 8 0 - - - +/dev/sda b 664 0 0 8 1 1 1 5 +/dev/sdb b 664 0 0 8 16 - - - +/dev/sdb b 664 0 0 8 17 1 1 5 +/dev/sdc b 664 0 0 8 32 - - - +/dev/sdc b 664 0 0 8 33 1 1 5 +/dev/tty c 666 0 0 5 0 - - - +/dev/tty c 644 0 0 4 0 0 1 10 +/dev/ttyS c 644 0 0 4 64 0 1 2 +/dev/ttyp c 644 0 0 3 0 0 1 10 +/dev/urandom c 644 0 0 1 9 - - - +/dev/zero c 666 0 0 1 5 - - - +/bin/tinylogin f 6755 0 0 - - - - - diff --git a/openembedded/files/device_table-unslung.txt b/openembedded/files/device_table-unslung.txt new file mode 100644 index 0000000000..7fdd4df68b --- /dev/null +++ b/openembedded/files/device_table-unslung.txt @@ -0,0 +1,51 @@ +# +# /dev/mem c 640 0 0 1 1 0 0 - +# f A regular file +# d Directory +# c Character special device file +# b Block special device file +# p Fifo (named pipe) +/dev d 755 0 0 - - - - - +/dev/console c 622 0 0 5 1 - - - +/dev/cua c 622 0 0 5 64 0 1 2 +/dev/dsp c 644 0 0 14 3 - - - +/dev/flash d 755 0 0 - - - - - +/dev/flash/config c 644 0 0 90 6 - - - +/dev/ipsec c 644 0 0 36 10 - - - +/dev/kmem c 640 0 0 1 2 - - - +/dev/ledman c 644 0 0 126 0 - - - +/dev/md b 644 0 0 9 0 0 1 4 +/dev/lp c 664 0 0 180 0 0 1 4 +/dev/mem c 640 0 0 1 1 - - - +/dev/mtd c 664 0 0 90 0 0 2 8 +/dev/mtdblock b 644 0 0 31 0 0 1 8 +/dev/mtdr c 664 0 0 90 0 1 2 8 +/dev/null c 666 0 0 1 3 - - - +/dev/pbuttons c 664 0 0 60 0 - - - +/dev/ppp c 644 0 0 108 0 - - - +/dev/ptyp c 644 0 0 2 0 0 1 10 +/dev/ram b 644 0 0 1 0 0 1 4 +/dev/random c 644 0 0 1 8 - - - +/dev/rbuttons c 644 0 0 61 0 - - - +/dev/rtc c 644 0 0 10 135 - - - +/dev/scd b 664 0 0 11 0 0 1 4 +/dev/sda b 664 0 0 8 0 - - - +/dev/sda b 664 0 0 8 1 1 1 16 +/dev/sdb b 664 0 0 8 16 - - - +/dev/sdb b 664 0 0 8 17 1 1 16 +/dev/sdc b 664 0 0 8 32 - - - +/dev/sdc b 664 0 0 8 33 1 1 16 +/dev/sdd b 664 0 0 8 48 - - - +/dev/sdd b 664 0 0 8 49 1 1 16 +/dev/sde b 664 0 0 8 64 - - - +/dev/sde b 664 0 0 8 65 1 1 16 +/dev/st c 664 0 0 9 0 0 1 4 +/dev/tty c 666 0 0 5 0 - - - +/dev/tty c 644 0 0 4 0 0 1 10 +/dev/ttyS c 644 0 0 4 64 0 1 2 +/dev/ttyp c 644 0 0 3 0 0 1 10 +/dev/ttyUSB c 644 0 0 188 0 0 1 4 +/dev/urandom c 644 0 0 1 9 - - - +/dev/video c 664 0 0 81 0 0 1 4 +/dev/zero c 666 0 0 1 5 - - - +/bin/tinylogin f 6755 0 0 - - - - - diff --git a/openembedded/packages/apmd/apmd-3.2.2/apmd_proxy b/openembedded/packages/apmd/apmd-3.2.2/apmd_proxy new file mode 100644 index 0000000000..c48ee4e5d5 --- /dev/null +++ b/openembedded/packages/apmd/apmd-3.2.2/apmd_proxy @@ -0,0 +1,91 @@ +#!/bin/sh +# +# apmd_proxy - program dispatcher for APM daemon +# +# Written by Craig Markwardt (craigm@lheamail.gsfc.nasa.gov) 21 May 1999 +# Modified for Debian by Avery Pennarun +# +# This shell script is called by the APM daemon (apmd) when a power +# management event occurs. Its first and second arguments describe the +# event. For example, apmd will call "apmd_proxy suspend system" just +# before the system is suspended. +# +# Here are the possible arguments: +# +# start - APM daemon has started +# stop - APM daemon is shutting down +# suspend critical - APM system indicates critical suspend (++) +# suspend system - APM system has requested suspend mode +# suspend user - User has requested suspend mode +# standby system - APM system has requested standby mode +# standby user - User has requested standby mode +# resume suspend - System has resumed from suspend mode +# resume standby - System has resumed from standby mode +# resume critical - System has resumed from critical suspend +# change battery - APM system reported low battery +# change power - APM system reported AC/battery change +# change time - APM system reported time change (*) +# change capability - APM system reported config. change (+) +# +# (*) - APM daemon may be configured to not call these sequences +# (+) - Available if APM kernel supports it. +# (++) - "suspend critical" is never passed to apmd from the kernel, +# so we will never see it here. Scripts that process "resume +# critical" events need to take this into account. +# +# It is the proxy script's responsibility to examine the APM status +# (via /proc/apm) or other status and to take appropriate actions. +# For example, the script might unmount network drives before the +# machine is suspended. +# +# In Debian, the usual way of adding functionality to the proxy is to +# add a script to /etc/apm/event.d. This script will be called by +# apmd_proxy (via run-parts) with the same arguments. +# +# If it is important that a certain set of script be run in a certain +# order on suspend and in a different order on resume, then put all +# the scripts in /etc/apm/scripts.d instead of /etc/apm/event.d and +# symlink to these from /etc/apm/suspend.d, /etc/apm/resume.d and +# /etc/apm/other.d using names whose lexicographical order is the same +# as the desired order of execution. +# +# If the kernel's APM driver supports it, apmd_proxy can return a non-zero +# exit status on suspend and standby events, indicating that the suspend +# or standby event should be rejected. +# +# ******************************************************************* + +set -e + +# The following doesn't yet work, because current kernels (up to at least +# 2.4.20) do not support rejection of APM events. Supporting this would +# require substantial modifications to the APM driver. We will re-enable +# this feature if the driver is ever modified. -- cph@debian.org +# +#SUSPEND_ON_AC=false +#[ -r /etc/apm/apmd_proxy.conf ] && . /etc/apm/apmd_proxy.conf +# +#if [ "${SUSPEND_ON_AC}" = "false" -a "${2}" = "system" ] \ +# && on_ac_power >/dev/null; then +# # Reject system suspends and standbys if we are on AC power +# exit 1 # Reject (NOTE kernel support must be enabled) +#fi + +if [ "${1}" = "suspend" -o "${1}" = "standby" ]; then + run-parts -a "${1}" -a "${2}" /etc/apm/event.d + if [ -d /etc/apm/suspend.d ]; then + run-parts -a "${1}" -a "${2}" /etc/apm/suspend.d + fi +elif [ "${1}" = "resume" ]; then + if [ -d /etc/apm/resume.d ]; then + run-parts -a "${1}" -a "${2}" /etc/apm/resume.d + fi + run-parts -a "${1}" -a "${2}" /etc/apm/event.d +else + run-parts -a "${1}" -a "${2}" /etc/apm/event.d + if [ -d /etc/apm/other.d ]; then + run-parts -a "${1}" -a "${2}" /etc/apm/other.d + fi +fi + +exit 0 diff --git a/openembedded/packages/apmd/apmd-3.2.2/apmd_proxy.conf b/openembedded/packages/apmd/apmd-3.2.2/apmd_proxy.conf new file mode 100644 index 0000000000..751145c522 --- /dev/null +++ b/openembedded/packages/apmd/apmd-3.2.2/apmd_proxy.conf @@ -0,0 +1,16 @@ +# /etc/apm/apmd_proxy.conf: configuration file for apmd. +# +# This file is managed by debconf when installing or reconfiguring the +# package. It is generated by merging the answers gathered by debconf +# into the template file "/usr/share/apmd/apmd_proxy.conf". + +# The following doesn't yet work, because current kernels (up to at least +# 2.4.20) do not support rejection of APM events. Supporting this would +# require substantial modifications to the APM driver. We will re-enable +# this feature if the driver is ever modified. -- cph@debian.org +# +# Set the following to "false" if you want to reject system suspend or +# system standby requests when the computer is running on AC power. +# Otherwise set this to "true". Such requests are never rejected when +# the computer is running on battery power. +#SUSPEND_ON_AC=true diff --git a/openembedded/packages/apmd/apmd-3.2.2/apmwrapper b/openembedded/packages/apmd/apmd-3.2.2/apmwrapper new file mode 100644 index 0000000000..3bc9bece3d --- /dev/null +++ b/openembedded/packages/apmd/apmd-3.2.2/apmwrapper @@ -0,0 +1,9 @@ +#!/bin/sh + +if ( cat /proc/cpuinfo|grep -i hardware|grep -i SHARP ) && \ + [ ".$@" = ".-s" -o ".$@" = ".--suspend" ]; then + killall -USR1 apmd || /usr/bin/apm.orig -s +else + /usr/bin/apm.orig "$@" +fi + diff --git a/openembedded/packages/apmd/apmd-3.2.2/debian.patch b/openembedded/packages/apmd/apmd-3.2.2/debian.patch new file mode 100644 index 0000000000..d49e524bbd --- /dev/null +++ b/openembedded/packages/apmd/apmd-3.2.2/debian.patch @@ -0,0 +1,54 @@ +--- apmd-3.2.2.orig/apmd.c ++++ apmd-3.2.2/apmd.c +@@ -343,7 +343,7 @@ + /* parent */ + int status, retval; + ssize_t len; +- time_t time_limit; ++ time_t countdown; + + if (pid < 0) { + /* Couldn't fork */ +@@ -356,8 +356,9 @@ + /* Capture the child's output, if any, but only until it terminates */ + close(fds[1]); + fcntl(fds[0], F_SETFL, O_RDONLY|O_NONBLOCK); +- time_limit = time(0) + proxy_timeout; ++ countdown = proxy_timeout; + do { ++ countdown -= 1; + while ((len = read(fds[0], line, sizeof(line)-1)) > 0) { + line[len] = 0; + APMD_SYSLOG(LOG_INFO, "+ %s", line); +@@ -372,16 +373,16 @@ + goto proxy_done; + } + +- sleep(1); ++ while (sleep(1) > 0) ; + } while ( +- (time(0) < time_limit) ++ (countdown >= 0) + || (proxy_timeout < 0) + ); + + APMD_SYSLOG(LOG_NOTICE, "Proxy has been running more than %d seconds; killing it", proxy_timeout); + + kill(pid, SIGTERM); +- time_limit = time(0) + 5; ++ countdown = 5; + do { + retval = waitpid(pid, &status, WNOHANG); + if (retval == pid) +@@ -392,9 +393,9 @@ + goto proxy_done; + } + +- sleep(1); ++ while (sleep(1) > 0) ; + +- } while (time(0) < time_limit); ++ } while (countdown >= 0); + + kill(pid, SIGKILL); + status = __W_EXITCODE(0, SIGKILL); diff --git a/openembedded/packages/apmd/apmd-3.2.2/default b/openembedded/packages/apmd/apmd-3.2.2/default new file mode 100644 index 0000000000..4b7965abf8 --- /dev/null +++ b/openembedded/packages/apmd/apmd-3.2.2/default @@ -0,0 +1,8 @@ +# +# Default for /etc/init.d/apmd +# + +# As apmd can be called with arguments, we use the following variable +# to store them, e.g., APMD="-w 5 -p 2". +# See the manual page apmd(8) for details. +APMD="--proxy-timeout 30" diff --git a/openembedded/packages/apmd/apmd-3.2.2/devfs.patch b/openembedded/packages/apmd/apmd-3.2.2/devfs.patch new file mode 100644 index 0000000000..b11e01929b --- /dev/null +++ b/openembedded/packages/apmd/apmd-3.2.2/devfs.patch @@ -0,0 +1,11 @@ +--- apmd-3.2.0.orig/apm.h~devfs ++++ apmd-3.2.0.orig/apm.h +@@ -24,7 +24,7 @@ + #include + + #define APM_PROC "/proc/apm" +-#define APM_DEVICE "/dev/apm_bios" ++#define APM_DEVICE "/dev/misc/apm_bios" + + #define APM_DEV "/proc/devices" + #define APM_NAME "apm_bios" diff --git a/openembedded/packages/apmd/apmd-3.2.2/hwclock b/openembedded/packages/apmd/apmd-3.2.2/hwclock new file mode 100644 index 0000000000..a1c1c2294c --- /dev/null +++ b/openembedded/packages/apmd/apmd-3.2.2/hwclock @@ -0,0 +1,16 @@ +#!/bin/sh +# Preserve the system clock around suspend/resume. + +INIT="/etc/init.d/hwclock.sh" +[ -x "${INIT}" ] || exit 0 + +case "${1},${2}" in +(suspend,*) + "${INIT}" stop + ;; +(resume,suspend) + "${INIT}" start + ;; +esac + +exit 0 diff --git a/openembedded/packages/apmd/apmd-3.2.2/init b/openembedded/packages/apmd/apmd-3.2.2/init new file mode 100755 index 0000000000..f1098a752d --- /dev/null +++ b/openembedded/packages/apmd/apmd-3.2.2/init @@ -0,0 +1,44 @@ +#!/bin/sh +# +# Start or stop the Advanced Power Management daemon. +# +# Written by Dirk Eddelbuettel +# Greatly modified by Avery Pennarun +# +# I think this script is now free of bashisms. +# Please correct me if I'm wrong! + +PATH=/bin:/usr/bin:/sbin:/usr/sbin + +[ -f /etc/default/rcS ] && . /etc/default/rcS +[ -f /etc/default/apmd ] && . /etc/default/apmd + +case "$1" in + start) + echo -n "Starting advanced power management daemon: " + start-stop-daemon -S -x /usr/sbin/apmd -- \ + -P /etc/apm/apmd_proxy $APMD + if [ $? = 0 ]; then + echo "apmd." + else + echo "(failed.)" + fi + ;; + stop) + echo -n "Stopping advanced power management daemon: " + start-stop-daemon -K \ + -x /usr/sbin/apmd + echo "apmd." + ;; + restart|force-reload) + $0 stop + $0 start + exit + ;; + *) + echo "Usage: /etc/init.d/apmd {start|stop|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 diff --git a/openembedded/packages/apmd/apmd-3.2.2/logcheck.ignore.paranoid b/openembedded/packages/apmd/apmd-3.2.2/logcheck.ignore.paranoid new file mode 100644 index 0000000000..de37f01a2d --- /dev/null +++ b/openembedded/packages/apmd/apmd-3.2.2/logcheck.ignore.paranoid @@ -0,0 +1,13 @@ +apmd\[[0-9]+\]: (Normal|Standby|Critical) Resume +apmd\[[0-9]+\]: (Now using|Using) (AC|battery|backup) power +apmd\[[0-9]+\]: (System|User) (Standby|Suspend) +apmd\[[0-9]+\]: (apmd_)?call_proxy: +apmd\[[0-9]+\]: Battery: [0-9]+%, +apmd\[[0-9]+\]: Battery: absent +apmd\[[0-9]+\]: Capability Change +apmd\[[0-9]+\]: Exiting +apmd\[[0-9]+\]: Performing APM status check +apmd\[[0-9]+\]: Suspending now +apmd\[[0-9]+\]: Update Time +apmd\[[0-9]+\]: Version: apmd [0-9.]+, (apm )?driver [0-9.]+, APM BIOS [0-9.]+ +apmd\[[0-9]+\]: apmd [0-9.]+ interfacing with apm driver [0-9.]+ and APM BIOS [0-9.]+ diff --git a/openembedded/packages/apmd/apmd-3.2.2/workaround.patch b/openembedded/packages/apmd/apmd-3.2.2/workaround.patch new file mode 100644 index 0000000000..19cf073115 --- /dev/null +++ b/openembedded/packages/apmd/apmd-3.2.2/workaround.patch @@ -0,0 +1,55 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- apmd-3.2.2.orig/apmd.c~workaround.patch ++++ apmd-3.2.2.orig/apmd.c +@@ -158,6 +158,7 @@ + static int quiet_bios_batlow; /* = 0 */ + static int verbosity = DEFAULT_VERBOSITY; + static int warn_level = 10; ++static int sleep_now = 0; /* ntp */ + + static uid_t apmd_uid = 0; + static int apmd_fd = -1; +@@ -942,6 +943,12 @@ + exit(0); + } + ++/* ntp */ ++static void sig_usr1(int sig) ++{ ++ sleep_now = 1; ++} ++ + int main(int argc, char **argv) + { + int c; +@@ -1151,6 +1158,8 @@ + openlog("apmd", (verbosity>=LOG_DEBUG)?LOG_PERROR:0 | LOG_PID | LOG_CONS, LOG_DAEMON); + + /* Set up signal handler */ ++ if (signal(SIGUSR1, SIG_IGN) != SIG_IGN) ++ signal(SIGUSR1, sig_usr1); /* ntp */ + if (signal(SIGINT, SIG_IGN) != SIG_IGN) + signal(SIGINT, sig_handler); + if (signal(SIGQUIT, SIG_IGN) != SIG_IGN) +@@ -1230,9 +1239,16 @@ + + for (;;) + { +- int num_events = apm_get_events(apmd_fd, check_interval, events, MAX_EVENTS); ++ int num_events; + int e, a; + ++ /* ntp */ ++ if (sleep_now) { ++ sleep_now = 0; ++ handle_event(APM_USER_SUSPEND, &apminfo); ++ } ++ ++ num_events = apm_get_events(apmd_fd, check_interval, events, MAX_EVENTS); + apm_read(&apminfo); + + if (num_events == 0) { diff --git a/openembedded/packages/apmd/apmd_3.2.2.bb b/openembedded/packages/apmd/apmd_3.2.2.bb new file mode 100644 index 0000000000..0e8b364458 --- /dev/null +++ b/openembedded/packages/apmd/apmd_3.2.2.bb @@ -0,0 +1,83 @@ +DESCRIPTION = "Set of tools for managing notebook power consumption." +SECTION = "base" +PRIORITY = "required" +DEPENDS = "libtool-cross" +LICENSE = "GPL" +PR = "r5" + +SRC_URI = "${DEBIAN_MIRROR}/main/a/apmd/apmd_${PV}.orig.tar.gz; \ + file://debian.patch;patch=1 \ + file://workaround.patch;patch=1 \ + file://apmwrapper \ + file://init \ + file://default \ + file://apmd_proxy \ + file://apmd_proxy.conf" + +S = "${WORKDIR}/apmd-${PV}.orig" + +inherit update-rc.d + +INITSCRIPT_NAME = "apmd" +INITSCRIPT_PARAMS = "defaults" + +do_compile() { + oe_runmake "LIBTOOL=${STAGING_BINDIR}/${TARGET_PREFIX}libtool" apm apmd +} + +do_stage() { + install -m 0644 apm.h ${STAGING_INCDIR} + oe_libinstall -so libapm ${STAGING_LIBDIR} +} + +do_install() { + install -d ${D}${sysconfdir} + install -d ${D}${sysconfdir}/apm + install -d ${D}${sysconfdir}/apm/event.d + install -d ${D}${sysconfdir}/apm/other.d + install -d ${D}${sysconfdir}/apm/suspend.d + install -d ${D}${sysconfdir}/apm/resume.d + install -d ${D}${sysconfdir}/apm/scripts.d + install -d ${D}${sysconfdir}/default + install -d ${D}${sysconfdir}/init.d + install -d ${D}${sbindir} + install -d ${D}${bindir} + install -d ${D}${libdir} + install -d ${D}${datadir}/apmd +# +# only Zaurus 2.4-embedix kernels need a breadead apm hack +# +# + case ${MACHINE} in + collie | poodle | tosa | c7x0 | akita | spitz | borzoi) + if [ "${KERNEL_VERSION}" == "2.6" ] + then + install -m 4577 ${S}/.libs/apm ${D}${bindir}/apm + else + install -m 4755 ${S}/.libs/apm ${D}${bindir}/apm.orig + install -m 0755 ${WORKDIR}/apmwrapper ${D}${bindir}/apm + fi + ;; + *) + install -m 4577 ${S}/.libs/apm ${D}${bindir}/apm + ;; + esac + + install -m 0755 ${S}/.libs/apmd ${D}${sbindir}/apmd + install -m 0755 ${WORKDIR}/apmd_proxy ${D}${sysconfdir}/apm/ + install -m 0644 ${WORKDIR}/apmd_proxy.conf ${D}${datadir}/apmd/ + install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/apmd + oe_libinstall -so libapm ${D}${libdir} + install -m 0644 apm.h ${D}${includedir} + + cat ${WORKDIR}/init | sed -e 's,/usr/sbin,${sbindir},g; s,/etc,${sysconfdir},g;' > ${D}${sysconfdir}/init.d/apmd + chmod 755 ${D}${sysconfdir}/init.d/apmd +} + +PACKAGES =+ "libapm libapm-dev apm" + +FILES_libapm = "${libdir}/libapm.so.*" +FILES_libapm-dev = "${libdir}/libapm.* ${includedir}" +FILES_apm = "${bindir}/apm*" + + diff --git a/openembedded/packages/autoconf/autoconf-2.59/autoconf259-update-configscripts.patch b/openembedded/packages/autoconf/autoconf-2.59/autoconf259-update-configscripts.patch new file mode 100644 index 0000000000..77be3c647c --- /dev/null +++ b/openembedded/packages/autoconf/autoconf-2.59/autoconf259-update-configscripts.patch @@ -0,0 +1,393 @@ +--- autoconf-2.59/config/config.guess.old 2003-10-23 10:28:51.000000000 -0400 ++++ autoconf-2.59/config/config.guess 2004-04-24 22:36:28.000000000 -0400 +@@ -3,7 +3,7 @@ + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +-timestamp='2003-10-03' ++timestamp='2004-03-12' + + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by +@@ -197,12 +197,18 @@ + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; ++ amd64:OpenBSD:*:*) ++ echo x86_64-unknown-openbsd${UNAME_RELEASE} ++ exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; ++ cats:OpenBSD:*:*) ++ echo arm-unknown-openbsd${UNAME_RELEASE} ++ exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; +@@ -221,6 +227,9 @@ + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; ++ pegasos:OpenBSD:*:*) ++ echo powerpc-unknown-openbsd${UNAME_RELEASE} ++ exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; +@@ -236,10 +245,24 @@ + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; ++ *:ekkoBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} ++ exit 0 ;; ++ macppc:MirBSD:*:*) ++ echo powerppc-unknown-mirbsd${UNAME_RELEASE} ++ exit 0 ;; ++ *:MirBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} ++ exit 0 ;; + alpha:OSF1:*:*) +- if test $UNAME_RELEASE = "V4.0"; then ++ case $UNAME_RELEASE in ++ *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` +- fi ++ ;; ++ *5.*) ++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ++ ;; ++ esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU +@@ -277,11 +300,12 @@ + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac ++ # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. +- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` ++ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha*:OpenVMS:*:*) + echo alpha-hp-vms +@@ -307,6 +331,9 @@ + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; ++ *:OS400:*:*) ++ echo powerpc-ibm-os400 ++ exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; +@@ -399,6 +426,9 @@ + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; ++ m68k:machten:*:*) ++ echo m68k-apple-machten${UNAME_RELEASE} ++ exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; +@@ -742,6 +772,11 @@ + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; ++ 5000:UNIX_System_V:4.*:*) ++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ++ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` ++ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" ++ exit 0 ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; +@@ -751,7 +786,7 @@ + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; +- *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) ++ *:FreeBSD:*:*) + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +@@ -763,7 +798,7 @@ + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` +- # GNU/FreeBSD systems have a "k" prefix to indicate we are using ++ # GNU/KFreeBSD systems have a "k" prefix to indicate we are using + # FreeBSD's kernel, but not the complete OS. + case ${LIBC} in gnu) kernel_only='k' ;; esac + echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} +@@ -799,8 +834,13 @@ + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) ++ # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; ++ *:GNU/*:*:*) ++ # other systems with GNU libc and userland ++ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu ++ exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; +@@ -813,6 +853,9 @@ + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; ++ m32r*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; +@@ -981,6 +1024,9 @@ + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; ++ i*86:syllable:*:*) ++ echo ${UNAME_MACHINE}-pc-syllable ++ exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; +@@ -1052,7 +1098,7 @@ + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; +- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) ++ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` +@@ -1167,7 +1213,7 @@ + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; +- NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*) ++ NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) +@@ -1211,6 +1257,9 @@ + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit 0 ;; ++ *:DragonFly:*:*) ++ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ++ exit 0 ;; + esac + + #echo '(No uname command or uname output not recognized.)' 1>&2 +--- autoconf-2.59/config/config.sub.old 2003-10-23 10:28:51.000000000 -0400 ++++ autoconf-2.59/config/config.sub 2004-04-24 22:36:28.000000000 -0400 +@@ -3,7 +3,7 @@ + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +-timestamp='2003-08-18' ++timestamp='2004-03-12' + + # This file is (in principle) common to ALL GNU software. + # The presence of a machine in this file suggests that SOME GNU software +@@ -118,7 +118,8 @@ + # Here we must recognize all the valid KERNEL-OS combinations. + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` + case $maybe_os in +- nto-qnx* | linux-gnu* | linux-dietlibc | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) ++ nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ ++ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; +@@ -236,7 +237,7 @@ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ +- | m32r | m68000 | m68k | m88k | mcore \ ++ | m32r | m32rle | m68000 | m68k | m88k | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ +@@ -261,7 +262,7 @@ + | pyramid \ + | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ +- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ ++ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ +@@ -307,7 +308,7 @@ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ +- | m32r-* \ ++ | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ +@@ -335,7 +336,7 @@ + | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ +- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ ++ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ +@@ -362,6 +363,9 @@ + basic_machine=a29k-amd + os=-udi + ;; ++ abacus) ++ basic_machine=abacus-unknown ++ ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout +@@ -379,6 +383,9 @@ + amd64) + basic_machine=x86_64-pc + ;; ++ amd64-*) ++ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; + amdahl) + basic_machine=580-amdahl + os=-sysv +@@ -438,12 +445,20 @@ + basic_machine=j90-cray + os=-unicos + ;; ++ cr16c) ++ basic_machine=cr16c-unknown ++ os=-elf ++ ;; + crds | unos) + basic_machine=m68k-crds + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; ++ crx) ++ basic_machine=crx-unknown ++ os=-elf ++ ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; +@@ -743,6 +758,10 @@ + basic_machine=or32-unknown + os=-coff + ;; ++ os400) ++ basic_machine=powerpc-ibm ++ os=-os400 ++ ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose +@@ -963,6 +982,10 @@ + tower | tower-32) + basic_machine=m68k-ncr + ;; ++ tpf) ++ basic_machine=s390x-ibm ++ os=-tpf ++ ;; + udi29k) + basic_machine=a29k-amd + os=-udi +@@ -1058,7 +1081,7 @@ + sh64) + basic_machine=sh64-unknown + ;; +- sparc | sparcv9 | sparcv9b) ++ sparc | sparcv8 | sparcv9 | sparcv9b) + basic_machine=sparc-sun + ;; + cydra) +@@ -1131,19 +1154,20 @@ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ +- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \ +- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ ++ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ ++ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ ++ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ +- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ ++ | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ +- | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) ++ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) +@@ -1182,6 +1206,9 @@ + -opened*) + os=-openedition + ;; ++ -os400*) ++ os=-os400 ++ ;; + -wince*) + os=-wince + ;; +@@ -1203,6 +1230,9 @@ + -atheos*) + os=-atheos + ;; ++ -syllable*) ++ os=-syllable ++ ;; + -386bsd) + os=-bsd + ;; +@@ -1225,6 +1255,9 @@ + -sinix*) + os=-sysv4 + ;; ++ -tpf*) ++ os=-tpf ++ ;; + -triton*) + os=-sysv3 + ;; +@@ -1473,9 +1506,15 @@ + -mvs* | -opened*) + vendor=ibm + ;; ++ -os400*) ++ vendor=ibm ++ ;; + -ptx*) + vendor=sequent + ;; ++ -tpf*) ++ vendor=ibm ++ ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; diff --git a/openembedded/packages/autoconf/autoconf-2.59/autoheader-nonfatal-warnings.patch b/openembedded/packages/autoconf/autoconf-2.59/autoheader-nonfatal-warnings.patch new file mode 100644 index 0000000000..1f18e04bba --- /dev/null +++ b/openembedded/packages/autoconf/autoconf-2.59/autoheader-nonfatal-warnings.patch @@ -0,0 +1,13 @@ +--- autoconf-2.59/bin/autoheader.in~ 2003-10-10 14:52:56.000000000 +0100 ++++ autoconf-2.59/bin/autoheader.in 2004-05-03 01:36:45.000000000 +0100 +@@ -272,8 +272,8 @@ + } + + } +- exit 1 +- if keys %symbol; ++# exit 1 ++# if keys %symbol; + } + + update_file ("$tmp/config.hin", "$config_h_in"); diff --git a/openembedded/packages/autoconf/autoconf-2.59/autoreconf-exclude.patch b/openembedded/packages/autoconf/autoconf-2.59/autoreconf-exclude.patch new file mode 100644 index 0000000000..7644955519 --- /dev/null +++ b/openembedded/packages/autoconf/autoconf-2.59/autoreconf-exclude.patch @@ -0,0 +1,125 @@ +--- autoconf-2.59/bin/autoreconf.in 2004-05-06 00:27:34.000000000 -0400 ++++ autoconf-2.59.new/bin/autoreconf.in 2004-05-06 00:27:46.000000000 -0400 +@@ -75,6 +75,7 @@ + -f, --force consider all files obsolete + -i, --install copy missing auxiliary files + -s, --symlink with -i, install symbolic links instead of copies ++ -x, --exclude=STEPS steps we should not run + -m, --make when applicable, re-run ./configure && make + -W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax] + +@@ -127,6 +128,13 @@ + # Rerun `./configure && make'? + my $make = 0; + ++# Steps to exclude ++my @exclude; ++my @ex; ++ ++my $uses_gettext; ++my $configure_ac; ++ + ## ---------- ## + ## Routines. ## + ## ---------- ## +@@ -144,6 +152,7 @@ + 'B|prepend-include=s' => \@prepend_include, + 'i|install' => \$install, + 's|symlink' => \$symlink, ++ 'x|exclude=s' => \@exclude, + 'm|make' => \$make); + + # Split the warnings as a list of elements instead of a list of +@@ -152,6 +161,8 @@ + parse_WARNINGS; + parse_warnings '--warnings', @warning; + ++ @exclude = map { split /,/ } @exclude; ++ + # Even if the user specified a configure.ac, trim to get the + # directory, and look for configure.ac again. Because (i) the code + # is simpler, and (ii) we are still able to diagnose simultaneous +@@ -237,6 +249,11 @@ + { + my ($aclocal, $flags) = @_; + ++ @ex = grep (/^aclocal$/, @exclude); ++ if ($#ex != -1) { ++ return; ++ } ++ + # aclocal 1.8+ does all this for free. It can be recognized by its + # --force support. + if ($aclocal_supports_force) +@@ -348,7 +365,10 @@ + } + else + { +- xsystem "$autopoint"; ++ @ex = grep (/^autopoint$/, @exclude); ++ if ($#ex == -1) { ++ xsystem ("$autopoint"); ++ } + } + + +@@ -501,7 +521,10 @@ + } + elsif ($install) + { +- xsystem ($libtoolize); ++ @ex = grep (/^libtoolize$/, @exclude); ++ if ($#ex == -1) { ++ xsystem ("$libtoolize"); ++ } + $rerun_aclocal = 1; + } + else +@@ -541,7 +564,10 @@ + # latter runs the former, and (ii) autoconf is stricter than + # autoheader. So all in all, autoconf should give better error + # messages. +- xsystem ($autoconf); ++ @ex = grep (/^autoconf$/, @exclude); ++ if ($#ex == -1) { ++ xsystem ("$autoconf"); ++ } + + + # -------------------- # +@@ -562,7 +588,10 @@ + } + else + { +- xsystem ($autoheader); ++ @ex = grep (/^autoheader$/, @exclude); ++ if ($#ex == -1) { ++ xsystem ("$autoheader"); ++ } + } + + +@@ -580,7 +609,10 @@ + # We should always run automake, and let it decide whether it shall + # update the file or not. In fact, the effect of `$force' is already + # included in `$automake' via `--no-force'. +- xsystem ($automake); ++ @ex = grep (/^automake$/, @exclude); ++ if ($#ex == -1) { ++ xsystem ("$automake"); ++ } + } + + +@@ -604,7 +636,10 @@ + } + else + { +- xsystem ("make"); ++ @ex = grep (/^make$/, @exclude); ++ if ($#ex == -1) { ++ xsystem ("make"); ++ } + } + } + } diff --git a/openembedded/packages/autoconf/autoconf-2.59/autoreconf-foreign.patch b/openembedded/packages/autoconf/autoconf-2.59/autoreconf-foreign.patch new file mode 100644 index 0000000000..587a823826 --- /dev/null +++ b/openembedded/packages/autoconf/autoconf-2.59/autoreconf-foreign.patch @@ -0,0 +1,11 @@ +--- autoconf-2.59/bin/autoreconf.in~autoreconf-foreign 2004-05-09 20:55:06.000000000 -0400 ++++ autoconf-2.59/bin/autoreconf.in 2004-05-09 20:55:55.000000000 -0400 +@@ -184,6 +184,8 @@ + + $aclocal_supports_force = `$aclocal --help` =~ /--force/; + ++ $automake .= ' --foreign'; ++ + # Dispatch autoreconf's option to the tools. + # --include; + $autoconf .= join (' --include=', '', @include); diff --git a/openembedded/packages/autoconf/autoconf-2.59/autoreconf-gnuconfigize.patch b/openembedded/packages/autoconf/autoconf-2.59/autoreconf-gnuconfigize.patch new file mode 100644 index 0000000000..44709d550a --- /dev/null +++ b/openembedded/packages/autoconf/autoconf-2.59/autoreconf-gnuconfigize.patch @@ -0,0 +1,47 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- autoconf-2.59/bin/autoreconf.in~autoreconf-gnuconfigize 2004-05-14 19:04:35.000000000 -0500 ++++ autoconf-2.59/bin/autoreconf.in 2004-05-14 19:07:34.000000000 -0500 +@@ -58,7 +58,7 @@ + $help = "Usage: $0 [OPTION] ... [CONFIGURE-AC or DIRECTORY] ... + + Run `autoconf' (and `autoheader', `aclocal', `automake', `autopoint' +-(formerly `gettextize'), and `libtoolize' where appropriate) ++(formerly `gettextize'), `libtoolize', and `gnu-configize' where appropriate) + repeatedly to remake the GNU Build System files in the DIRECTORIES or + the directory trees driven by CONFIGURE-AC (defaulting to `.'). + +@@ -105,12 +105,13 @@ + "; + + # Lib files. +-my $autoconf = $ENV{'AUTOCONF'} || '@bindir@/@autoconf-name@'; +-my $autoheader = $ENV{'AUTOHEADER'} || '@bindir@/@autoheader-name@'; +-my $automake = $ENV{'AUTOMAKE'} || 'automake'; +-my $aclocal = $ENV{'ACLOCAL'} || 'aclocal'; +-my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize'; +-my $autopoint = $ENV{'AUTOPOINT'} || 'autopoint'; ++my $autoconf = $ENV{'AUTOCONF'} || '@bindir@/@autoconf-name@'; ++my $autoheader = $ENV{'AUTOHEADER'} || '@bindir@/@autoheader-name@'; ++my $automake = $ENV{'AUTOMAKE'} || 'automake'; ++my $aclocal = $ENV{'ACLOCAL'} || 'aclocal'; ++my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize'; ++my $autopoint = $ENV{'AUTOPOINT'} || 'autopoint'; ++my $gnuconfigize = $ENV{'GNUCONFIGIZE'} || 'gnu-configize'; + + # --install -- as --add-missing in other tools. + my $install = 0; +@@ -617,6 +618,10 @@ + } + } + ++ @ex = grep (/^gnu-configize$/, @exclude); ++ if ($#ex == -1) { ++ xsystem ("$gnuconfigize"); ++ } + + # -------------- # + # Running make. # diff --git a/openembedded/packages/autoconf/autoconf-2.59/autoreconf-include.patch b/openembedded/packages/autoconf/autoconf-2.59/autoreconf-include.patch new file mode 100644 index 0000000000..5a7604b0fd --- /dev/null +++ b/openembedded/packages/autoconf/autoconf-2.59/autoreconf-include.patch @@ -0,0 +1,10 @@ +--- autoconf/bin/autoreconf.in~ 2004-04-06 23:36:10.000000000 +0100 ++++ autoconf/bin/autoreconf.in 2004-04-08 20:51:57.000000000 +0100 +@@ -179,6 +179,7 @@ + $autoconf .= join (' --prepend-include=', '', @prepend_include); + $autoheader .= join (' --include=', '', @include); + $autoheader .= join (' --prepend-include=', '', @prepend_include); ++ $aclocal .= join (' -I ', '', @include); + + # --install and --symlink; + if ($install) diff --git a/openembedded/packages/autoconf/autoconf-2.59/path_prog_fixes.patch b/openembedded/packages/autoconf/autoconf-2.59/path_prog_fixes.patch new file mode 100644 index 0000000000..5f0d055a48 --- /dev/null +++ b/openembedded/packages/autoconf/autoconf-2.59/path_prog_fixes.patch @@ -0,0 +1,126 @@ +Index: autoconf-2.59/bin/autoheader.in +=================================================================== +--- autoconf-2.59.orig/bin/autoheader.in 2005-03-09 16:27:17.933878952 -0500 ++++ autoconf-2.59/bin/autoheader.in 2005-03-09 16:29:57.360642400 -0500 +@@ -1,8 +1,8 @@ +-#! @PERL@ ++#! @bindir@/env perl + # -*- Perl -*- + # @configure_input@ + +-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' ++eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @bindir@/env perl -S "$0" "$@";; esac' + if 0; + + # autoheader -- create `config.h.in' from `configure.ac' +Index: autoconf-2.59/bin/autom4te.in +=================================================================== +--- autoconf-2.59.orig/bin/autom4te.in 2003-10-28 03:48:36.000000000 -0500 ++++ autoconf-2.59/bin/autom4te.in 2005-03-09 16:30:14.957967200 -0500 +@@ -1,8 +1,10 @@ +-#! @PERL@ -w ++#! @bindir@/env perl + # -*- perl -*- + # @configure_input@ + +-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' ++use warnings; ++ ++eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' + if 0; + + # autom4te - Wrapper around M4 libraries. +@@ -87,7 +89,7 @@ + my $freeze = 0; + + # $M4. +-my $m4 = $ENV{"M4"} || '@M4@'; ++my $m4 = $ENV{"M4"} || '@bindir@/env m4'; + # Some non-GNU m4's don't reject the --help option, so give them /dev/null. + fatal "need GNU m4 1.4 or later: $m4" + if system "$m4 --help &1 | grep reload-state >/dev/null"; +Index: autoconf-2.59/bin/autoreconf.in +=================================================================== +--- autoconf-2.59.orig/bin/autoreconf.in 2005-03-09 16:27:17.354966960 -0500 ++++ autoconf-2.59/bin/autoreconf.in 2005-03-09 16:31:19.572144352 -0500 +@@ -1,8 +1,10 @@ +-#! @PERL@ -w ++#! @bindir@/env perl + # -*- perl -*- + # @configure_input@ + +-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' ++use warnings; ++ ++eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' + if 0; + + # autoreconf - install the GNU Build System in a directory tree +Index: autoconf-2.59/bin/autoscan.in +=================================================================== +--- autoconf-2.59.orig/bin/autoscan.in 2003-09-26 08:57:49.000000000 -0400 ++++ autoconf-2.59/bin/autoscan.in 2005-03-09 16:30:18.136483992 -0500 +@@ -1,4 +1,4 @@ +-#! @PERL@ -w ++#! @bindir@/env perl + # -*- perl -*- + # autoscan - Create configure.scan (a preliminary configure.ac) for a package. + # Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003 +@@ -21,7 +21,9 @@ + + # Written by David MacKenzie . + +-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' ++use warnings; ++ ++eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' + if 0; + + BEGIN +Index: autoconf-2.59/bin/autoupdate.in +=================================================================== +--- autoconf-2.59.orig/bin/autoupdate.in 2003-08-27 07:26:32.000000000 -0400 ++++ autoconf-2.59/bin/autoupdate.in 2005-03-09 16:30:19.912214040 -0500 +@@ -1,4 +1,4 @@ +-#! @PERL@ -w ++#! @bindir@/env perl + # -*- perl -*- + # autoupdate - modernize an Autoconf file. + # Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003 +@@ -22,7 +22,9 @@ + # Originally written by David MacKenzie . + # Rewritten by Akim Demaille . + +-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' ++use warnings; ++ ++eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' + if 0; + + BEGIN +@@ -54,7 +56,7 @@ + my @include = ('@datadir@'); + my $force = 0; + # m4. +-my $m4 = $ENV{"M4"} || '@M4@'; ++my $m4 = $ENV{"M4"} || '@bindir@/env m4'; + + + # $HELP +Index: autoconf-2.59/bin/ifnames.in +=================================================================== +--- autoconf-2.59.orig/bin/ifnames.in 2003-10-10 09:52:56.000000000 -0400 ++++ autoconf-2.59/bin/ifnames.in 2005-03-09 16:30:22.656796800 -0500 +@@ -1,8 +1,10 @@ +-#! @PERL@ -w ++#! @bindir@/env perl + # -*- perl -*- + # @configure_input@ + +-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' ++use warnings; ++ ++eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' + if 0; + + # ifnames - print the identifiers used in C preprocessor conditionals diff --git a/openembedded/packages/autoconf/autoconf-2.59/program_prefix.patch b/openembedded/packages/autoconf/autoconf-2.59/program_prefix.patch new file mode 100644 index 0000000000..e6f4096a97 --- /dev/null +++ b/openembedded/packages/autoconf/autoconf-2.59/program_prefix.patch @@ -0,0 +1,19 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- autoconf-2.57/lib/autoconf/general.m4~program_prefix ++++ autoconf-2.57/lib/autoconf/general.m4 +@@ -1676,8 +1676,9 @@ + # The aliases save the names the user supplied, while $host etc. + # will get canonicalized. + test -n "$target_alias" && +- test "$program_prefix$program_suffix$program_transform_name" = \ +- NONENONEs,x,x, && ++ test "$target_alias" != "$host_alias" && ++ test "$program_prefix$program_suffix$program_transform_name" = \ ++ NONENONEs,x,x, && + program_prefix=${target_alias}-[]dnl + ])# AC_CANONICAL_TARGET + diff --git a/openembedded/packages/autoconf/autoconf-2.59/sizeof_types.patch b/openembedded/packages/autoconf/autoconf-2.59/sizeof_types.patch new file mode 100644 index 0000000000..9a6e47453e --- /dev/null +++ b/openembedded/packages/autoconf/autoconf-2.59/sizeof_types.patch @@ -0,0 +1,59 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- autoconf-2.59/lib/autoconf/types.m4~sizeof_types.patch 2003-05-22 08:05:14.000000000 -0400 ++++ autoconf-2.59/lib/autoconf/types.m4 2004-05-29 01:31:24.828295015 -0400 +@@ -380,32 +380,38 @@ + # Generic checks. # + # ---------------- # + ++AC_DEFUN([AC_PROG_SIZE], ++[ ++ AC_CHECK_TOOL(SIZE, size, :) ++]) + + # AC_CHECK_SIZEOF(TYPE, [IGNORED], [INCLUDES = DEFAULT-INCLUDES]) + # --------------------------------------------------------------- + AC_DEFUN([AC_CHECK_SIZEOF], +-[AS_LITERAL_IF([$1], [], ++[AC_REQUIRE([AC_PROG_SIZE]) ++AC_REQUIRE([AC_PROG_AWK]) ++ AS_LITERAL_IF([$1], [], + [AC_FATAL([$0: requires literal arguments])])dnl + AC_CHECK_TYPE([$1], [], [], [$3]) + AC_CACHE_CHECK([size of $1], AS_TR_SH([ac_cv_sizeof_$1]), +-[if test "$AS_TR_SH([ac_cv_type_$1])" = yes; then +- # The cast to unsigned long works around a bug in the HP C Compiler +- # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +- # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +- # This bug is HP SR number 8606223364. +- _AC_COMPUTE_INT([(long) (sizeof ($1))], +- [AS_TR_SH([ac_cv_sizeof_$1])], +- [AC_INCLUDES_DEFAULT([$3])], +- [AC_MSG_FAILURE([cannot compute sizeof ($1), 77])]) ++[ ++if test "$AS_TR_SH([ac_cv_type_$1])" = yes; then ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$3])], ++ [static const $1 x[[256]];])], ++ [ ++ AS_TR_SH([ac_cv_sizeof_$1])=`$SIZE conftest.$ac_objext | tail -n 1 | $AWK '{print [$]3/256}'` ++ ], ++ [ ++ AS_TR_SH([ac_cv_sizeof_$1])=0 ++ ]) + else + AS_TR_SH([ac_cv_sizeof_$1])=0 +-fi])dnl ++fi ++])dnl + AC_DEFINE_UNQUOTED(AS_TR_CPP(sizeof_$1), $AS_TR_SH([ac_cv_sizeof_$1]), + [The size of a `$1', as computed by sizeof.]) + ])# AC_CHECK_SIZEOF + +- +- + # ---------------- # + # Generic checks. # + # ---------------- # diff --git a/openembedded/packages/autoconf/autoconf-native_2.59.bb b/openembedded/packages/autoconf/autoconf-native_2.59.bb new file mode 100644 index 0000000000..846a447a81 --- /dev/null +++ b/openembedded/packages/autoconf/autoconf-native_2.59.bb @@ -0,0 +1,7 @@ +SECTION = "devel" +include autoconf_${PV}.bb +DEPENDS = "m4-native gnu-config-native" +S = "${WORKDIR}/autoconf-${PV}" +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/autoconf-${PV}" + +inherit native diff --git a/openembedded/packages/autoconf/autoconf_2.59.bb b/openembedded/packages/autoconf/autoconf_2.59.bb new file mode 100644 index 0000000000..8636a77787 --- /dev/null +++ b/openembedded/packages/autoconf/autoconf_2.59.bb @@ -0,0 +1,21 @@ +DESCRIPTION = "A package of M4 macros to produce scripts to \ +automatically configure sourcecode." +LICENSE = "GPL" +HOMEPAGE = "http://www.gnu.org/software/autoconf/" +SECTION = "devel" +DEPENDS += "m4-native" +RDEPENDS_${PN} = "m4 gnu-config" +RRECOMMENDS_${PN} = "automake" +PR = "r3" + +SRC_URI = "${GNU_MIRROR}/autoconf/autoconf-${PV}.tar.bz2 \ + file://program_prefix.patch;patch=1 \ + file://autoreconf-include.patch;patch=1 \ + file://autoreconf-exclude.patch;patch=1 \ + file://autoreconf-foreign.patch;patch=1 \ + file://autoreconf-gnuconfigize.patch;patch=1 \ + file://autoconf259-update-configscripts.patch;patch=1 \ + file://autoheader-nonfatal-warnings.patch;patch=1 \ + file://sizeof_types.patch;patch=1 \ + ${@['file://path_prog_fixes.patch;patch=1', ''][bb.data.inherits_class('native', d)]}" +inherit autotools diff --git a/openembedded/packages/automake/automake-1.9.3/automake182-update-configscripts.patch b/openembedded/packages/automake/automake-1.9.3/automake182-update-configscripts.patch new file mode 100644 index 0000000000..52992b3b26 --- /dev/null +++ b/openembedded/packages/automake/automake-1.9.3/automake182-update-configscripts.patch @@ -0,0 +1,201 @@ +--- automake-1.8.2/lib/config.guess.old 2004-01-11 15:33:12.000000000 -0500 ++++ automake-1.8.2/lib/config.guess 2004-04-24 22:42:44.000000000 -0400 +@@ -3,7 +3,7 @@ + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +-timestamp='2004-01-05' ++timestamp='2004-03-12' + + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by +@@ -197,12 +197,18 @@ + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; ++ amd64:OpenBSD:*:*) ++ echo x86_64-unknown-openbsd${UNAME_RELEASE} ++ exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; ++ cats:OpenBSD:*:*) ++ echo arm-unknown-openbsd${UNAME_RELEASE} ++ exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; +@@ -239,10 +245,24 @@ + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; ++ *:ekkoBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} ++ exit 0 ;; ++ macppc:MirBSD:*:*) ++ echo powerppc-unknown-mirbsd${UNAME_RELEASE} ++ exit 0 ;; ++ *:MirBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} ++ exit 0 ;; + alpha:OSF1:*:*) +- if test $UNAME_RELEASE = "V4.0"; then ++ case $UNAME_RELEASE in ++ *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` +- fi ++ ;; ++ *5.*) ++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ++ ;; ++ esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU +@@ -280,11 +300,12 @@ + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac ++ # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. +- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` ++ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha*:OpenVMS:*:*) + echo alpha-hp-vms +@@ -405,6 +426,9 @@ + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; ++ m68k:machten:*:*) ++ echo m68k-apple-machten${UNAME_RELEASE} ++ exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; +@@ -829,6 +853,9 @@ + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; ++ m32r*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; +@@ -1230,8 +1257,8 @@ + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit 0 ;; +- *:DRAGONFLY:*:*) +- echo ${UNAME_MACHINE}-unknown-dragonfly${UNAME_RELEASE} ++ *:DragonFly:*:*) ++ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + esac + +--- automake-1.8.2/lib/config.sub.old 2004-01-11 15:33:12.000000000 -0500 ++++ automake-1.8.2/lib/config.sub 2004-04-24 22:42:44.000000000 -0400 +@@ -3,7 +3,7 @@ + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +-timestamp='2004-01-05' ++timestamp='2004-03-12' + + # This file is (in principle) common to ALL GNU software. + # The presence of a machine in this file suggests that SOME GNU software +@@ -237,7 +237,7 @@ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ +- | m32r | m68000 | m68k | m88k | mcore \ ++ | m32r | m32rle | m68000 | m68k | m88k | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ +@@ -262,7 +262,7 @@ + | pyramid \ + | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ +- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ ++ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ +@@ -308,7 +308,7 @@ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ +- | m32r-* \ ++ | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ +@@ -336,7 +336,7 @@ + | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ +- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ ++ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ +@@ -363,6 +363,9 @@ + basic_machine=a29k-amd + os=-udi + ;; ++ abacus) ++ basic_machine=abacus-unknown ++ ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout +@@ -442,12 +445,20 @@ + basic_machine=j90-cray + os=-unicos + ;; ++ cr16c) ++ basic_machine=cr16c-unknown ++ os=-elf ++ ;; + crds | unos) + basic_machine=m68k-crds + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; ++ crx) ++ basic_machine=crx-unknown ++ os=-elf ++ ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; +@@ -1070,7 +1081,7 @@ + sh64) + basic_machine=sh64-unknown + ;; +- sparc | sparcv9 | sparcv9b) ++ sparc | sparcv8 | sparcv9 | sparcv9b) + basic_machine=sparc-sun + ;; + cydra) +@@ -1143,8 +1154,9 @@ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ +- | -hiux* | -386bsd* | -knetbsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \ +- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ ++ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ ++ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ ++ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ diff --git a/openembedded/packages/automake/automake-native.inc b/openembedded/packages/automake/automake-native.inc new file mode 100644 index 0000000000..172752f3aa --- /dev/null +++ b/openembedded/packages/automake/automake-native.inc @@ -0,0 +1,10 @@ +SECTION = "devel" +include automake_${PV}.bb +DEPENDS = "autoconf-native" + +inherit native + +do_stage () { + oe_runmake install + install -d ${datadir}/aclocal +} diff --git a/openembedded/packages/automake/automake-native_1.9.3.bb b/openembedded/packages/automake/automake-native_1.9.3.bb new file mode 100644 index 0000000000..39544b7c1d --- /dev/null +++ b/openembedded/packages/automake/automake-native_1.9.3.bb @@ -0,0 +1,3 @@ +PV := "${PV}" + +include automake-native.inc diff --git a/openembedded/packages/automake/automake_1.9.3.bb b/openembedded/packages/automake/automake_1.9.3.bb new file mode 100644 index 0000000000..71bf0bd58b --- /dev/null +++ b/openembedded/packages/automake/automake_1.9.3.bb @@ -0,0 +1,27 @@ +DESCRIPTION = "A tool for automatically generating Makefiles." +LICENSE = "GPL" +HOMEPAGE = "http://www.gnu.org/software/automake/" +SECTION = "devel" +PR = "r5" + +SRC_URI = "${GNU_MIRROR}/automake/automake-${PV}.tar.bz2 \ + ${@['file://path_prog_fixes.patch;patch=1', ''][bb.data.inherits_class('native', d)]}" +S = "${WORKDIR}/automake-${PV}" +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/automake-${PV}" + +inherit autotools + +export AUTOMAKE = "${@bb.which('automake', bb.data.getVar('PATH', d, 1))}" +FILES_${PN} += "${datadir}/automake* ${datadir}/aclocal*" +RDEPENDS_${PN} += "autoconf perl" + +do_install () { + oe_runmake 'DESTDIR=${D}' install + install -d ${D}${datadir} + if [ ! -e ${D}${datadir}/aclocal ]; then + ln -sf aclocal-1.9 ${D}${datadir}/aclocal + fi + if [ ! -e ${D}${datadir}/automake ]; then + ln -sf automake-1.9 ${D}${datadir}/automake + fi +} diff --git a/openembedded/packages/automake/files/path_prog_fixes.patch b/openembedded/packages/automake/files/path_prog_fixes.patch new file mode 100644 index 0000000000..a85b244205 --- /dev/null +++ b/openembedded/packages/automake/files/path_prog_fixes.patch @@ -0,0 +1,60 @@ +Index: automake-1.9.3/Makefile.am +=================================================================== +--- automake-1.9.3.orig/Makefile.am 2004-10-25 14:57:30.000000000 -0400 ++++ automake-1.9.3/Makefile.am 2005-03-09 16:47:38.241364016 -0500 +@@ -66,7 +66,8 @@ + -e 's,[@]SHELL[@],$(SHELL),g' \ + -e 's,[@]VERSION[@],$(VERSION),g' \ + -e 's,[@]configure_input[@],Generated from $@.in; do not edit by hand.,g' \ +- -e 's,[@]datadir[@],$(datadir),g' ++ -e 's,[@]datadir[@],$(datadir),g' \ ++ -e 's,[@]bindir[@],$(bindir),g' + + ## These files depend on Makefile so they are rebuilt if $(VERSION), + ## $(datadir) or other do_subst'ituted variables change. +Index: automake-1.9.3/Makefile.in +=================================================================== +--- automake-1.9.3.orig/Makefile.in 2004-11-01 05:23:54.000000000 -0500 ++++ automake-1.9.3/Makefile.in 2005-03-09 16:47:54.712859968 -0500 +@@ -161,7 +161,8 @@ + -e 's,[@]SHELL[@],$(SHELL),g' \ + -e 's,[@]VERSION[@],$(VERSION),g' \ + -e 's,[@]configure_input[@],Generated from $@.in; do not edit by hand.,g' \ +- -e 's,[@]datadir[@],$(datadir),g' ++ -e 's,[@]datadir[@],$(datadir),g' \ ++ -e 's,[@]bindir[@],$(bindir),g' + + WGET = wget + WGETSGO = $(WGET) http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~ +Index: automake-1.9.3/aclocal.in +=================================================================== +--- automake-1.9.3.orig/aclocal.in 2004-10-10 12:10:24.000000000 -0400 ++++ automake-1.9.3/aclocal.in 2005-03-09 16:47:38.241364016 -0500 +@@ -1,8 +1,8 @@ +-#!@PERL@ ++#!@bindir@/env perl + # -*- perl -*- + # @configure_input@ + +-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' ++eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @bindir@/env perl -S "$0" "$@";; esac' + if 0; + + # aclocal - create aclocal.m4 by scanning configure.ac +Index: automake-1.9.3/automake.in +=================================================================== +--- automake-1.9.3.orig/automake.in 2004-10-21 16:23:26.000000000 -0400 ++++ automake-1.9.3/automake.in 2005-03-09 16:47:38.245363408 -0500 +@@ -1,8 +1,10 @@ +-#!@PERL@ -w ++#!@bindir@/env perl + # -*- perl -*- + # @configure_input@ + +-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' ++use warnings; ++ ++eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @bindir@/env perl -S "$0" "$@";; esac' + if 0; + + # automake - create Makefile.in from Makefile.am diff --git a/openembedded/packages/base-files/base-files/akita/fstab b/openembedded/packages/base-files/base-files/akita/fstab new file mode 100644 index 0000000000..754f140b34 --- /dev/null +++ b/openembedded/packages/base-files/base-files/akita/fstab @@ -0,0 +1,16 @@ +/dev/mtdblock2 / jffs2 rw,noatime 1 1 +/dev/mtdblock3 /home jffs2 defaults,noatime 1 2 +proc /proc proc defaults 0 0 +/dev/hda1 /media/cf auto defaults,sync,noauto 0 0 + +tmpfs /var tmpfs defaults 0 0 +tmpfs /media/ram tmpfs defaults 0 0 + +# SD/MMC in kernel 2.4 +/dev/mmcda1 /media/card auto defaults,sync,noauto 0 0 +# SD/MMC in kernel 2.6 +/dev/mmcblk0p1 /media/card auto defaults,sync,noauto 0 0 + +# USB Storage +/dev/sda1 /media/usbhdd vfat noauto,umask=000,noatime,iocharset=utf8,codepage=932 0 0 + diff --git a/openembedded/packages/base-files/base-files/borzoi/fstab b/openembedded/packages/base-files/base-files/borzoi/fstab new file mode 100644 index 0000000000..754f140b34 --- /dev/null +++ b/openembedded/packages/base-files/base-files/borzoi/fstab @@ -0,0 +1,16 @@ +/dev/mtdblock2 / jffs2 rw,noatime 1 1 +/dev/mtdblock3 /home jffs2 defaults,noatime 1 2 +proc /proc proc defaults 0 0 +/dev/hda1 /media/cf auto defaults,sync,noauto 0 0 + +tmpfs /var tmpfs defaults 0 0 +tmpfs /media/ram tmpfs defaults 0 0 + +# SD/MMC in kernel 2.4 +/dev/mmcda1 /media/card auto defaults,sync,noauto 0 0 +# SD/MMC in kernel 2.6 +/dev/mmcblk0p1 /media/card auto defaults,sync,noauto 0 0 + +# USB Storage +/dev/sda1 /media/usbhdd vfat noauto,umask=000,noatime,iocharset=utf8,codepage=932 0 0 + diff --git a/openembedded/packages/base-files/base-files/c7x0/fstab b/openembedded/packages/base-files/base-files/c7x0/fstab new file mode 100644 index 0000000000..fb37e07aec --- /dev/null +++ b/openembedded/packages/base-files/base-files/c7x0/fstab @@ -0,0 +1,12 @@ +/dev/mtdblock2 / jffs2 rw,noatime 1 1 +/dev/mtdblock3 /home jffs2 defaults,noatime 1 2 +proc /proc proc defaults 0 0 +/dev/hda1 /media/cf auto defaults,sync,noauto 0 0 + +tmpfs /var tmpfs defaults 0 0 +tmpfs /media/ram tmpfs defaults 0 0 + +# SD/MMC in kernel 2.4 +/dev/mmcda1 /media/card auto defaults,sync,noauto 0 0 +# SD/MMC in kernel 2.6 +/dev/mmcblk0p1 /media/card auto defaults,sync,noauto 0 0 diff --git a/openembedded/packages/base-files/base-files/c7x0/usbd b/openembedded/packages/base-files/base-files/c7x0/usbd new file mode 100644 index 0000000000..40931ee8e9 --- /dev/null +++ b/openembedded/packages/base-files/base-files/c7x0/usbd @@ -0,0 +1 @@ +usbdmodule=pxa_bi diff --git a/openembedded/packages/base-files/base-files/collie/fstab b/openembedded/packages/base-files/base-files/collie/fstab new file mode 100644 index 0000000000..ce5bc3bac5 --- /dev/null +++ b/openembedded/packages/base-files/base-files/collie/fstab @@ -0,0 +1,8 @@ +/dev/mtdblock4 / jffs2 defaults 1 1 +proc /proc proc defaults 0 0 +/dev/hda1 /media/cf auto defaults,sync,noauto,noatime,user,exec,suid,gid=100,umask=0002 0 0 +/dev/mmcda1 /media/card auto defaults,sync,noauto,noatime,user,exec,suid 0 0 +tmpfs /var tmpfs defaults 0 0 + +# we use a non-volatile ramdisk, see /etc/init.d/ramdisk +#tmpfs /media/ram tmpfs defaults 0 0 diff --git a/openembedded/packages/base-files/base-files/collie/usbd b/openembedded/packages/base-files/base-files/collie/usbd new file mode 100644 index 0000000000..4257614583 --- /dev/null +++ b/openembedded/packages/base-files/base-files/collie/usbd @@ -0,0 +1 @@ +usbdmodule=sa1100_bi diff --git a/openembedded/packages/base-files/base-files/epia/fstab b/openembedded/packages/base-files/base-files/epia/fstab new file mode 100644 index 0000000000..70f0b07353 --- /dev/null +++ b/openembedded/packages/base-files/base-files/epia/fstab @@ -0,0 +1,4 @@ +/dev/ram0 / ext2 rw 1 1 +tmpfs /var tmpfs defaults 0 0 +proc /proc proc defaults 0 0 +tmpfs /tmp tmpfs defaults 0 0 diff --git a/openembedded/packages/base-files/base-files/familiar/issue b/openembedded/packages/base-files/base-files/familiar/issue new file mode 100644 index 0000000000..2224b6ce8d --- /dev/null +++ b/openembedded/packages/base-files/base-files/familiar/issue @@ -0,0 +1,2 @@ +Familiar Linux Unofficial Snapshot \n \l + diff --git a/openembedded/packages/base-files/base-files/familiar/issue.net b/openembedded/packages/base-files/base-files/familiar/issue.net new file mode 100644 index 0000000000..2539ffe3ad --- /dev/null +++ b/openembedded/packages/base-files/base-files/familiar/issue.net @@ -0,0 +1,3 @@ +Familiar Linux Unofficial Snapshot %h + + diff --git a/openembedded/packages/base-files/base-files/filesystems b/openembedded/packages/base-files/base-files/filesystems new file mode 100644 index 0000000000..653593a432 --- /dev/null +++ b/openembedded/packages/base-files/base-files/filesystems @@ -0,0 +1,6 @@ +minix +fat +vfat +ext2 +ext3 +* diff --git a/openembedded/packages/base-files/base-files/fstab b/openembedded/packages/base-files/base-files/fstab new file mode 100644 index 0000000000..bf8f8a87e5 --- /dev/null +++ b/openembedded/packages/base-files/base-files/fstab @@ -0,0 +1,4 @@ +rootfs / auto defaults 1 1 +proc /proc proc defaults 0 0 +devpts /dev/pts devpts mode=0620,gid=5 0 0 +usbdevfs /proc/bus/usb usbdevfs noauto 0 0 diff --git a/openembedded/packages/base-files/base-files/h3600/fstab b/openembedded/packages/base-files/base-files/h3600/fstab new file mode 100644 index 0000000000..4228c15c00 --- /dev/null +++ b/openembedded/packages/base-files/base-files/h3600/fstab @@ -0,0 +1,6 @@ +/dev/mtdblock4 / jffs2 defaults 1 1 +proc /proc proc defaults 0 0 +/dev/hda1 /media/cf auto defaults,noauto,noatime,user,exec,suid 0 0 +/dev/mmc/part1 /media/card auto defaults,noauto,noatime,user,exec,suid 0 0 +tmpfs /var tmpfs defaults 0 0 +tmpfs /media/ram tmpfs defaults 0 0 diff --git a/openembedded/packages/base-files/base-files/h3900/fstab b/openembedded/packages/base-files/base-files/h3900/fstab new file mode 100644 index 0000000000..2a3929fd17 --- /dev/null +++ b/openembedded/packages/base-files/base-files/h3900/fstab @@ -0,0 +1,8 @@ +/dev/mtdblock/1 / jffs2 defaults 1 1 +#breaks h51xx +#/dev/mtdblock/2 /home jffs2 defaults 1 1 +proc /proc proc defaults 0 0 +/dev/hda1 /media/cf auto defaults,noauto,noatime,user,exec,suid 0 0 +/dev/mmc/part1 /media/card auto defaults,noauto,noatime,user,exec,suid 0 0 +tmpfs /var tmpfs defaults 0 0 +tmpfs /media/ram tmpfs defaults 0 0 diff --git a/openembedded/packages/base-files/base-files/host.conf b/openembedded/packages/base-files/base-files/host.conf new file mode 100644 index 0000000000..1a8c1e1517 --- /dev/null +++ b/openembedded/packages/base-files/base-files/host.conf @@ -0,0 +1,2 @@ +order hosts,bind +multi on diff --git a/openembedded/packages/base-files/base-files/inputrc b/openembedded/packages/base-files/base-files/inputrc new file mode 100644 index 0000000000..b5c4c8af24 --- /dev/null +++ b/openembedded/packages/base-files/base-files/inputrc @@ -0,0 +1,61 @@ +# /etc/inputrc - global inputrc for libreadline +# See readline(3readline) and `info rluserman' for more information. + +# Be 8 bit clean. +set input-meta on +set output-meta on + +# To allow the use of 8bit-characters like the german umlauts, comment out +# the line below. However this makes the meta key not work as a meta key, +# which is annoying to those which don't need to type in 8-bit characters. + +# set convert-meta off + +# try to enable the application keypad when it is called. Some systems +# need this to enable the arrow keys. +# set enable-keypad on + +# see /usr/share/doc/bash/inputrc.arrows for other codes of arrow keys + +# do not bell on tab-completion +# set bell-style none + +# some defaults / modifications for the emacs mode +$if mode=emacs + +# allow the use of the Home/End keys +# "\e[1~": beginning-of-line +# "\e[4~": end-of-line + +# allow the use of the Delete/Insert keys +# "\e[3~": delete-char +# "\e[2~": quoted-insert + +# mappings for "page up" and "page down" to step to the beginning/end +# of the history +# "\e[5~": beginning-of-history +# "\e[6~": end-of-history + +# alternate mappings for "page up" and "page down" to search the history +# "\e[5~": history-search-backward +# "\e[6~": history-search-forward + +# # mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving +# "\e[5C": forward-word +# "\e[5D": backward-word +# "\e\e[C": forward-word +# "\e\e[D": backward-word + +# $if term=rxvt +# "\e[8~": end-of-line +# $endif + +# for non RH/Debian xterm, can't hurt for RH/DEbian xterm +# "\eOH": beginning-of-line +# "\eOF": end-of-line + +# for freebsd console +# "\e[H": beginning-of-line +# "\e[F": end-of-line + +$endif diff --git a/openembedded/packages/base-files/base-files/ipaq-pxa270/fstab b/openembedded/packages/base-files/base-files/ipaq-pxa270/fstab new file mode 100644 index 0000000000..8c38a5fda2 --- /dev/null +++ b/openembedded/packages/base-files/base-files/ipaq-pxa270/fstab @@ -0,0 +1,9 @@ +/dev/mtdblock2 / jffs2 defaults 1 1 +/dev/mtdblock3 /home jffs2 defaults 1 1 + +proc /proc proc defaults 0 0 +sys /sys sysfs defaults 0 0 + +/dev/hda1 /media/cf auto defaults,noauto,noatime,user,exec,suid 0 0 +tmpfs /var tmpfs defaults 0 0 +tmpfs /media/ram tmpfs defaults 0 0 diff --git a/openembedded/packages/base-files/base-files/issue b/openembedded/packages/base-files/base-files/issue new file mode 100644 index 0000000000..329af4665e --- /dev/null +++ b/openembedded/packages/base-files/base-files/issue @@ -0,0 +1,2 @@ +OpenEmbedded Linux \n \l + diff --git a/openembedded/packages/base-files/base-files/issue.net b/openembedded/packages/base-files/base-files/issue.net new file mode 100644 index 0000000000..6dc3588b4f --- /dev/null +++ b/openembedded/packages/base-files/base-files/issue.net @@ -0,0 +1,3 @@ +OpenEmbedded Linux %h + + diff --git a/openembedded/packages/base-files/base-files/jornada56x/fstab b/openembedded/packages/base-files/base-files/jornada56x/fstab new file mode 100644 index 0000000000..07ccff0fe6 --- /dev/null +++ b/openembedded/packages/base-files/base-files/jornada56x/fstab @@ -0,0 +1,6 @@ +/dev/mtdblock1 / jffs2 rw,noatime 1 1 +proc /proc proc defaults 0 0 +/dev/hda1 /mnt/cf auto defaults,sync,noauto 0 0 +tmpfs /var tmpfs defaults 0 0 +tmpfs /mnt/ram tmpfs defaults 0 0 +devpts /dev/pts devpts defaults 0 0 \ No newline at end of file diff --git a/openembedded/packages/base-files/base-files/jornada720/fstab b/openembedded/packages/base-files/base-files/jornada720/fstab new file mode 100644 index 0000000000..07ccff0fe6 --- /dev/null +++ b/openembedded/packages/base-files/base-files/jornada720/fstab @@ -0,0 +1,6 @@ +/dev/mtdblock1 / jffs2 rw,noatime 1 1 +proc /proc proc defaults 0 0 +/dev/hda1 /mnt/cf auto defaults,sync,noauto 0 0 +tmpfs /var tmpfs defaults 0 0 +tmpfs /mnt/ram tmpfs defaults 0 0 +devpts /dev/pts devpts defaults 0 0 \ No newline at end of file diff --git a/openembedded/packages/base-files/base-files/licenses/Artistic b/openembedded/packages/base-files/base-files/licenses/Artistic new file mode 100644 index 0000000000..5f221241e8 --- /dev/null +++ b/openembedded/packages/base-files/base-files/licenses/Artistic @@ -0,0 +1,131 @@ + + + + + The "Artistic License" + + Preamble + +The intent of this document is to state the conditions under which a +Package may be copied, such that the Copyright Holder maintains some +semblance of artistic control over the development of the package, +while giving the users of the package the right to use and distribute +the Package in a more-or-less customary fashion, plus the right to make +reasonable modifications. + +Definitions: + + "Package" refers to the collection of files distributed by the + Copyright Holder, and derivatives of that collection of files + created through textual modification. + + "Standard Version" refers to such a Package if it has not been + modified, or has been modified in accordance with the wishes + of the Copyright Holder as specified below. + + "Copyright Holder" is whoever is named in the copyright or + copyrights for the package. + + "You" is you, if you're thinking about copying or distributing + this Package. + + "Reasonable copying fee" is whatever you can justify on the + basis of media cost, duplication charges, time of people involved, + and so on. (You will not be required to justify it to the + Copyright Holder, but only to the computing community at large + as a market that must bear the fee.) + + "Freely Available" means that no fee is charged for the item + itself, though there may be fees involved in handling the item. + It also means that recipients of the item may redistribute it + under the same conditions they received it. + +1. You may make and give away verbatim copies of the source form of the +Standard Version of this Package without restriction, provided that you +duplicate all of the original copyright notices and associated disclaimers. + +2. You may apply bug fixes, portability fixes and other modifications +derived from the Public Domain or from the Copyright Holder. A Package +modified in such a way shall still be considered the Standard Version. + +3. You may otherwise modify your copy of this Package in any way, provided +that you insert a prominent notice in each changed file stating how and +when you changed that file, and provided that you do at least ONE of the +following: + + a) place your modifications in the Public Domain or otherwise make them + Freely Available, such as by posting said modifications to Usenet or + an equivalent medium, or placing the modifications on a major archive + site such as uunet.uu.net, or by allowing the Copyright Holder to include + your modifications in the Standard Version of the Package. + + b) use the modified Package only within your corporation or organization. + + c) rename any non-standard executables so the names do not conflict + with standard executables, which must also be provided, and provide + a separate manual page for each non-standard executable that clearly + documents how it differs from the Standard Version. + + d) make other distribution arrangements with the Copyright Holder. + +4. You may distribute the programs of this Package in object code or +executable form, provided that you do at least ONE of the following: + + a) distribute a Standard Version of the executables and library files, + together with instructions (in the manual page or equivalent) on where + to get the Standard Version. + + b) accompany the distribution with the machine-readable source of + the Package with your modifications. + + c) give non-standard executables non-standard names, and clearly + document the differences in manual pages (or equivalent), together + with instructions on where to get the Standard Version. + + d) make other distribution arrangements with the Copyright Holder. + +5. You may charge a reasonable copying fee for any distribution of this +Package. You may charge any fee you choose for support of this +Package. You may not charge a fee for this Package itself. However, +you may distribute this Package in aggregate with other (possibly +commercial) programs as part of a larger (possibly commercial) software +distribution provided that you do not advertise this Package as a +product of your own. You may embed this Package's interpreter within +an executable of yours (by linking); this shall be construed as a mere +form of aggregation, provided that the complete Standard Version of the +interpreter is so embedded. + +6. The scripts and library files supplied as input to or produced as +output from the programs of this Package do not automatically fall +under the copyright of this Package, but belong to whoever generated +them, and may be sold commercially, and may be aggregated with this +Package. If such scripts or library files are aggregated with this +Package via the so-called "undump" or "unexec" methods of producing a +binary executable image, then distribution of such an image shall +neither be construed as a distribution of this Package nor shall it +fall under the restrictions of Paragraphs 3 and 4, provided that you do +not represent such an executable image as a Standard Version of this +Package. + +7. C subroutines (or comparably compiled subroutines in other +languages) supplied by you and linked into this Package in order to +emulate subroutines and variables of the language defined by this +Package shall not be considered part of this Package, but are the +equivalent of input as in Paragraph 6, provided these subroutines do +not change the language in any way that would cause it to fail the +regression tests for the language. + +8. Aggregation of this Package with a commercial distribution is always +permitted provided that the use of this Package is embedded; that is, +when no overt attempt is made to make this Package's interfaces visible +to the end user of the commercial distribution. Such use shall not be +construed as a distribution of this Package. + +9. The name of the Copyright Holder may not be used to endorse or promote +products derived from this software without specific prior written permission. + +10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + The End diff --git a/openembedded/packages/base-files/base-files/licenses/BSD b/openembedded/packages/base-files/base-files/licenses/BSD new file mode 100644 index 0000000000..c7a0aa4f94 --- /dev/null +++ b/openembedded/packages/base-files/base-files/licenses/BSD @@ -0,0 +1,26 @@ +Copyright (c) The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. diff --git a/openembedded/packages/base-files/base-files/licenses/GPL-2 b/openembedded/packages/base-files/base-files/licenses/GPL-2 new file mode 100644 index 0000000000..d60c31a97a --- /dev/null +++ b/openembedded/packages/base-files/base-files/licenses/GPL-2 @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/openembedded/packages/base-files/base-files/licenses/LGPL-2 b/openembedded/packages/base-files/base-files/licenses/LGPL-2 new file mode 100644 index 0000000000..f5030495bf --- /dev/null +++ b/openembedded/packages/base-files/base-files/licenses/LGPL-2 @@ -0,0 +1,481 @@ + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/openembedded/packages/base-files/base-files/licenses/LGPL-2.1 b/openembedded/packages/base-files/base-files/licenses/LGPL-2.1 new file mode 100644 index 0000000000..b124cf5812 --- /dev/null +++ b/openembedded/packages/base-files/base-files/licenses/LGPL-2.1 @@ -0,0 +1,510 @@ + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes a de-facto standard. To achieve this, non-free programs must +be allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control +compilation and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply, and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License +may add an explicit geographical distribution limitation excluding those +countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms +of the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should +have at least the "copyright" line and a pointer to where the full +notice is found. + + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or +your school, if any, to sign a "copyright disclaimer" for the library, +if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James + Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/openembedded/packages/base-files/base-files/motd b/openembedded/packages/base-files/base-files/motd new file mode 100644 index 0000000000..e69de29bb2 diff --git a/openembedded/packages/base-files/base-files/mtx-1/fstab b/openembedded/packages/base-files/base-files/mtx-1/fstab new file mode 100644 index 0000000000..ffab21cf68 --- /dev/null +++ b/openembedded/packages/base-files/base-files/mtx-1/fstab @@ -0,0 +1,8 @@ +# /etc/fstab: static file system information. mtx-1 +# +# +rootfs / auto defaults 1 1 +tmpfs /var tmpfs size=10m 0 0 +proc /proc proc defaults 0 0 +devpts /dev/pts devpts mode=0620,gid=5 0 0 +usbdevfs /proc/bus/usb usbdevfs noauto 0 0 diff --git a/openembedded/packages/base-files/base-files/mtx-1/profile b/openembedded/packages/base-files/base-files/mtx-1/profile new file mode 100644 index 0000000000..bedf2fc7d8 --- /dev/null +++ b/openembedded/packages/base-files/base-files/mtx-1/profile @@ -0,0 +1,25 @@ +# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) +# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). + +PATH="/usr/local/bin:/usr/bin:/bin" + +if [ "`id -u`" -eq 0 ]; then + PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin: +fi +if [ "$PS1" ]; then +# works for bash and ash (no other shells known to be in use here) + PS1='\u@\h:\w\$ ' +fi + +if [ -d /etc/profile.d ]; then + for i in `ls /etc/profile.d/`; do + . /etc/profile.d/$i + done + unset i +fi + +export PATH PS1 + +umask 022 + +alias ll="ls -lah" \ No newline at end of file diff --git a/openembedded/packages/base-files/base-files/netvista/fstab b/openembedded/packages/base-files/base-files/netvista/fstab new file mode 100644 index 0000000000..e235acaa27 --- /dev/null +++ b/openembedded/packages/base-files/base-files/netvista/fstab @@ -0,0 +1,5 @@ +/dev/hdc2 / ext2 rw,noatime 1 1 +tmpfs /var tmpfs defaults 0 0 +proc /proc proc defaults 0 0 +tmpfs /tmp tmpfs defaults 0 0 +devfs /dev/devfs devfs defaults 0 0 diff --git a/openembedded/packages/base-files/base-files/nokia770/fstab b/openembedded/packages/base-files/base-files/nokia770/fstab new file mode 100644 index 0000000000..3224c61b5e --- /dev/null +++ b/openembedded/packages/base-files/base-files/nokia770/fstab @@ -0,0 +1,4 @@ +rootfs / rootfs defaults,errors=remount-ro,noatime 0 0 +/dev/mmcblk0p1 /media/card auto defaults,noauto,noatime,user,exec,suid 0 0 +tmpfs /var tmpfs defaults 0 0 +tmpfs /media/ram tmpfs defaults 0 0 diff --git a/openembedded/packages/base-files/base-files/nsswitch.conf b/openembedded/packages/base-files/base-files/nsswitch.conf new file mode 100644 index 0000000000..06f03d22a6 --- /dev/null +++ b/openembedded/packages/base-files/base-files/nsswitch.conf @@ -0,0 +1,19 @@ +# /etc/nsswitch.conf +# +# Example configuration of GNU Name Service Switch functionality. +# If you have the `glibc-doc' and `info' packages installed, try: +# `info libc "Name Service Switch"' for information about this file. + +passwd: compat +group: compat +shadow: compat + +hosts: files dns +networks: files + +protocols: db files +services: db files +ethers: db files +rpc: db files + +netgroup: nis diff --git a/openembedded/packages/base-files/base-files/nylon/issue b/openembedded/packages/base-files/base-files/nylon/issue new file mode 100644 index 0000000000..15de9b8eb4 --- /dev/null +++ b/openembedded/packages/base-files/base-files/nylon/issue @@ -0,0 +1,2 @@ +Nylon Mesh Router Linux \n \l + diff --git a/openembedded/packages/base-files/base-files/nylon/issue.net b/openembedded/packages/base-files/base-files/nylon/issue.net new file mode 100644 index 0000000000..93565c98c5 --- /dev/null +++ b/openembedded/packages/base-files/base-files/nylon/issue.net @@ -0,0 +1,3 @@ +Nylon Mesh Router Linux %h + + diff --git a/openembedded/packages/base-files/base-files/openmn/fstab b/openembedded/packages/base-files/base-files/openmn/fstab new file mode 100644 index 0000000000..a2e78a2011 --- /dev/null +++ b/openembedded/packages/base-files/base-files/openmn/fstab @@ -0,0 +1,6 @@ +devfs /dev devfs defaults 0 0 +proc /proc proc defaults 0 0 +none /sys sysfs defaults 0 0 +rootfs / rootfs rw 1 1 +tmpfs /var tmpfs defaults 0 0 +tmpfs /tmp tmpfs defaults 0 0 diff --git a/openembedded/packages/base-files/base-files/openmn/issue b/openembedded/packages/base-files/base-files/openmn/issue new file mode 100644 index 0000000000..8c70d49b34 --- /dev/null +++ b/openembedded/packages/base-files/base-files/openmn/issue @@ -0,0 +1,2 @@ +M&N 5.4 + diff --git a/openembedded/packages/base-files/base-files/openmn/issue.net b/openembedded/packages/base-files/base-files/openmn/issue.net new file mode 100644 index 0000000000..8c70d49b34 --- /dev/null +++ b/openembedded/packages/base-files/base-files/openmn/issue.net @@ -0,0 +1,2 @@ +M&N 5.4 + diff --git a/openembedded/packages/base-files/base-files/openmn/profile b/openembedded/packages/base-files/base-files/openmn/profile new file mode 100644 index 0000000000..2b01071e15 --- /dev/null +++ b/openembedded/packages/base-files/base-files/openmn/profile @@ -0,0 +1,31 @@ +# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) +# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). + +OPIEDIR=/opt/QtPalmtop +QPEDIR=/opt/QtPalmtop +QTDIR=/opt/QtPalmtop +PATH="/opt/QtPalmtop/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games" + +PS1='$ ' +if [ "`id -u`" -eq 0 ]; then + PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin: + PS1='# ' +fi + +if [ -d /etc/profile.d ]; then + for i in `ls /etc/profile.d/`; do + . /etc/profile.d/$i + done + unset i +fi + +case "`cat /proc/sys/board/lcd_type`" in + 2) export QWS_DISPLAY=Transformed:Rot90 ;; + 3) export QWS_DISPLAY=Transformed:Rot270 ;; + *) export QWS_DISPLAY=Transformed:Rot180 ;; +esac +alias ll="ls -lAF" + +export PATH PS1 OPIEDIR QPEDIR QTDIR + +umask 022 diff --git a/openembedded/packages/base-files/base-files/openmn/usbd b/openembedded/packages/base-files/base-files/openmn/usbd new file mode 100644 index 0000000000..40931ee8e9 --- /dev/null +++ b/openembedded/packages/base-files/base-files/openmn/usbd @@ -0,0 +1 @@ +usbdmodule=pxa_bi diff --git a/openembedded/packages/base-files/base-files/opensimpad/issue b/openembedded/packages/base-files/base-files/opensimpad/issue new file mode 100644 index 0000000000..05a1eeaea6 --- /dev/null +++ b/openembedded/packages/base-files/base-files/opensimpad/issue @@ -0,0 +1,2 @@ +OpenSIMpad Unofficial Snapshot Version \n \l + diff --git a/openembedded/packages/base-files/base-files/opensimpad/issue.net b/openembedded/packages/base-files/base-files/opensimpad/issue.net new file mode 100644 index 0000000000..6d524cc650 --- /dev/null +++ b/openembedded/packages/base-files/base-files/opensimpad/issue.net @@ -0,0 +1,2 @@ +OpenSIMpad Unofficial Snapshot %h + diff --git a/openembedded/packages/base-files/base-files/openslug/fstab b/openembedded/packages/base-files/base-files/openslug/fstab new file mode 100644 index 0000000000..0ac6b1460c --- /dev/null +++ b/openembedded/packages/base-files/base-files/openslug/fstab @@ -0,0 +1,5 @@ +rootfs / jffs2 defaults 1 1 +proc /proc proc defaults 0 0 +tmpfs /var tmpfs defaults 0 0 +tmpfs /media/ram tmpfs defaults 0 0 +usbfs /proc/bus/usb usbfs defaults 0 0 diff --git a/openembedded/packages/base-files/base-files/openzaurus/issue b/openembedded/packages/base-files/base-files/openzaurus/issue new file mode 100644 index 0000000000..1983c15318 --- /dev/null +++ b/openembedded/packages/base-files/base-files/openzaurus/issue @@ -0,0 +1,2 @@ +OpenZaurus Unofficial Snapshot Version \n \l + diff --git a/openembedded/packages/base-files/base-files/openzaurus/issue.net b/openembedded/packages/base-files/base-files/openzaurus/issue.net new file mode 100644 index 0000000000..17bc7423f9 --- /dev/null +++ b/openembedded/packages/base-files/base-files/openzaurus/issue.net @@ -0,0 +1,2 @@ +OpenZaurus Unofficial Snapshot %h + diff --git a/openembedded/packages/base-files/base-files/poodle/fstab b/openembedded/packages/base-files/base-files/poodle/fstab new file mode 100644 index 0000000000..31e2edb831 --- /dev/null +++ b/openembedded/packages/base-files/base-files/poodle/fstab @@ -0,0 +1,8 @@ +/dev/mtdblock2 / jffs2 rw,noatime 1 1 +/dev/mtdblock3 /home jffs2 defaults,noatime 1 2 +proc /proc proc defaults 0 0 +/dev/hda1 /media/cf auto defaults,sync,noauto 0 0 +/dev/mmcda1 /media/card auto defaults,sync,noauto 0 0 + +tmpfs /var tmpfs defaults 0 0 +tmpfs /media/ram tmpfs defaults 0 0 diff --git a/openembedded/packages/base-files/base-files/poodle/usbd b/openembedded/packages/base-files/base-files/poodle/usbd new file mode 100644 index 0000000000..40931ee8e9 --- /dev/null +++ b/openembedded/packages/base-files/base-files/poodle/usbd @@ -0,0 +1 @@ +usbdmodule=pxa_bi diff --git a/openembedded/packages/base-files/base-files/profile b/openembedded/packages/base-files/base-files/profile new file mode 100644 index 0000000000..a4c16944b9 --- /dev/null +++ b/openembedded/packages/base-files/base-files/profile @@ -0,0 +1,32 @@ +# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) +# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). + +PATH="/usr/local/bin:/usr/bin:/bin" +EDITOR="/bin/vi" # needed for packages like cron +TERM="vt100" # Basic terminal capab. For screen etc. + +if [ ! -e /etc/localtime ]; then + TZ="UTC" # Time Zone. Look at http://theory.uwinnipeg.ca/gnu/glibc/libc_303.html + # for an explanation of how to set this to your local timezone. + export TZ +fi + +if [ "`id -u`" -eq 0 ]; then + PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin: +fi +if [ "$PS1" ]; then +# works for bash and ash (no other shells known to be in use here) + PS1='\u@\h:\w\$ ' +fi + +if [ -d /etc/profile.d ]; then + for i in `ls /etc/profile.d/`; do + . /etc/profile.d/$i + done + unset i +fi + +export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM + +umask 022 + diff --git a/openembedded/packages/base-files/base-files/share/dot.bashrc b/openembedded/packages/base-files/base-files/share/dot.bashrc new file mode 100644 index 0000000000..4be63686c2 --- /dev/null +++ b/openembedded/packages/base-files/base-files/share/dot.bashrc @@ -0,0 +1,16 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. + +export PS1='\h:\w\$ ' +umask 022 + +# You may uncomment the following lines if you want `ls' to be colorized: +# export LS_OPTIONS='--color=auto' +# eval `dircolors` +# alias ls='ls $LS_OPTIONS' +# alias ll='ls $LS_OPTIONS -l' +# alias l='ls $LS_OPTIONS -lA' +# +# Some more alias to avoid making mistakes: +# alias rm='rm -i' +# alias cp='cp -i' +# alias mv='mv -i' diff --git a/openembedded/packages/base-files/base-files/share/dot.profile b/openembedded/packages/base-files/base-files/share/dot.profile new file mode 100644 index 0000000000..979793e8b5 --- /dev/null +++ b/openembedded/packages/base-files/base-files/share/dot.profile @@ -0,0 +1,10 @@ +# ~/.profile: executed by Bourne-compatible login shells. + +if [ -f ~/.bashrc ]; then + . ~/.bashrc +fi + +# path set by /etc/profile +# export PATH + +mesg n diff --git a/openembedded/packages/base-files/base-files/simpad/fstab b/openembedded/packages/base-files/base-files/simpad/fstab new file mode 100644 index 0000000000..f946c50c6c --- /dev/null +++ b/openembedded/packages/base-files/base-files/simpad/fstab @@ -0,0 +1,7 @@ +rootfs / auto defaults 1 1 +proc /proc proc defaults 0 0 +devpts /dev/pts devpts mode=0620,gid=5 0 0 +usbdevfs /proc/bus/usb usbdevfs noauto 0 0 +tmpfs /var tmpfs defaults 0 0 +/dev/mtdblock/2 /home jffs2 defaults 1 1 + diff --git a/openembedded/packages/base-files/base-files/spitz/fstab b/openembedded/packages/base-files/base-files/spitz/fstab new file mode 100644 index 0000000000..b4fc969634 --- /dev/null +++ b/openembedded/packages/base-files/base-files/spitz/fstab @@ -0,0 +1,26 @@ +# don't mount /dev/mtdblock2 since Spitz uses pivot_root +# /dev/mtdblock2 / jffs2 rw,noatime 1 1 +rootfs / auto defaults 1 1 +proc /proc proc defaults 0 0 +tmpfs /var tmpfs defaults 0 0 +tmpfs /media/ram tmpfs defaults 0 0 + +# Compact Flash memory cards +/dev/hdb1 /media/cf auto defaults,sync,noauto 0 0 +# SD/MMC in kernel 2.4 +/dev/mmcda1 /media/card auto defaults,sync,noauto 0 0 +# SD/MMC in kernel 2.6 +#/dev/mmcblk0p1 /media/card auto defaults,sync,noauto 0 0 + +# +# USB +# +/dev/sda1 /media/usbhdd vfat noauto,umask=000,noatime,iocharset=utf8,codepage=932 0 0 +devpts /dev/pts devpts mode=0620,gid=5 0 0 +usbdevfs /proc/bus/usb usbdevfs noauto 0 0 + +# +# Harddisk +# +/dev/hda1 /media/hdd ext3 noauto,defaults,noatime 0 0 + diff --git a/openembedded/packages/base-files/base-files/tosa/fstab b/openembedded/packages/base-files/base-files/tosa/fstab new file mode 100644 index 0000000000..886b065b52 --- /dev/null +++ b/openembedded/packages/base-files/base-files/tosa/fstab @@ -0,0 +1,12 @@ +/dev/mtdblock2 / jffs2 rw,noatime 1 1 +/dev/mtdblock3 /home jffs2 defaults,noatime 1 2 +proc /proc proc defaults 0 0 +/dev/hda1 /media/cf auto defaults,sync,noauto 0 0 + +tmpfs /var tmpfs defaults 0 0 +tmpfs /media/ram tmpfs defaults 0 0 + +# SD/MMC in kernel 2.4 +/dev/mmcda1 /media/card auto defaults,sync,noauto 0 0 +# SD/MMC in kernel 2.6 +/dev/mmcblk0p1 /media/card auto defaults,sync,auto 0 0 diff --git a/openembedded/packages/base-files/base-files/tosa/usbd b/openembedded/packages/base-files/base-files/tosa/usbd new file mode 100644 index 0000000000..40931ee8e9 --- /dev/null +++ b/openembedded/packages/base-files/base-files/tosa/usbd @@ -0,0 +1 @@ +usbdmodule=pxa_bi diff --git a/openembedded/packages/base-files/base-files/usbd b/openembedded/packages/base-files/base-files/usbd new file mode 100644 index 0000000000..e69de29bb2 diff --git a/openembedded/packages/base-files/base-files/wrt54/fstab b/openembedded/packages/base-files/base-files/wrt54/fstab new file mode 100644 index 0000000000..c1e52f8927 --- /dev/null +++ b/openembedded/packages/base-files/base-files/wrt54/fstab @@ -0,0 +1,7 @@ +# /etc/fstab: static file system information. wrt +# +# +rootfs / auto defaults 1 1 +tmpfs /var tmpfs size=50% 0 0 +proc /proc proc defaults 0 0 +devpts /dev/pts devpts mode=0620,gid=5 0 0 diff --git a/openembedded/packages/base-files/base-files/wrt54/profile b/openembedded/packages/base-files/base-files/wrt54/profile new file mode 100644 index 0000000000..bedf2fc7d8 --- /dev/null +++ b/openembedded/packages/base-files/base-files/wrt54/profile @@ -0,0 +1,25 @@ +# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) +# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). + +PATH="/usr/local/bin:/usr/bin:/bin" + +if [ "`id -u`" -eq 0 ]; then + PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin: +fi +if [ "$PS1" ]; then +# works for bash and ash (no other shells known to be in use here) + PS1='\u@\h:\w\$ ' +fi + +if [ -d /etc/profile.d ]; then + for i in `ls /etc/profile.d/`; do + . /etc/profile.d/$i + done + unset i +fi + +export PATH PS1 + +umask 022 + +alias ll="ls -lah" \ No newline at end of file diff --git a/openembedded/packages/base-files/base-files/xxs1500/fstab b/openembedded/packages/base-files/base-files/xxs1500/fstab new file mode 100644 index 0000000000..7007ab021b --- /dev/null +++ b/openembedded/packages/base-files/base-files/xxs1500/fstab @@ -0,0 +1,8 @@ +# /etc/fstab: static file system information. +# +# +rootfs / auto defaults 1 1 +tmpfs /var tmpfs size=10m 0 0 +proc /proc proc defaults 0 0 +devpts /dev/pts devpts mode=0620,gid=5 0 0 +usbdevfs /proc/bus/usb usbdevfs noauto 0 0 diff --git a/openembedded/packages/base-files/base-files_3.0.14.bb b/openembedded/packages/base-files/base-files_3.0.14.bb new file mode 100644 index 0000000000..144bf2e135 --- /dev/null +++ b/openembedded/packages/base-files/base-files_3.0.14.bb @@ -0,0 +1,150 @@ +DESCRIPTION = "Miscellaneous files for the base system." +SECTION = "base" +PRIORITY = "required" +PR = "r39" +LICENSE = "GPL" + +SRC_URI = " \ + file://nsswitch.conf \ + file://motd \ + file://inputrc \ + file://host.conf \ + file://profile \ + file://fstab \ + file://filesystems \ + file://issue.net \ + file://issue \ + file://usbd \ + file://share/dot.bashrc \ + file://share/dot.profile \ + file://licenses/BSD \ + file://licenses/GPL-2 \ + file://licenses/LGPL-2 \ + file://licenses/LGPL-2.1 \ + file://licenses/Artistic " +S = "${WORKDIR}" + +docdir_append = "/${P}" +dirs1777 = "/tmp ${localstatedir}/lock ${localstatedir}/tmp" +dirs2775 = "/home ${prefix}/src ${localstatedir}/local" +dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \ + ${sysconfdir}/skel /lib /mnt /proc /home/root /sbin \ + ${prefix} ${bindir} ${docdir} /usr/games ${includedir} \ + ${libdir} ${sbindir} ${datadir} \ + ${datadir}/common-licenses ${datadir}/dict ${infodir} \ + ${mandir} ${datadir}/misc ${localstatedir} \ + ${localstatedir}/backups ${localstatedir}/cache \ + ${localstatedir}/lib /sys ${localstatedir}/lib/misc \ + ${localstatedir}/lock/subsys ${localstatedir}/log \ + ${localstatedir}/run ${localstatedir}/spool \ + /mnt /media /media/card /media/cf /media/net /media/ram \ + /media/union /media/realroot /media/hdd \ + /media/mmc1" +conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \ + ${sysconfdir}/inputrc ${sysconfdir}/issue /${sysconfdir}/issue.net \ + ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \ + ${sysconfdir}/default" + +hostname = "openembedded" +hostname_openslug = "openslug" +hostname_mnci = "MNCI" +PACKAGE_ARCH_mnci = "mnci" +hostname_rt3000 = "MNRT" +PACKAGE_ARCH_rt3000 = "rt3000" + +do_install () { + for d in ${dirs755}; do + install -m 0755 -d ${D}$d + done + for d in ${dirs1777}; do + install -m 1777 -d ${D}$d + done + for d in ${dirs2775}; do + install -m 2755 -d ${D}$d + done + for d in card cf net ram; do + ln -sf /media/$d ${D}/mnt/$d + done + + if [ -n "${MACHINE}" -a "${hostname}" = "openembedded" ]; then + echo ${MACHINE} > ${D}${sysconfdir}/hostname + else + echo ${hostname} > ${D}${sysconfdir}/hostname + fi + + if [ -n "${DISTRO_NAME}" ]; then + echo -n "${DISTRO_NAME} " > ${D}${sysconfdir}/issue + echo -n "${DISTRO_NAME} " > ${D}${sysconfdir}/issue.net + if [ -n "${DISTRO_VERSION}" ]; then + echo -n "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue + echo -n "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue.net + fi + echo "\n \l" >> ${D}${sysconfdir}/issue + echo >> ${D}${sysconfdir}/issue + echo "%h" >> ${D}${sysconfdir}/issue.net + echo >> ${D}${sysconfdir}/issue.net + else + install -m 0644 ${WORKDIR}/issue ${D}${sysconfdir}/issue + install -m 0644 ${WORKDIR}/issue.net ${D}${sysconfdir}/issue.net + fi + + install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab + install -m 0644 ${WORKDIR}/filesystems ${D}${sysconfdir}/filesystems + install -m 0644 ${WORKDIR}/usbd ${D}${sysconfdir}/default/usbd + install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile + install -m 0755 ${WORKDIR}/share/dot.profile ${D}${sysconfdir}/skel/.profile + install -m 0755 ${WORKDIR}/share/dot.bashrc ${D}${sysconfdir}/skel/.bashrc + install -m 0644 ${WORKDIR}/inputrc ${D}${sysconfdir}/inputrc + install -m 0644 ${WORKDIR}/nsswitch.conf ${D}${sysconfdir}/nsswitch.conf + install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf + install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd + + for license in BSD GPL-2 LGPL-2 LGPL-2.1 Artistic; do + install -m 0644 ${WORKDIR}/licenses/$license ${D}${datadir}/common-licenses/ + done + + ln -sf /proc/mounts ${D}${sysconfdir}/mtab +} + + +do_install_append_mnci () { + rmdir ${D}/tmp + mkdir -p ${D}${localstatedir}/tmp + ln -s var/tmp ${D}/tmp +} + +do_install_append_nylon() { + printf "" "" >${D}${sysconfdir}/resolv.conf + rm -r ${D}/mnt/* + rm -r ${D}/media + rm -rf ${D}/tmp + ln -sf /var/tmp ${D}/tmp +} + +do_install_append_openslug() { + printf "" "" >${D}${sysconfdir}/resolv.conf + rm -r ${D}/mnt/* + rmdir ${D}/home/root + install -m 0755 -d ${D}/root + ln -s ../root ${D}/home/root +} + +PACKAGES = "${PN}-doc ${PN}" +FILES_${PN} = "/" +FILES_${PN}-doc = "${docdir} ${datadir}/common-licenses" + + +# Unslung distribution specific packages follow ... + +PACKAGES_unslung = "${PN}-unslung" +PACKAGE_ARCH_${PN}-unslung = "nslu2" +MAINTAINER_${PN}-unslung = "NSLU2 Linux " +RDEPENDS_${PN}-unslung = "nslu2-linksys-ramdisk" +RPROVIDES_${PN}-unslung = "${PN}" + +FILES_${PN}-unslung = "" + +CONFFILES_${PN} = "${sysconfdir}/fstab ${sysconfdir}/hostname" +CONFFILES_${PN}_nylon = "${sysconfdir}/resolv.conf ${sysconfdir}/fstab ${sysconfdir}/hostname" +CONFFILES_${PN}_openslug = "${sysconfdir}/resolv.conf ${sysconfdir}/fstab ${sysconfdir}/hostname" + diff --git a/openembedded/packages/base-passwd/base-passwd-3.5.9/configure.patch b/openembedded/packages/base-passwd/base-passwd-3.5.9/configure.patch new file mode 100644 index 0000000000..a9adb1e9e2 --- /dev/null +++ b/openembedded/packages/base-passwd/base-passwd-3.5.9/configure.patch @@ -0,0 +1,23 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- base-passwd/configure.in~configure ++++ base-passwd/configure.in +@@ -1,5 +1,6 @@ + dnl Initialize the autoconf process +-AC_INIT(update-passwd.c) ++AC_INIT ++AC_CONFIG_SRCDIR([update-passwd.c]) + AC_CONFIG_HEADER(config.h) + AC_PREFIX_DEFAULT(/usr) + +@@ -12,5 +13,6 @@ + AC_CHECK_FUNCS(putgrent) + + dnl Finally output everything +-AC_OUTPUT(Makefile) ++AC_CONFIG_FILES([Makefile]) ++AC_OUTPUT + diff --git a/openembedded/packages/base-passwd/base-passwd-3.5.9/mysql.patch b/openembedded/packages/base-passwd/base-passwd-3.5.9/mysql.patch new file mode 100644 index 0000000000..b641f41238 --- /dev/null +++ b/openembedded/packages/base-passwd/base-passwd-3.5.9/mysql.patch @@ -0,0 +1,8 @@ +--- base-passwd/group.master.orig 2005-07-08 06:36:07.717990112 +0200 ++++ base-passwd/group.master 2005-07-08 06:36:32.000000000 +0200 +@@ -36,4 +36,5 @@ + staff:*:50: + games:*:60: + users:*:100: ++mysql:*:64001: + nogroup:*:65534: diff --git a/openembedded/packages/base-passwd/base-passwd-3.5.9/nobash.patch b/openembedded/packages/base-passwd/base-passwd-3.5.9/nobash.patch new file mode 100644 index 0000000000..2bde9bf33b --- /dev/null +++ b/openembedded/packages/base-passwd/base-passwd-3.5.9/nobash.patch @@ -0,0 +1,13 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- base-passwd/passwd.master~nobash ++++ base-passwd/passwd.master +@@ -1,4 +1,4 @@ +-root::0:0:root:/root:/bin/bash ++root::0:0:root:/root:/bin/sh + daemon:*:1:1:daemon:/usr/sbin:/bin/sh + bin:*:2:2:bin:/bin:/bin/sh + sys:*:3:3:sys:/dev:/bin/sh diff --git a/openembedded/packages/base-passwd/base-passwd-3.5.9/openslug/README b/openembedded/packages/base-passwd/base-passwd-3.5.9/openslug/README new file mode 100644 index 0000000000..05c2e419f5 --- /dev/null +++ b/openembedded/packages/base-passwd/base-passwd-3.5.9/openslug/README @@ -0,0 +1,13 @@ +This patch overrides the root-home.patch for DISTRO=openslug + +The patch sets a root password on /etc/passwd, this password is + +opeNSLUg + +This allows ssh (dropbear) login to an OpenSlug NSLU2 using that +password. + +The password is NO MORE SECURE than the previous empty string, +however, because ssh logins can now succeed the NSLU2 is LESS +secure! This password must be changed as soon as possible after +initial configuration of the NSLU2. diff --git a/openembedded/packages/base-passwd/base-passwd-3.5.9/openslug/root-home.patch b/openembedded/packages/base-passwd/base-passwd-3.5.9/openslug/root-home.patch new file mode 100644 index 0000000000..97dab68f33 --- /dev/null +++ b/openembedded/packages/base-passwd/base-passwd-3.5.9/openslug/root-home.patch @@ -0,0 +1,8 @@ +--- base-passwd/passwd.master.orig 2005-07-08 06:26:22.000000000 +0200 ++++ base-passwd/passwd.master 2005-07-08 06:31:58.000000000 +0200 +@@ -1,4 +1,4 @@ +-root::0:0:root:/root:/bin/sh ++root:Xm./49bYkrkuo:0:0:root:/root:/bin/sh + daemon:*:1:1:daemon:/usr/sbin:/bin/sh + bin:*:2:2:bin:/bin:/bin/sh + sys:*:3:3:sys:/dev:/bin/sh diff --git a/openembedded/packages/base-passwd/base-passwd-3.5.9/root-home.patch b/openembedded/packages/base-passwd/base-passwd-3.5.9/root-home.patch new file mode 100644 index 0000000000..85d96b6185 --- /dev/null +++ b/openembedded/packages/base-passwd/base-passwd-3.5.9/root-home.patch @@ -0,0 +1,8 @@ +--- base-passwd/passwd.master.orig 2005-07-08 06:26:22.000000000 +0200 ++++ base-passwd/passwd.master 2005-07-08 06:31:58.000000000 +0200 +@@ -1,4 +1,4 @@ +-root::0:0:root:/root:/bin/sh ++root::0:0:root:/home/root:/bin/sh + daemon:*:1:1:daemon:/usr/sbin:/bin/sh + bin:*:2:2:bin:/bin:/bin/sh + sys:*:3:3:sys:/dev:/bin/sh diff --git a/openembedded/packages/base-passwd/base-passwd_3.5.9.bb b/openembedded/packages/base-passwd/base-passwd_3.5.9.bb new file mode 100644 index 0000000000..6fcb211bda --- /dev/null +++ b/openembedded/packages/base-passwd/base-passwd_3.5.9.bb @@ -0,0 +1,59 @@ +DESCRIPTION = "Base system password/group files." +SECTION = "base" +PR = "r2" +LICENSE = "GPL" + +SRC_URI = "${DEBIAN_MIRROR}/main/b/base-passwd/base-passwd_${PV}.tar.gz \ + file://configure.patch;patch=1 \ + file://nobash.patch;patch=1 \ + file://root-home.patch;patch=1 \ + file://mysql.patch;patch=1" + +S = "${WORKDIR}/base-passwd" + +inherit autotools + +FILES_${PN}-doc += "${docdir}" + +do_install () { + install -d -m 755 ${D}${sbindir} + install -p -m 755 update-passwd ${D}${sbindir}/ + install -d -m 755 \ + ${D}${mandir}/man8 ${D}${mandir}/pl/man8 + install -p -m 644 man/update-passwd.8 \ + ${D}${mandir}/man8/ + install -p -m 644 man/update-passwd.pl.8 \ + ${D}${mandir}/pl/man8/update-passwd.8 + gzip -9 ${D}${mandir}/man8/* \ + ${D}${mandir}/pl/man8/* + install -d -m 755 ${D}${datadir}/base-passwd + install -p -m 644 passwd.master \ + ${D}${datadir}/base-passwd/ + install -p -m 644 group.master \ + ${D}${datadir}/base-passwd/ + + install -d -m 755 ${D}${docdir}/${PN} + install -p -m 644 debian/changelog ${D}${docdir}/${PN}/ + gzip -9 ${D}${docdir}/${PN}/* + install -p -m 644 README ${D}${docdir}/${PN}/ + install -p -m 644 debian/copyright ${D}${docdir}/${PN}/ +} + + +do_install_append_openmn() { + echo "0:Jn6tcg/qjqvUE:0:0:root:/root:/bin/sh" >>${D}${datadir}/base-passwd/passwd.master +} + + +pkg_postinst () { + set -e + + if [ ! -e $D${sysconfdir}/passwd ] ; then + cp $D${datadir}/base-passwd/passwd.master $D${sysconfdir}/passwd + fi + + if [ ! -e $D${sysconfdir}/group ] ; then + cp $D${datadir}/base-passwd/group.master $D${sysconfdir}/group + fi + exit 0 +} diff --git a/openembedded/packages/binutils/binutils-2.15.94.0.1/binutils-100_cflags_for_build.patch b/openembedded/packages/binutils/binutils-2.15.94.0.1/binutils-100_cflags_for_build.patch new file mode 100644 index 0000000000..468808bf59 --- /dev/null +++ b/openembedded/packages/binutils/binutils-2.15.94.0.1/binutils-100_cflags_for_build.patch @@ -0,0 +1,91 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- src/bfd/doc/Makefile.am~binutils-100_cflags_for_build.patch ++++ src/bfd/doc/Makefile.am +@@ -55,10 +55,10 @@ + MKDOC = chew$(EXEEXT_FOR_BUILD) + + $(MKDOC): chew.o +- $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS) ++ $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LOADLIBES) $(LDFLAGS_FOR_BUILD) + + chew.o: chew.c +- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c ++ $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c + + protos: libbfd.h libcoff.h bfd.h + +--- src/binutils/Makefile.am~binutils-100_cflags_for_build.patch ++++ src/binutils/Makefile.am +@@ -219,20 +219,20 @@ + ./sysinfo$(EXEEXT_FOR_BUILD) -d <$(srcdir)/sysroff.info >sysroff.h + + sysinfo$(EXEEXT_FOR_BUILD): sysinfo.o syslex.o +- $(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) -o $@ sysinfo.o syslex.o ++ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ sysinfo.o syslex.o + + syslex.o: syslex.c sysinfo.h + if [ -r syslex.c ]; then \ +- $(CC_FOR_BUILD) -c -I. $(CFLAGS) syslex.c ; \ ++ $(CC_FOR_BUILD) -c -I. $(CFLAGS_FOR_BUILD) syslex.c ; \ + else \ +- $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(CFLAGS) $(srcdir)/syslex.c ;\ ++ $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(CFLAGS_FOR_BUILD) $(srcdir)/syslex.c ;\ + fi + + sysinfo.o: sysinfo.c + if [ -r sysinfo.c ]; then \ +- $(CC_FOR_BUILD) -c -I. $(CFLAGS) sysinfo.c ; \ ++ $(CC_FOR_BUILD) -c -I. $(CFLAGS_FOR_BUILD) sysinfo.c ; \ + else \ +- $(CC_FOR_BUILD) -c -I. $(CFLAGS) $(srcdir)/sysinfo.c ; \ ++ $(CC_FOR_BUILD) -c -I. $(CFLAGS_FOR_BUILD) $(srcdir)/sysinfo.c ; \ + fi + + # We need these for parallel make. +--- src/bfd/doc/Makefile.in~binutils-100_cflags_for_build.patch ++++ src/bfd/doc/Makefile.in +@@ -470,10 +470,10 @@ + + + $(MKDOC): chew.o +- $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS) ++ $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LOADLIBES) $(LDFLAGS_FOR_BUILD) + + chew.o: chew.c +- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c ++ $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c + + protos: libbfd.h libcoff.h bfd.h + +--- src/binutils/Makefile.in~binutils-100_cflags_for_build.patch ++++ src/binutils/Makefile.in +@@ -978,20 +978,20 @@ + ./sysinfo$(EXEEXT_FOR_BUILD) -d <$(srcdir)/sysroff.info >sysroff.h + + sysinfo$(EXEEXT_FOR_BUILD): sysinfo.o syslex.o +- $(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) -o $@ sysinfo.o syslex.o ++ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ sysinfo.o syslex.o + + syslex.o: syslex.c sysinfo.h + if [ -r syslex.c ]; then \ +- $(CC_FOR_BUILD) -c -I. $(CFLAGS) syslex.c ; \ ++ $(CC_FOR_BUILD) -c -I. $(CFLAGS_FOR_BUILD) syslex.c ; \ + else \ +- $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(CFLAGS) $(srcdir)/syslex.c ;\ ++ $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(CFLAGS_FOR_BUILD) $(srcdir)/syslex.c ;\ + fi + + sysinfo.o: sysinfo.c + if [ -r sysinfo.c ]; then \ +- $(CC_FOR_BUILD) -c -I. $(CFLAGS) sysinfo.c ; \ ++ $(CC_FOR_BUILD) -c -I. $(CFLAGS_FOR_BUILD) sysinfo.c ; \ + else \ +- $(CC_FOR_BUILD) -c -I. $(CFLAGS) $(srcdir)/sysinfo.c ; \ ++ $(CC_FOR_BUILD) -c -I. $(CFLAGS_FOR_BUILD) $(srcdir)/sysinfo.c ; \ + fi + + # We need these for parallel make. diff --git a/openembedded/packages/binutils/binutils-2.15.94.0.1/binutils-2.15.90.0.3-uclibc-200-build_modules.patch b/openembedded/packages/binutils/binutils-2.15.94.0.1/binutils-2.15.90.0.3-uclibc-200-build_modules.patch new file mode 100644 index 0000000000..3560d2ca36 --- /dev/null +++ b/openembedded/packages/binutils/binutils-2.15.94.0.1/binutils-2.15.90.0.3-uclibc-200-build_modules.patch @@ -0,0 +1,33 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- src/configure~binutils-2.15.90.0.3-uclibc-200-build_modules.patch ++++ src/configure +@@ -940,6 +940,11 @@ + build_configdirs=`echo ${build_libs} ${build_tools}` + fi + ++case "$target" in ++ *-*-*-uclibc*) ++ build_modules= ++ ;; ++esac + ################################################################################ + + srcname="gnu development package" +--- src/configure.in~binutils-2.15.90.0.3-uclibc-200-build_modules.patch ++++ src/configure.in +@@ -189,6 +189,11 @@ + build_configdirs=`echo ${build_libs} ${build_tools}` + fi + ++case "$target" in ++ *-*-*-uclibc*) ++ build_modules= ++ ;; ++esac + ################################################################################ + + srcname="gnu development package" diff --git a/openembedded/packages/binutils/binutils-2.15.94.0.1/binutils-2.15.90.0.3-uclibc-210-cflags.patch b/openembedded/packages/binutils/binutils-2.15.94.0.1/binutils-2.15.90.0.3-uclibc-210-cflags.patch new file mode 100644 index 0000000000..40a71c602a --- /dev/null +++ b/openembedded/packages/binutils/binutils-2.15.94.0.1/binutils-2.15.90.0.3-uclibc-210-cflags.patch @@ -0,0 +1,30 @@ +--- binutils-2.15.90.0.3/bfd/doc/Makefile.am.cflags 2004-01-14 16:07:44.000000000 -0500 ++++ binutils-2.15.90.0.3/bfd/doc/Makefile.am 2004-04-22 22:06:35.000000000 -0400 +@@ -55,10 +55,10 @@ + MKDOC = chew$(EXEEXT_FOR_BUILD) + + $(MKDOC): chew.o +- $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS) ++ $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LOADLIBES) $(LDFLAGS) + + chew.o: chew.c +- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c ++ $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c + + protos: libbfd.h libcoff.h bfd.h + +--- binutils-2.15.90.0.3/bfd/doc/Makefile.in.cflags 2004-04-12 15:56:34.000000000 -0400 ++++ binutils-2.15.90.0.3/bfd/doc/Makefile.in 2004-04-22 22:06:35.000000000 -0400 +@@ -472,10 +472,10 @@ + + + $(MKDOC): chew.o +- $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS) ++ $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LOADLIBES) $(LDFLAGS) + + chew.o: chew.c +- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c ++ $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c + + protos: libbfd.h libcoff.h bfd.h + diff --git a/openembedded/packages/binutils/binutils-2.15.94.0.1/binutils-2.15.91.0.1-uclibc-100-conf.patch b/openembedded/packages/binutils/binutils-2.15.94.0.1/binutils-2.15.91.0.1-uclibc-100-conf.patch new file mode 100644 index 0000000000..d650cdbc91 --- /dev/null +++ b/openembedded/packages/binutils/binutils-2.15.94.0.1/binutils-2.15.91.0.1-uclibc-100-conf.patch @@ -0,0 +1,604 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- binutils-2.15.94.0.1/bfd/config.bfd~binutils-2.15.91.0.1-uclibc-100-conf ++++ binutils-2.15.94.0.1/bfd/config.bfd +@@ -140,7 +140,7 @@ + targ_defvec=ecoffalpha_little_vec + targ_selvecs=bfd_elf64_alpha_vec + ;; +- alpha*-*-linux-gnu* | alpha*-*-elf*) ++ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc* | alpha*-*-elf*) + targ_defvec=bfd_elf64_alpha_vec + targ_selvecs=ecoffalpha_little_vec + ;; +@@ -150,7 +150,7 @@ + alpha*-*-*) + targ_defvec=ecoffalpha_little_vec + ;; +- ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu) ++ ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-linux-uclibc* | ia64*-*-kfreebsd*-gnu) + targ_defvec=bfd_elf64_ia64_little_vec + targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec" + ;; +@@ -227,7 +227,7 @@ + targ_defvec=bfd_elf32_littlearm_vec + targ_selvecs=bfd_elf32_bigarm_vec + ;; +- armeb-*-elf | arm*b-*-linux-gnu*) ++ armeb-*-elf | arm*b-*-linux-gnu* | arm*b-*-linux-uclibc*) + targ_defvec=bfd_elf32_bigarm_vec + targ_selvecs=bfd_elf32_littlearm_vec + ;; +@@ -237,7 +237,7 @@ + ;; + arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \ + arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks | \ +- arm*-*-eabi* ) ++ arm*-*-eabi* | arm*-*-linux-uclibc* ) + targ_defvec=bfd_elf32_littlearm_vec + targ_selvecs=bfd_elf32_bigarm_vec + ;; +@@ -381,7 +381,7 @@ + ;; + + #ifdef BFD64 +- hppa*64*-*-linux-gnu*) ++ hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*) + targ_defvec=bfd_elf64_hppa_linux_vec + targ_selvecs=bfd_elf64_hppa_vec + ;; +@@ -392,7 +392,7 @@ + ;; + #endif + +- hppa*-*-linux-gnu*) ++ hppa*-*-linux-gnu* | hppa*-*-linux-uclibc*) + targ_defvec=bfd_elf32_hppa_linux_vec + targ_selvecs=bfd_elf32_hppa_vec + ;; +@@ -525,7 +525,7 @@ + targ_selvecs=bfd_elf32_i386_vec + targ_underscore=yes + ;; +- i[3-7]86-*-linux-gnu*) ++ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*) + targ_defvec=bfd_elf32_i386_vec + targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec" + targ64_selvecs=bfd_elf64_x86_64_vec +@@ -539,7 +539,7 @@ + targ_defvec=bfd_elf64_x86_64_vec + targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec" + ;; +- x86_64-*-linux-gnu*) ++ x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*) + targ_defvec=bfd_elf64_x86_64_vec + targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec" + ;; +@@ -715,7 +715,7 @@ + targ_selvecs=bfd_elf32_m68k_vec + targ_underscore=yes + ;; +- m68*-*-linux-gnu*) ++ m68*-*-linux-gnu* | m68*-*-linux-uclibc*) + targ_defvec=bfd_elf32_m68k_vec + targ_selvecs=m68klinux_vec + ;; +@@ -1001,7 +1001,8 @@ + ;; + #endif + powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \ +- powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \ ++ powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-linux-uclibc* | \ ++ powerpc-*-rtems* | \ + powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*) + targ_defvec=bfd_elf32_powerpc_vec + targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec" +@@ -1038,8 +1039,8 @@ + targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec" + ;; + powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \ +- powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\ +- powerpcle-*-rtems*) ++ powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-linux-uclibc* |\ ++ powerpcle-*-vxworks* | powerpcle-*-rtems*) + targ_defvec=bfd_elf32_powerpcle_vec + targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec" + targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec" +@@ -1206,7 +1207,7 @@ + targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec" + targ_underscore=yes + ;; +- sparc-*-linux-gnu*) ++ sparc-*-linux-gnu* | sparc-*-linux-uclibc*) + targ_defvec=bfd_elf32_sparc_vec + targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec" + ;; +@@ -1253,7 +1254,7 @@ + targ_defvec=sunos_big_vec + targ_underscore=yes + ;; +- sparc64-*-linux-gnu*) ++ sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*) + targ_defvec=bfd_elf64_sparc_vec + targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec" + ;; +--- binutils-2.15.94.0.1/bfd/configure~binutils-2.15.91.0.1-uclibc-100-conf ++++ binutils-2.15.94.0.1/bfd/configure +@@ -3583,6 +3583,11 @@ + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd* | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' +@@ -9914,7 +9919,7 @@ + alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu) + COREFILE='' + ;; +- alpha*-*-linux-gnu*) ++ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/alphalinux.h"' + ;; +@@ -9978,7 +9983,7 @@ + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/i386mach3.h"' + ;; +- i[3-7]86-*-linux-gnu*) ++ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/i386linux.h"' + ;; +@@ -10016,7 +10021,7 @@ + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/hp300bsd.h"' + ;; +- m68*-*-linux-gnu*) ++ m68*-*-linux-gnu* | m68*-*-linux-uclibc*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/m68klinux.h"' + ;; +--- binutils-2.15.94.0.1/bfd/configure.in~binutils-2.15.91.0.1-uclibc-100-conf ++++ binutils-2.15.94.0.1/bfd/configure.in +@@ -163,7 +163,7 @@ + alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu) + COREFILE='' + ;; +- alpha*-*-linux-gnu*) ++ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/alphalinux.h"' + ;; +@@ -248,7 +248,7 @@ + TRAD_HEADER='"hosts/i386mach3.h"' + ;; + changequote(,)dnl +- i[3-7]86-*-linux-gnu*) ++ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*) + changequote([,])dnl + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/i386linux.h"' +@@ -289,7 +289,7 @@ + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/hp300bsd.h"' + ;; +- m68*-*-linux-gnu*) ++ m68*-*-linux-gnu* | m68*-*-linux-uclibc*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/m68klinux.h"' + ;; +--- binutils-2.15.94.0.1/gas/configure~binutils-2.15.91.0.1-uclibc-100-conf ++++ binutils-2.15.94.0.1/gas/configure +@@ -3420,6 +3420,11 @@ + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd* | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' +@@ -4256,6 +4261,7 @@ + alpha*-*-osf*) fmt=ecoff ;; + alpha*-*-linuxecoff*) fmt=ecoff ;; + alpha*-*-linux-gnu*) fmt=elf em=linux ;; ++ alpha*-*-linux-uclibc*) fmt=elf em=linux ;; + alpha*-*-netbsd*) fmt=elf em=nbsd ;; + alpha*-*-openbsd*) fmt=elf em=obsd ;; + +@@ -4271,6 +4277,7 @@ + arm*-*-conix*) fmt=elf ;; + arm-*-linux*aout*) fmt=aout em=linux ;; + arm*-*-linux-gnu*) fmt=elf em=linux ;; ++ arm*-*-linux-uclibc*) fmt=elf em=linux ;; + arm*-*-uclinux*) fmt=elf em=linux ;; + arm-*-netbsdelf*) fmt=elf em=nbsd ;; + arm-*-*n*bsd*) fmt=aout em=nbsd ;; +@@ -4284,6 +4291,7 @@ + + cris-*-linux-gnu* | crisv32-*-linux-gnu*) + fmt=multi bfd_gas=yes em=linux ;; ++ cris-*-linux-uclibc*) fmt=multi bfd_gas=yes em=linux ;; + cris-*-* | crisv32-*-*) fmt=multi bfd_gas=yes ;; + + crx-*-elf*) fmt=elf ;; +@@ -4343,7 +4351,9 @@ + i386-*-linux*oldld) fmt=aout em=linux ;; + i386-*-linux*coff*) fmt=coff em=linux ;; + i386-*-linux-gnu*) fmt=elf em=linux ;; ++ i386-*-linux-uclibc*) fmt=elf em=linux ;; + x86_64-*-linux-gnu*) fmt=elf em=linux ;; ++ x86_64-*-linux-uclibc*) fmt=elf em=linux ;; + i386-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;; + i386-*-sysv[45]*) fmt=elf ;; + i386-*-solaris*) fmt=elf ;; +@@ -4403,6 +4413,7 @@ + ia64-*-elf*) fmt=elf ;; + ia64-*-aix*) fmt=elf em=ia64aix ;; + ia64-*-linux-gnu*) fmt=elf em=linux ;; ++ ia64-*-linux-uclibc*) fmt=elf em=linux ;; + ia64-*-hpux*) fmt=elf em=hpux ;; + ia64-*-netbsd*) fmt=elf em=nbsd ;; + +@@ -4430,6 +4441,7 @@ + m68k-*-hpux*) fmt=hp300 em=hp300 ;; + m68k-*-linux*aout*) fmt=aout em=linux ;; + m68k-*-linux-gnu*) fmt=elf em=linux ;; ++ m68k-*-linux-uclibc*) fmt=elf em=linux ;; + m68k-*-uclinux*) fmt=elf ;; + m68k-*-gnu*) fmt=elf ;; + m68k-*-lynxos*) fmt=coff em=lynx ;; +@@ -4504,7 +4516,7 @@ + ppc-*-beos*) fmt=coff ;; + ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;; + ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;; +- ppc-*-linux-gnu*) fmt=elf em=linux ++ ppc-*-linux-uclibc* | ppc-*-linux-gnu*) fmt=elf em=linux + case "$endian" in + big) ;; + *) { { echo "$as_me:$LINENO: error: GNU/Linux must be configured big endian" >&5 +@@ -4531,7 +4543,9 @@ + ppc-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;; + + s390x-*-linux-gnu*) fmt=elf em=linux ;; ++ s390x-*-linux-uclibc*) fmt=elf em=linux ;; + s390-*-linux-gnu*) fmt=elf em=linux ;; ++ s390-*-linux-uclibc*) fmt=elf em=linux ;; + + sh*-*-linux*) fmt=elf em=linux + case ${cpu} in +@@ -4566,6 +4580,7 @@ + sparc-*-coff) fmt=coff ;; + sparc-*-linux*aout*) fmt=aout em=linux ;; + sparc-*-linux-gnu*) fmt=elf em=linux ;; ++ sparc-*-linux-uclibc*) fmt=elf em=linux ;; + sparc-*-lynxos*) fmt=coff em=lynx ;; + sparc-fujitsu-none) fmt=aout ;; + sparc-*-elf) fmt=elf ;; +--- binutils-2.15.94.0.1/gas/configure.in~binutils-2.15.91.0.1-uclibc-100-conf ++++ binutils-2.15.94.0.1/gas/configure.in +@@ -202,6 +202,7 @@ + alpha*-*-osf*) fmt=ecoff ;; + alpha*-*-linuxecoff*) fmt=ecoff ;; + alpha*-*-linux-gnu*) fmt=elf em=linux ;; ++ alpha*-*-linux-uclibc*) fmt=elf em=linux ;; + alpha*-*-netbsd*) fmt=elf em=nbsd ;; + alpha*-*-openbsd*) fmt=elf em=obsd ;; + +@@ -217,6 +218,7 @@ + arm*-*-conix*) fmt=elf ;; + arm-*-linux*aout*) fmt=aout em=linux ;; + arm*-*-linux-gnu*) fmt=elf em=linux ;; ++ arm*-*-linux-uclibc*) fmt=elf em=linux ;; + arm*-*-uclinux*) fmt=elf em=linux ;; + arm-*-netbsdelf*) fmt=elf em=nbsd ;; + arm-*-*n*bsd*) fmt=aout em=nbsd ;; +@@ -230,6 +232,7 @@ + + cris-*-linux-gnu* | crisv32-*-linux-gnu*) + fmt=multi bfd_gas=yes em=linux ;; ++ cris-*-linux-uclibc*) fmt=multi bfd_gas=yes em=linux ;; + cris-*-* | crisv32-*-*) fmt=multi bfd_gas=yes ;; + + crx-*-elf*) fmt=elf ;; +@@ -289,7 +292,9 @@ + i386-*-linux*oldld) fmt=aout em=linux ;; + i386-*-linux*coff*) fmt=coff em=linux ;; + i386-*-linux-gnu*) fmt=elf em=linux ;; ++ i386-*-linux-uclibc*) fmt=elf em=linux ;; + x86_64-*-linux-gnu*) fmt=elf em=linux ;; ++ x86_64-*-linux-uclibc*) fmt=elf em=linux ;; + i386-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;; + changequote(,)dnl + i386-*-sysv[45]*) fmt=elf ;; +@@ -342,6 +347,7 @@ + ia64-*-elf*) fmt=elf ;; + ia64-*-aix*) fmt=elf em=ia64aix ;; + ia64-*-linux-gnu*) fmt=elf em=linux ;; ++ ia64-*-linux-uclibc*) fmt=elf em=linux ;; + ia64-*-hpux*) fmt=elf em=hpux ;; + ia64-*-netbsd*) fmt=elf em=nbsd ;; + +@@ -369,6 +375,7 @@ + m68k-*-hpux*) fmt=hp300 em=hp300 ;; + m68k-*-linux*aout*) fmt=aout em=linux ;; + m68k-*-linux-gnu*) fmt=elf em=linux ;; ++ m68k-*-linux-uclibc*) fmt=elf em=linux ;; + m68k-*-uclinux*) fmt=elf ;; + m68k-*-gnu*) fmt=elf ;; + m68k-*-lynxos*) fmt=coff em=lynx ;; +@@ -440,7 +447,7 @@ + ppc-*-beos*) fmt=coff ;; + ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;; + ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;; +- ppc-*-linux-gnu*) fmt=elf em=linux ++ ppc-*-linux-uclibc* | ppc-*-linux-gnu*) fmt=elf em=linux + case "$endian" in + big) ;; + *) AC_MSG_ERROR(GNU/Linux must be configured big endian) ;; +@@ -460,7 +467,9 @@ + ppc-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;; + + s390x-*-linux-gnu*) fmt=elf em=linux ;; ++ s390x-*-linux-uclibc*) fmt=elf em=linux ;; + s390-*-linux-gnu*) fmt=elf em=linux ;; ++ s390-*-linux-uclibc*) fmt=elf em=linux ;; + + sh*-*-linux*) fmt=elf em=linux + case ${cpu} in +@@ -491,6 +500,7 @@ + sparc-*-coff) fmt=coff ;; + sparc-*-linux*aout*) fmt=aout em=linux ;; + sparc-*-linux-gnu*) fmt=elf em=linux ;; ++ sparc-*-linux-uclibc*) fmt=elf em=linux ;; + sparc-*-lynxos*) fmt=coff em=lynx ;; + sparc-fujitsu-none) fmt=aout ;; + sparc-*-elf) fmt=elf ;; +--- binutils-2.15.94.0.1/ld/configure~binutils-2.15.91.0.1-uclibc-100-conf ++++ binutils-2.15.94.0.1/ld/configure +@@ -1579,6 +1579,11 @@ + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd* | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' +--- binutils-2.15.94.0.1/ld/configure.tgt~binutils-2.15.91.0.1-uclibc-100-conf ++++ binutils-2.15.94.0.1/ld/configure.tgt +@@ -32,6 +32,7 @@ + targ_extra_libpath=$targ_extra_emuls ;; + cris-*-linux-gnu* | cris-*-linux-gnu*) + targ_emul=crislinux ;; ++cris-*-linux-uclibc*) targ_emul=crislinux ;; + cris-*-* | crisv32-*-*) targ_emul=criself + targ_extra_emuls="crisaout crislinux" + targ_extra_libpath=$targ_extra_emuls ;; +@@ -62,14 +63,16 @@ + tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'` + tdir_sun4=sparc-sun-sunos4 + ;; +-sparc64-*-linux-gnu*) targ_emul=elf64_sparc ++sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*) \ ++ targ_emul=elf64_sparc + targ_extra_emuls="elf32_sparc sparclinux sun4" + targ_extra_libpath=elf32_sparc + tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` + tdir_sparclinux=${tdir_elf32_sparc}aout + tdir_sun4=sparc-sun-sunos4 + ;; +-sparc*-*-linux-gnu*) targ_emul=elf32_sparc ++sparc*-*-linux-gnu* | sparc*-*-linux-uclibc*) \ ++ targ_emul=elf32_sparc + targ_extra_emuls="sparclinux elf64_sparc sun4" + targ_extra_libpath=elf64_sparc + tdir_sparclinux=${targ_alias}aout +@@ -132,7 +135,7 @@ + m68*-apple-aux*) targ_emul=m68kaux ;; + maxq-*-coff) targ_emul=maxqcoff;; + *-tandem-none) targ_emul=st2000 ;; +-i370-*-elf* | i370-*-linux-gnu*) targ_emul=elf32i370 ;; ++i370-*-elf* | i370-*-linux-gnu* | i370-*-linux-uclibc*) targ_emul=elf32i370 ;; + i[3-7]86-*-nto-qnx*) targ_emul=i386nto ;; + i[3-7]86-*-vsta) targ_emul=vsta ;; + i[3-7]86-go32-rtems*) targ_emul=i386go32 ;; +@@ -156,14 +159,16 @@ + tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'` + ;; + i[3-7]86-*-linux*oldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;; +-i[3-7]86-*-linux-gnu*) targ_emul=elf_i386 ++i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*) \ ++ targ_emul=elf_i386 + targ_extra_emuls=i386linux + if test x${want64} = xtrue; then + targ_extra_emuls="$targ_extra_emuls elf_x86_64" + fi + tdir_i386linux=${targ_alias}aout + ;; +-x86_64-*-linux-gnu*) targ_emul=elf_x86_64 ++x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*) \ ++ targ_emul=elf_x86_64 + targ_extra_emuls="elf_i386 i386linux" + targ_extra_libpath=elf_i386 + tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'` +@@ -263,11 +268,14 @@ + arm-*-kaos*) targ_emul=armelf ;; + arm9e-*-elf) targ_emul=armelf ;; + arm*b-*-linux-gnu*) targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;; ++arm*b-*-linux-uclibc*) targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;; + arm*-*-linux-gnueabi) targ_emul=armelf_linux_eabi ;; + arm*-*-linux-gnu*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;; ++arm*-*-linux-uclibc*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;; + arm*-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;; + arm*-*-conix*) targ_emul=armelf ;; +-thumb-*-linux-gnu* | thumb-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;; ++thumb-*-linux-gnu* | thumb-*-linux-uclibc* | thumb-*-uclinux*) ++ targ_emul=armelf_linux; targ_extra_emuls=armelf ;; + strongarm-*-coff) targ_emul=armcoff ;; + strongarm-*-elf) targ_emul=armelf ;; + strongarm-*-kaos*) targ_emul=armelf ;; +@@ -371,7 +379,8 @@ + targ_extra_emuls=m68kelf + tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'` + ;; +-m68k-*-linux-gnu*) targ_emul=m68kelf ++m68k-*-linux-gnu* | m68k-*-linux-uclibc*) \ ++ targ_emul=m68kelf + targ_extra_emuls=m68klinux + tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'` + ;; +@@ -388,9 +397,9 @@ + m68*-*-psos*) targ_emul=m68kpsos ;; + m68*-*-rtemscoff*) targ_emul=m68kcoff ;; + m68*-*-rtems*) targ_emul=m68kelf ;; +-hppa*64*-*-linux-gnu*) targ_emul=hppa64linux ;; ++hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*) targ_emul=hppa64linux ;; + hppa*64*-*) targ_emul=elf64hppa ;; +-hppa*-*-linux-gnu*) targ_emul=hppalinux ;; ++hppa*-*-linux-gnu* | hppa*-*-linux-uclibc*) targ_emul=hppalinux ;; + hppa*-*-*elf*) targ_emul=hppaelf ;; + hppa*-*-lites*) targ_emul=hppaelf ;; + hppa*-*-netbsd*) targ_emul=hppanbsd ;; +@@ -436,16 +445,20 @@ + mips*-*-vxworks*) targ_emul=elf32ebmip + targ_extra_emuls="elf32elmip" ;; + mips*-*-windiss) targ_emul=elf32mipswindiss ;; +-mips64*el-*-linux-gnu*) targ_emul=elf32ltsmipn32 ++mips64*el-*-linux-gnu* | mips64*el-*-linux-uclibc*) ++ targ_emul=elf32ltsmipn32 + targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" + ;; +-mips64*-*-linux-gnu*) targ_emul=elf32btsmipn32 ++mips64*-*-linux-gnu* | mips64*-*-linux-uclibc*) ++ targ_emul=elf32btsmipn32 + targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" + ;; +-mips*el-*-linux-gnu*) targ_emul=elf32ltsmip ++mips*el-*-linux-gnu* | mips*el-*-linux-uclibc*) ++ targ_emul=elf32ltsmip + targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" + ;; +-mips*-*-linux-gnu*) targ_emul=elf32btsmip ++mips*-*-linux-gnu* | mips*-*-linux-uclibc*) ++ targ_emul=elf32btsmip + targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" + ;; + mips*-*-lnews*) targ_emul=mipslnews ;; +@@ -468,6 +481,10 @@ + alpha*-*-linux-gnu*) targ_emul=elf64alpha targ_extra_emuls=alpha + tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'` + ;; ++alpha*-*-linux-uclibc*) targ_emul=elf64alpha targ_extra_emuls=alpha ++ # The following needs to be checked... ++ tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'` ++ ;; + alpha*-*-osf*) targ_emul=alpha ;; + alpha*-*-gnu*) targ_emul=elf64alpha ;; + alpha*-*-netware*) targ_emul=alpha ;; +--- binutils-2.15.94.0.1/configure~binutils-2.15.91.0.1-uclibc-100-conf ++++ binutils-2.15.94.0.1/configure +@@ -1341,6 +1341,18 @@ + i[3456789]86-*-coff | i[3456789]86-*-elf) + noconfigdirs="$noconfigdirs ${libgcj}" + ;; ++ i[3456789]86-*-linux-uclibc) ++ # This section makes it possible to build newlib natively on linux. ++ # If we are using a cross compiler then don't configure newlib. ++ if test x${is_cross_compiler} != xno ; then ++ noconfigdirs="$noconfigdirs target-newlib" ++ fi ++ noconfigdirs="$noconfigdirs target-libgloss" ++ # If we are not using a cross compiler, do configure newlib. ++ # Note however, that newlib will only be configured in this situation ++ # if the --with-newlib option has been given, because otherwise ++ # 'target-newlib' will appear in skipdirs. ++ ;; + i[3456789]86-*-linux*) + # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's + # not build java stuff by default. +--- binutils-2.15.94.0.1/configure.in~binutils-2.15.91.0.1-uclibc-100-conf ++++ binutils-2.15.94.0.1/configure.in +@@ -563,6 +563,19 @@ + i[[3456789]]86-*-coff | i[[3456789]]86-*-elf) + noconfigdirs="$noconfigdirs ${libgcj}" + ;; ++ i[3456789]86-*-linux-uclibc) ++ # This section makes it possible to build newlib natively on linux. ++ # If we are using a cross compiler then don't configure newlib. ++ if test x${is_cross_compiler} != xno ; then ++ noconfigdirs="$noconfigdirs target-newlib" ++ fi ++ noconfigdirs="$noconfigdirs target-libgloss" ++ build_modules= ++ # If we are not using a cross compiler, do configure newlib. ++ # Note however, that newlib will only be configured in this situation ++ # if the --with-newlib option has been given, because otherwise ++ # 'target-newlib' will appear in skipdirs. ++ ;; + i[[3456789]]86-*-linux*) + # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's + # not build java stuff by default. +--- binutils-2.15.94.0.1/libtool.m4~binutils-2.15.91.0.1-uclibc-100-conf ++++ binutils-2.15.94.0.1/libtool.m4 +@@ -645,6 +645,11 @@ + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd* | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'] +--- binutils-2.15.94.0.1/ltconfig~binutils-2.15.91.0.1-uclibc-100-conf ++++ binutils-2.15.94.0.1/ltconfig +@@ -603,6 +603,7 @@ + # Transform linux* to *-*-linux-gnu*, to support old configure scripts. + case $host_os in + linux-gnu*) ;; ++linux-uclibc*) ;; + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` + esac + +@@ -1270,6 +1271,24 @@ + dynamic_linker='GNU/Linux ld.so' + ;; + ++linux-uclibc*) ++ version_type=linux ++ need_lib_prefix=no ++ need_version=no ++ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ++ soname_spec='${libname}${release}.so$major' ++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' ++ shlibpath_var=LD_LIBRARY_PATH ++ shlibpath_overrides_runpath=no ++ # This implies no fast_install, which is unacceptable. ++ # Some rework will be needed to allow for fast_install ++ # before this can be enabled. ++ # Note: copied from linux-gnu, and may not be appropriate. ++ hardcode_into_libs=yes ++ # Assume using the uClibc dynamic linker. ++ dynamic_linker="uClibc ld.so" ++ ;; ++ + netbsd*) + need_lib_prefix=no + need_version=no diff --git a/openembedded/packages/binutils/binutils-cross.inc b/openembedded/packages/binutils/binutils-cross.inc new file mode 100644 index 0000000000..c63ea687aa --- /dev/null +++ b/openembedded/packages/binutils/binutils-cross.inc @@ -0,0 +1,30 @@ +SECTION = "devel" +inherit cross +DEPENDS += "flex-native bison-native" +PROVIDES = "virtual/${TARGET_PREFIX}binutils" +PACKAGES = "" +EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \ + --program-prefix=${TARGET_PREFIX}" + +do_stage () { + oe_runmake install + + # We don't really need these, so we'll remove them... + rm -rf ${CROSS_DIR}/lib/ldscripts + rm -rf ${CROSS_DIR}/share/info + rm -rf ${CROSS_DIR}/share/locale + rm -rf ${CROSS_DIR}/share/man + rmdir ${CROSS_DIR}/share || : + rmdir ${CROSS_DIR}/${libdir}/gcc-lib || : + rmdir ${CROSS_DIR}/${libdir} || : + rmdir ${CROSS_DIR}/${prefix} || : + + # We want to move this into the target specific location + mkdir -p ${CROSS_DIR}/${TARGET_SYS}/lib + mv -f ${CROSS_DIR}/lib/libiberty.a ${CROSS_DIR}/${TARGET_SYS}/lib + rmdir ${CROSS_DIR}/lib || : +} + +do_install () { + : +} diff --git a/openembedded/packages/binutils/binutils-cross_2.15.94.0.1.bb b/openembedded/packages/binutils/binutils-cross_2.15.94.0.1.bb new file mode 100644 index 0000000000..7e165271d7 --- /dev/null +++ b/openembedded/packages/binutils/binutils-cross_2.15.94.0.1.bb @@ -0,0 +1,32 @@ +SECTION = "devel" +include binutils_${PV}.bb +inherit cross +DEPENDS += "flex-native bison-native" +PROVIDES = "virtual/${TARGET_PREFIX}binutils" +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}" +PACKAGES = "" +EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \ + --program-prefix=${TARGET_PREFIX}" + +do_stage () { + oe_runmake install + + # We don't really need these, so we'll remove them... + rm -rf ${CROSS_DIR}/lib/ldscripts + rm -rf ${CROSS_DIR}/share/info + rm -rf ${CROSS_DIR}/share/locale + rm -rf ${CROSS_DIR}/share/man + rmdir ${CROSS_DIR}/share || : + rmdir ${CROSS_DIR}/${libdir}/gcc-lib || : + rmdir ${CROSS_DIR}/${libdir} || : + rmdir ${CROSS_DIR}/${prefix} || : + + # We want to move this into the target specific location + mkdir -p ${CROSS_DIR}/${TARGET_SYS}/lib + mv -f ${CROSS_DIR}/lib/libiberty.a ${CROSS_DIR}/${TARGET_SYS}/lib + rmdir ${CROSS_DIR}/lib || : +} + +do_install () { + : +} diff --git a/openembedded/packages/binutils/binutils-cross_cvs.bb b/openembedded/packages/binutils/binutils-cross_cvs.bb new file mode 100644 index 0000000000..0e338b52a7 --- /dev/null +++ b/openembedded/packages/binutils/binutils-cross_cvs.bb @@ -0,0 +1,32 @@ +SECTION = "devel" +include binutils_cvs.bb +inherit cross +DEPENDS += "flex-native bison-native" +PROVIDES = "virtual/${TARGET_PREFIX}binutils" +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs" +PACKAGES = "" +EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \ + --program-prefix=${TARGET_PREFIX}" + +do_stage () { + oe_runmake install + + # We don't really need these, so we'll remove them... + rm -rf ${CROSS_DIR}/lib/ldscripts + rm -rf ${CROSS_DIR}/share/info + rm -rf ${CROSS_DIR}/share/locale + rm -rf ${CROSS_DIR}/share/man + rmdir ${CROSS_DIR}/share || : + rmdir ${CROSS_DIR}/${libdir}/gcc-lib || : + rmdir ${CROSS_DIR}/${libdir} || : + rmdir ${CROSS_DIR}/${prefix} || : + + # We want to move this into the target specific location + mkdir -p ${CROSS_DIR}/${TARGET_SYS}/lib + mv -f ${CROSS_DIR}/lib/libiberty.a ${CROSS_DIR}/${TARGET_SYS}/lib + rmdir ${CROSS_DIR}/lib || : +} + +do_install () { + : +} diff --git a/openembedded/packages/binutils/binutils.inc b/openembedded/packages/binutils/binutils.inc new file mode 100644 index 0000000000..e544e9ef53 --- /dev/null +++ b/openembedded/packages/binutils/binutils.inc @@ -0,0 +1,117 @@ +inherit autotools gettext + +PACKAGES = "${PN} ${PN}-dev ${PN}-doc ${PN}-symlinks" + +FILES_${PN} = " \ + ${bindir}/${TARGET_PREFIX}* \ + ${libdir}/lib*-*.so \ + ${prefix}/${TARGET_SYS}/bin/*" + +FILES_${PN}-dev = " \ + ${includedir} \ + ${libdir}/*.a \ + ${libdir}/*.la \ + ${libdir}/libbfd.so \ + ${libdir}/libopcodes.so" + +FILES_${PN}-symlinks = " \ + ${bindir}/addr2line \ + ${bindir}/as \ + ${bindir}/c++filt \ + ${bindir}/gprof \ + ${bindir}/ld \ + ${bindir}/nm \ + ${bindir}/objcopy \ + ${bindir}/objdump \ + ${bindir}/ranlib \ + ${bindir}/readelf \ + ${bindir}/size \ + ${bindir}/strip" + +EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \ + --enable-shared" + +# This is necessary due to a bug in the binutils Makefiles +EXTRA_OEMAKE = "configure-build-libiberty all" + +export AR = "${HOST_PREFIX}ar" +export AS = "${HOST_PREFIX}as" +export LD = "${HOST_PREFIX}ld" +export NM = "${HOST_PREFIX}nm" +export RANLIB = "${HOST_PREFIX}ranlib" +export OBJCOPY = "${HOST_PREFIX}objcopy" +export OBJDUMP = "${HOST_PREFIX}objdump" + +export AR_FOR_TARGET = "${TARGET_PREFIX}ar" +export AS_FOR_TARGET = "${TARGET_PREFIX}as" +export LD_FOR_TARGET = "${TARGET_PREFIX}ld" +export NM_FOR_TARGET = "${TARGET_PREFIX}nm" +export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib" + +export CC_FOR_HOST = "${CCACHE} ${HOST_PREFIX}gcc" +export CXX_FOR_HOST = "${CCACHE} ${HOST_PREFIX}gcc" + +export CC_FOR_BUILD = "${BUILD_CC}" +export CPP_FOR_BUILD = "${BUILD_CPP}" +export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}" + +export CC = "${CCACHE} ${HOST_PREFIX}gcc" + +do_configure () { + (cd ${S}; gnu-configize) || die "Failed to run gnu-configize" + oe_runconf +} + +do_stage () { + oe_libinstall -so -a -C opcodes libopcodes ${STAGING_LIBDIR}/ + oe_libinstall -a -C libiberty libiberty ${STAGING_LIBDIR}/ + oe_libinstall -so -a -C bfd libbfd ${STAGING_LIBDIR}/ + install -m 0644 ${S}/include/dis-asm.h ${STAGING_INCDIR}/ + install -m 0644 ${S}/include/symcat.h ${STAGING_INCDIR}/ + install -m 0644 ${S}/include/libiberty.h ${STAGING_INCDIR}/ + install -m 0644 ${S}/include/ansidecl.h ${STAGING_INCDIR}/ + install -m 0644 ${S}/include/bfdlink.h ${STAGING_INCDIR}/ + install -m 0644 bfd/bfd.h ${STAGING_INCDIR}/ +} + +do_install () { + autotools_do_install + + # We don't really need these, so we'll remove them... + rm -rf ${D}${libdir}/ldscripts + + # Fix the /usr/${TARGET_SYS}/bin/* links + for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do + rm -f $l + ln -sf `echo ${prefix}/${TARGET_SYS}/bin \ + | tr -s / \ + | sed -e 's,^/,,' -e 's,[^/]*,..,g'`${bindir}/${TARGET_PREFIX}`basename $l` $l + done + + # Install the libiberty header + install -d ${D}${includedir} + install -m 644 ${S}/include/ansidecl.h ${D}${includedir} + install -m 644 ${S}/include/libiberty.h ${D}${includedir} + + cd ${D}${bindir} + + # Symlinks for ease of running these on the native target + for p in ${TARGET_SYS}-* ; do + ln -sf $p `echo $p | sed -e s,${TARGET_SYS}-,,` + done + + rm ${D}${bindir}/ar ${D}${bindir}/strings +} + + +pkg_postinst_${PN}-symlinks () { + update-alternatives --install ${bindir}/ar ar ${TARGET_SYS}-ar 100 + update-alternatives --install ${bindir}/strings strings ${TARGET_SYS}-strings 100 +} + + +pkg_prerm_${PN}-symlinks () { + update-alternatives --remove ar ${TARGET_SYS}-ar + update-alternatives --remove strings ${TARGET_SYS}-strings +} + diff --git a/openembedded/packages/binutils/binutils_2.15.94.0.1.bb b/openembedded/packages/binutils/binutils_2.15.94.0.1.bb new file mode 100644 index 0000000000..5edf4548a3 --- /dev/null +++ b/openembedded/packages/binutils/binutils_2.15.94.0.1.bb @@ -0,0 +1,123 @@ +DESCRIPTION = "A GNU collection of binary utilities" +HOMEPAGE = "http://www.gnu.org/software/binutils/" +SECTION = "devel" +LICENSE = "GPL" +MAINTAINER = "Gerald Britton " +PR = "r1" + +inherit autotools gettext + +PACKAGES = "${PN} ${PN}-dev ${PN}-doc ${PN}-symlinks" + +FILES_${PN} = " \ + ${bindir}/${TARGET_PREFIX}* \ + ${libdir}/lib*-*.so \ + ${prefix}/${TARGET_SYS}/bin/*" + +FILES_${PN}-dev = " \ + ${includedir} \ + ${libdir}/*.a \ + ${libdir}/*.la \ + ${libdir}/libbfd.so \ + ${libdir}/libopcodes.so" + +FILES_${PN}-symlinks = " \ + ${bindir}/addr2line \ + ${bindir}/ar \ + ${bindir}/as \ + ${bindir}/c++filt \ + ${bindir}/gprof \ + ${bindir}/ld \ + ${bindir}/nm \ + ${bindir}/objcopy \ + ${bindir}/objdump \ + ${bindir}/ranlib \ + ${bindir}/readelf \ + ${bindir}/size \ + ${bindir}/strings \ + ${bindir}/strip" + +SRC_URI = \ + "http://ftp.kernel.org/pub/linux/devel/binutils/binutils-${PV}.tar.bz2 \ + file://ld_makefile.patch;patch=1 \ + file://better_file_error.patch;patch=1 \ + file://signed_char_fix.patch;patch=1 \ + file://binutils-100_cflags_for_build.patch;patch=1 \ + file://binutils-2.15.91.0.1-uclibc-100-conf.patch;patch=1 \ + file://binutils-2.15.90.0.3-uclibc-200-build_modules.patch;patch=1" + +S = "${WORKDIR}/binutils-${PV}" +B = "${S}/build.${HOST_SYS}.${TARGET_SYS}" + +EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \ + --enable-shared" + +# This is necessary due to a bug in the binutils Makefiles +EXTRA_OEMAKE = "configure-build-libiberty all" + +export AR = "${HOST_PREFIX}ar" +export AS = "${HOST_PREFIX}as" +export LD = "${HOST_PREFIX}ld" +export NM = "${HOST_PREFIX}nm" +export RANLIB = "${HOST_PREFIX}ranlib" +export OBJCOPY = "${HOST_PREFIX}objcopy" +export OBJDUMP = "${HOST_PREFIX}objdump" + +export AR_FOR_TARGET = "${TARGET_PREFIX}ar" +export AS_FOR_TARGET = "${TARGET_PREFIX}as" +export LD_FOR_TARGET = "${TARGET_PREFIX}ld" +export NM_FOR_TARGET = "${TARGET_PREFIX}nm" +export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib" + +export CC_FOR_HOST = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}" +export CXX_FOR_HOST = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}" + +export CC_FOR_BUILD = "${BUILD_CC}" +export CPP_FOR_BUILD = "${BUILD_CPP}" +export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}" + +export CC = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}" + +do_configure () { + (cd ${S}; gnu-configize) || die "Failed to run gnu-configize" + oe_runconf +} + +do_stage () { + oe_libinstall -so -a -C opcodes libopcodes ${STAGING_LIBDIR}/ + oe_libinstall -a -C libiberty libiberty ${STAGING_LIBDIR}/ + oe_libinstall -so -a -C bfd libbfd ${STAGING_LIBDIR}/ + install -m 0644 ${S}/include/dis-asm.h ${STAGING_INCDIR}/ + install -m 0644 ${S}/include/symcat.h ${STAGING_INCDIR}/ + install -m 0644 ${S}/include/libiberty.h ${STAGING_INCDIR}/ + install -m 0644 ${S}/include/ansidecl.h ${STAGING_INCDIR}/ + install -m 0644 ${S}/include/bfdlink.h ${STAGING_INCDIR}/ + install -m 0644 bfd/bfd.h ${STAGING_INCDIR}/ +} + +do_install () { + autotools_do_install + + # We don't really need these, so we'll remove them... + rm -rf ${D}${libdir}/ldscripts + + # Fix the /usr/${TARGET_SYS}/bin/* links + for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do + rm -f $l + ln -sf `echo ${prefix}/${TARGET_SYS}/bin \ + | tr -s / \ + | sed -e 's,^/,,' -e 's,[^/]*,..,g'`${bindir}/${TARGET_PREFIX}`basename $l` $l + done + + # Install the libiberty header + install -d ${D}${includedir} + install -m 644 ${S}/include/ansidecl.h ${D}${includedir} + install -m 644 ${S}/include/libiberty.h ${D}${includedir} + + cd ${D}${bindir} + + # Symlinks for ease of running these on the native target + for p in ${TARGET_SYS}-* ; do + ln -sf $p `echo $p | sed -e s,${TARGET_SYS}-,,` + done +} diff --git a/openembedded/packages/binutils/binutils_cvs.bb b/openembedded/packages/binutils/binutils_cvs.bb new file mode 100644 index 0000000000..f295795554 --- /dev/null +++ b/openembedded/packages/binutils/binutils_cvs.bb @@ -0,0 +1,122 @@ +SECTION = "devel" +inherit autotools gettext + +DESCRIPTION = "A GNU collection of binary utilities" +HOMEPAGE = "http://www.gnu.org/software/binutils/" +LICENSE = "GPL" +MAINTAINER = "Gerald Britton " +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs" +PV = "0.0cvs${CVSDATE}" +PR = "r2" + +PACKAGES = "${PN} ${PN}-dev ${PN}-doc ${PN}-symlinks" + +FILES_${PN} = " \ + ${bindir}/${TARGET_PREFIX}* \ + ${libdir}/lib*-*.so \ + ${prefix}/${TARGET_SYS}/bin/*" + +FILES_${PN}-dev = " \ + ${includedir} \ + ${libdir}/*.a \ + ${libdir}/*.la \ + ${libdir}/libbfd.so \ + ${libdir}/libopcodes.so" + +FILES_${PN}-symlinks = " \ + ${bindir}/addr2line \ + ${bindir}/ar \ + ${bindir}/as \ + ${bindir}/c++filt \ + ${bindir}/gprof \ + ${bindir}/ld \ + ${bindir}/nm \ + ${bindir}/objcopy \ + ${bindir}/objdump \ + ${bindir}/ranlib \ + ${bindir}/readelf \ + ${bindir}/size \ + ${bindir}/strings \ + ${bindir}/strip" + +SRC_URI = "cvs://anoncvs:anoncvs@sources.redhat.com/cvs/src;module=binutils;method=pserver;localdir=src \ + file://ld_makefile.patch;patch=1 \ + file://better_file_error.patch;patch=1 \ + file://signed_char_fix.patch;patch=1 \ + file://binutils-100_cflags_for_build.patch;patch=1 \ + file://binutils-2.15.91.0.1-uclibc-100-conf.patch;patch=1 \ + file://binutils-2.15.90.0.3-uclibc-200-build_modules.patch;patch=1" + +S = "${WORKDIR}/src" +B = "${S}/build.${HOST_SYS}.${TARGET_SYS}" + +EXTRA_OECONF = "--with-sysroot=${prefix} \ + --program-prefix=${TARGET_PREFIX} \ + --enable-shared" + +# This is necessary due to a bug in the binutils Makefiles +EXTRA_OEMAKE = "configure-build-libiberty all" + +export AR = "${HOST_PREFIX}ar" +export AS = "${HOST_PREFIX}as" +export LD = "${HOST_PREFIX}ld" +export NM = "${HOST_PREFIX}nm" +export RANLIB = "${HOST_PREFIX}ranlib" +export OBJCOPY = "${HOST_PREFIX}objcopy" +export OBJDUMP = "${HOST_PREFIX}objdump" + +export AR_FOR_TARGET = "${TARGET_PREFIX}ar" +export AS_FOR_TARGET = "${TARGET_PREFIX}as" +export LD_FOR_TARGET = "${TARGET_PREFIX}ld" +export NM_FOR_TARGET = "${TARGET_PREFIX}nm" +export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib" + +export CC_FOR_HOST = "${CCACHE} ${HOST_PREFIX}gcc" +export CXX_FOR_HOST = "${CCACHE} ${HOST_PREFIX}gcc" + +export CC_FOR_BUILD = "${BUILD_CC}" + +export CC = "${CCACHE} ${HOST_PREFIX}gcc" + +do_configure () { + (cd ${S}; gnu-configize) || die "Failed to run gnu-configize" + oe_runconf +} + +do_stage () { + oe_libinstall -so -a -C opcodes libopcodes ${STAGING_LIBDIR}/ + oe_libinstall -a -C libiberty libiberty ${STAGING_LIBDIR}/ + oe_libinstall -so -a -C bfd libbfd ${STAGING_LIBDIR}/ + install -m 0644 ${S}/include/dis-asm.h ${STAGING_INCDIR}/ + install -m 0644 ${S}/include/symcat.h ${STAGING_INCDIR}/ + install -m 0644 ${S}/include/libiberty.h ${STAGING_INCDIR}/ + install -m 0644 ${S}/include/ansidecl.h ${STAGING_INCDIR}/ + install -m 0644 ${S}/include/bfdlink.h ${STAGING_INCDIR}/ + install -m 0644 bfd/bfd.h ${STAGING_INCDIR}/ +} + +do_install () { + autotools_do_install + + # We don't really need these, so we'll remove them... + rm -rf ${D}${libdir}/ldscripts + + # Fix the /usr/${TARGET_SYS}/bin/* links + for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do + rm -f $l + ln -sf `echo ${prefix}/${TARGET_SYS}/bin \ + | tr -s / \ + | sed -e 's,^/,,' -e 's,[^/]*,..,g'`${bindir}/${TARGET_PREFIX}`basename $l` $l + done + + # Install the libiberty header + install -m 644 ${S}/include/ansidecl.h ${D}${includedir} + install -m 644 ${S}/include/libiberty.h ${D}${includedir} + + cd ${D}${bindir} + + # Symlinks for ease of running these on the native target + for p in ${TARGET_SYS}-* ; do + ln -sf $p `echo $p | sed -e s,${TARGET_SYS}-,,` + done +} diff --git a/openembedded/packages/binutils/files/better_file_error.patch b/openembedded/packages/binutils/files/better_file_error.patch new file mode 100644 index 0000000000..38ef52966e --- /dev/null +++ b/openembedded/packages/binutils/files/better_file_error.patch @@ -0,0 +1,17 @@ +diff -urN binutils-2.11.92.0.5/bfd/opncls.c binutils-2.11.92.0.5.new/bfd/opncls.c +--- binutils-2.11.92.0.5/bfd/opncls.c Mon Oct 1 18:25:21 2001 ++++ binutils-2.11.92.0.5.new/bfd/opncls.c Sat Oct 13 11:26:59 2001 +@@ -127,6 +127,13 @@ + { + bfd *nbfd; + const bfd_target *target_vec; ++ struct stat s; ++ ++ if (stat (filename, &s) == 0) ++ if (S_ISDIR(s.st_mode)) { ++ bfd_set_error (bfd_error_file_not_recognized); ++ return NULL; ++ } + + nbfd = _bfd_new_bfd (); + if (nbfd == NULL) diff --git a/openembedded/packages/binutils/files/ld_makefile.patch b/openembedded/packages/binutils/files/ld_makefile.patch new file mode 100644 index 0000000000..c1d2ac1ece --- /dev/null +++ b/openembedded/packages/binutils/files/ld_makefile.patch @@ -0,0 +1,22 @@ +--- binutils-2.11.90.0.19.orig/ld/Makefile.am ++++ binutils-2.11.90.0.19/ld/Makefile.am +@@ -19,7 +19,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +--- binutils-2.11.90.0.19.orig/ld/Makefile.in ++++ binutils-2.11.90.0.19/ld/Makefile.in +@@ -123,7 +123,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ diff --git a/openembedded/packages/binutils/files/plt32trunc.patch b/openembedded/packages/binutils/files/plt32trunc.patch new file mode 100644 index 0000000000..4990f5dbb6 --- /dev/null +++ b/openembedded/packages/binutils/files/plt32trunc.patch @@ -0,0 +1,24 @@ +--- binutils/bfd/elf32-arm.h.orig 2004-04-22 22:11:15.000000000 -0400 ++++ binutils/bfd/elf32-arm.h 2004-04-22 22:28:37.000000000 -0400 +@@ -2229,6 +2229,8 @@ elf32_arm_relocate_section (output_bfd, + case R_ARM_PC24: + case R_ARM_ABS32: + case R_ARM_THM_PC22: ++ case R_ARM_PLT32: ++ + if (info->shared + && ( + (!info->symbolic && h->dynindx != -1) +@@ -2262,11 +2264,6 @@ elf32_arm_relocate_section (output_bfd, + relocation = 0; + break; + +- case R_ARM_PLT32: +- if (h->plt.offset != (bfd_vma)-1) +- relocation = 0; +- break; +- + default: + if (unresolved_reloc) + _bfd_error_handler + diff --git a/openembedded/packages/binutils/files/signed_char_fix.patch b/openembedded/packages/binutils/files/signed_char_fix.patch new file mode 100644 index 0000000000..b3709dabed --- /dev/null +++ b/openembedded/packages/binutils/files/signed_char_fix.patch @@ -0,0 +1,12 @@ +diff -urN binutils-2.11.92.0.12.3/opcodes/i386-dis.c binutils-2.11.92.0.12.3.new/opcodes/i386-dis.c +--- binutils-2.11.92.0.12.3/opcodes/i386-dis.c Fri Nov 16 17:05:55 2001 ++++ binutils-2.11.92.0.12.3.new/opcodes/i386-dis.c Mon Dec 31 15:55:04 2001 +@@ -1830,7 +1830,7 @@ + * The function returns the length of this instruction in bytes. + */ + +-static char intel_syntax; ++static signed char intel_syntax; + static char open_char; + static char close_char; + static char separator_char; diff --git a/openembedded/packages/bison/bison-2.0/m4.patch b/openembedded/packages/bison/bison-2.0/m4.patch new file mode 100644 index 0000000000..b62fe89d04 --- /dev/null +++ b/openembedded/packages/bison/bison-2.0/m4.patch @@ -0,0 +1,589 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- /dev/null ++++ bison-1.875/m4/inttypes-pri.m4 +@@ -0,0 +1,32 @@ ++# inttypes-pri.m4 serial 1 (gettext-0.11.4) ++dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. ++dnl This file is free software, distributed under the terms of the GNU ++dnl General Public License. As a special exception to the GNU General ++dnl Public License, this file may be distributed as part of a program ++dnl that contains a configuration script generated by Autoconf, under ++dnl the same distribution terms as the rest of that program. ++ ++dnl From Bruno Haible. ++ ++# Define PRI_MACROS_BROKEN if exists and defines the PRI* ++# macros to non-string values. This is the case on AIX 4.3.3. ++ ++AC_DEFUN([gt_INTTYPES_PRI], ++[ ++ AC_REQUIRE([gt_HEADER_INTTYPES_H]) ++ if test $gt_cv_header_inttypes_h = yes; then ++ AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], ++ gt_cv_inttypes_pri_broken, ++ [ ++ AC_TRY_COMPILE([#include ++#ifdef PRId32 ++char *p = PRId32; ++#endif ++], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) ++ ]) ++ fi ++ if test "$gt_cv_inttypes_pri_broken" = yes; then ++ AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, ++ [Define if exists and defines unusable PRI* macros.]) ++ fi ++]) +--- /dev/null ++++ bison-1.875/m4/lcmessage.m4 +@@ -0,0 +1,32 @@ ++# lcmessage.m4 serial 3 (gettext-0.11.3) ++dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. ++dnl This file is free software, distributed under the terms of the GNU ++dnl General Public License. As a special exception to the GNU General ++dnl Public License, this file may be distributed as part of a program ++dnl that contains a configuration script generated by Autoconf, under ++dnl the same distribution terms as the rest of that program. ++dnl ++dnl This file can can be used in projects which are not available under ++dnl the GNU General Public License or the GNU Library General Public ++dnl License but which still want to provide support for the GNU gettext ++dnl functionality. ++dnl Please note that the actual code of the GNU gettext library is covered ++dnl by the GNU Library General Public License, and the rest of the GNU ++dnl gettext package package is covered by the GNU General Public License. ++dnl They are *not* in the public domain. ++ ++dnl Authors: ++dnl Ulrich Drepper , 1995. ++ ++# Check whether LC_MESSAGES is available in . ++ ++AC_DEFUN([AM_LC_MESSAGES], ++[ ++ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, ++ [AC_TRY_LINK([#include ], [return LC_MESSAGES], ++ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) ++ if test $am_cv_val_LC_MESSAGES = yes; then ++ AC_DEFINE(HAVE_LC_MESSAGES, 1, ++ [Define if your file defines LC_MESSAGES.]) ++ fi ++]) +--- /dev/null ++++ bison-1.875/m4/uintmax_t.m4 +@@ -0,0 +1,29 @@ ++# uintmax_t.m4 serial 6 (gettext-0.11) ++dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. ++dnl This file is free software, distributed under the terms of the GNU ++dnl General Public License. As a special exception to the GNU General ++dnl Public License, this file may be distributed as part of a program ++dnl that contains a configuration script generated by Autoconf, under ++dnl the same distribution terms as the rest of that program. ++ ++dnl From Paul Eggert. ++ ++AC_PREREQ(2.13) ++ ++# Define uintmax_t to `unsigned long' or `unsigned long long' ++# if does not exist. ++ ++AC_DEFUN([jm_AC_TYPE_UINTMAX_T], ++[ ++ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) ++ AC_REQUIRE([jm_AC_HEADER_STDINT_H]) ++ if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then ++ AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) ++ test $ac_cv_type_unsigned_long_long = yes \ ++ && ac_type='unsigned long long' \ ++ || ac_type='unsigned long' ++ AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, ++ [Define to unsigned long or unsigned long long ++ if and don't define.]) ++ fi ++]) +--- /dev/null ++++ bison-1.875/m4/glibc21.m4 +@@ -0,0 +1,32 @@ ++# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40) ++dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. ++dnl This file is free software, distributed under the terms of the GNU ++dnl General Public License. As a special exception to the GNU General ++dnl Public License, this file may be distributed as part of a program ++dnl that contains a configuration script generated by Autoconf, under ++dnl the same distribution terms as the rest of that program. ++ ++# Test for the GNU C Library, version 2.1 or newer. ++# From Bruno Haible. ++ ++AC_DEFUN([jm_GLIBC21], ++ [ ++ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, ++ ac_cv_gnu_library_2_1, ++ [AC_EGREP_CPP([Lucky GNU user], ++ [ ++#include ++#ifdef __GNU_LIBRARY__ ++ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) ++ Lucky GNU user ++ #endif ++#endif ++ ], ++ ac_cv_gnu_library_2_1=yes, ++ ac_cv_gnu_library_2_1=no) ++ ] ++ ) ++ AC_SUBST(GLIBC21) ++ GLIBC21="$ac_cv_gnu_library_2_1" ++ ] ++) +--- /dev/null ++++ bison-1.875/m4/stdint_h.m4 +@@ -0,0 +1,28 @@ ++# stdint_h.m4 serial 2 (gettext-0.11.4) ++dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. ++dnl This file is free software, distributed under the terms of the GNU ++dnl General Public License. As a special exception to the GNU General ++dnl Public License, this file may be distributed as part of a program ++dnl that contains a configuration script generated by Autoconf, under ++dnl the same distribution terms as the rest of that program. ++ ++dnl From Paul Eggert. ++ ++# Define HAVE_STDINT_H_WITH_UINTMAX if exists, ++# doesn't clash with , and declares uintmax_t. ++ ++AC_DEFUN([jm_AC_HEADER_STDINT_H], ++[ ++ AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h, ++ [AC_TRY_COMPILE( ++ [#include ++#include ], ++ [uintmax_t i = (uintmax_t) -1;], ++ jm_ac_cv_header_stdint_h=yes, ++ jm_ac_cv_header_stdint_h=no)]) ++ if test $jm_ac_cv_header_stdint_h = yes; then ++ AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, ++[Define if exists, doesn't clash with , ++ and declares uintmax_t. ]) ++ fi ++]) +--- /dev/null ++++ bison-1.875/m4/inttypes_h.m4 +@@ -0,0 +1,28 @@ ++# inttypes_h.m4 serial 4 (gettext-0.11.4) ++dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. ++dnl This file is free software, distributed under the terms of the GNU ++dnl General Public License. As a special exception to the GNU General ++dnl Public License, this file may be distributed as part of a program ++dnl that contains a configuration script generated by Autoconf, under ++dnl the same distribution terms as the rest of that program. ++ ++dnl From Paul Eggert. ++ ++# Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, ++# doesn't clash with , and declares uintmax_t. ++ ++AC_DEFUN([jm_AC_HEADER_INTTYPES_H], ++[ ++ AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h, ++ [AC_TRY_COMPILE( ++ [#include ++#include ], ++ [uintmax_t i = (uintmax_t) -1;], ++ jm_ac_cv_header_inttypes_h=yes, ++ jm_ac_cv_header_inttypes_h=no)]) ++ if test $jm_ac_cv_header_inttypes_h = yes; then ++ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, ++[Define if exists, doesn't clash with , ++ and declares uintmax_t. ]) ++ fi ++]) +--- /dev/null ++++ bison-1.875/m4/ulonglong.m4 +@@ -0,0 +1,23 @@ ++# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40) ++dnl Copyright (C) 1999-2002 Free Software Foundation, Inc. ++dnl This file is free software, distributed under the terms of the GNU ++dnl General Public License. As a special exception to the GNU General ++dnl Public License, this file may be distributed as part of a program ++dnl that contains a configuration script generated by Autoconf, under ++dnl the same distribution terms as the rest of that program. ++ ++dnl From Paul Eggert. ++ ++AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG], ++[ ++ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, ++ [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;], ++ [unsigned long long ullmax = (unsigned long long) -1; ++ return ull << i | ull >> i | ullmax / ull | ullmax % ull;], ++ ac_cv_type_unsigned_long_long=yes, ++ ac_cv_type_unsigned_long_long=no)]) ++ if test $ac_cv_type_unsigned_long_long = yes; then ++ AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, ++ [Define if you have the unsigned long long type.]) ++ fi ++]) +--- /dev/null ++++ bison-1.875/m4/codeset.m4 +@@ -0,0 +1,23 @@ ++# codeset.m4 serial AM1 (gettext-0.10.40) ++dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. ++dnl This file is free software, distributed under the terms of the GNU ++dnl General Public License. As a special exception to the GNU General ++dnl Public License, this file may be distributed as part of a program ++dnl that contains a configuration script generated by Autoconf, under ++dnl the same distribution terms as the rest of that program. ++ ++dnl From Bruno Haible. ++ ++AC_DEFUN([AM_LANGINFO_CODESET], ++[ ++ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, ++ [AC_TRY_LINK([#include ], ++ [char* cs = nl_langinfo(CODESET);], ++ am_cv_langinfo_codeset=yes, ++ am_cv_langinfo_codeset=no) ++ ]) ++ if test $am_cv_langinfo_codeset = yes; then ++ AC_DEFINE(HAVE_LANGINFO_CODESET, 1, ++ [Define if you have and nl_langinfo(CODESET).]) ++ fi ++]) +--- /dev/null ++++ bison-1.875/m4/intdiv0.m4 +@@ -0,0 +1,72 @@ ++# intdiv0.m4 serial 1 (gettext-0.11.3) ++dnl Copyright (C) 2002 Free Software Foundation, Inc. ++dnl This file is free software, distributed under the terms of the GNU ++dnl General Public License. As a special exception to the GNU General ++dnl Public License, this file may be distributed as part of a program ++dnl that contains a configuration script generated by Autoconf, under ++dnl the same distribution terms as the rest of that program. ++ ++dnl From Bruno Haible. ++ ++AC_DEFUN([gt_INTDIV0], ++[ ++ AC_REQUIRE([AC_PROG_CC])dnl ++ AC_REQUIRE([AC_CANONICAL_HOST])dnl ++ ++ AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], ++ gt_cv_int_divbyzero_sigfpe, ++ [ ++ AC_TRY_RUN([ ++#include ++#include ++ ++static void ++#ifdef __cplusplus ++sigfpe_handler (int sig) ++#else ++sigfpe_handler (sig) int sig; ++#endif ++{ ++ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ ++ exit (sig != SIGFPE); ++} ++ ++int x = 1; ++int y = 0; ++int z; ++int nan; ++ ++int main () ++{ ++ signal (SIGFPE, sigfpe_handler); ++/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ ++#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) ++ signal (SIGTRAP, sigfpe_handler); ++#endif ++/* Linux/SPARC yields signal SIGILL. */ ++#if defined (__sparc__) && defined (__linux__) ++ signal (SIGILL, sigfpe_handler); ++#endif ++ ++ z = x / y; ++ nan = y / y; ++ exit (1); ++} ++], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, ++ [ ++ # Guess based on the CPU. ++ case "$host_cpu" in ++ alpha* | i[34567]86 | m68k | s390*) ++ gt_cv_int_divbyzero_sigfpe="guessing yes";; ++ *) ++ gt_cv_int_divbyzero_sigfpe="guessing no";; ++ esac ++ ]) ++ ]) ++ case "$gt_cv_int_divbyzero_sigfpe" in ++ *yes) value=1;; ++ *) value=0;; ++ esac ++ AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, ++ [Define if integer division by zero raises signal SIGFPE.]) ++]) +--- /dev/null ++++ bison-1.875/m4/glib.m4 +@@ -0,0 +1,196 @@ ++# Configure paths for GLIB ++# Owen Taylor 97-11-3 ++ ++dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) ++dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or ++dnl gthread is specified in MODULES, pass to glib-config ++dnl ++AC_DEFUN(AM_PATH_GLIB, ++[dnl ++dnl Get the cflags and libraries from the glib-config script ++dnl ++AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)], ++ glib_config_prefix="$withval", glib_config_prefix="") ++AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)], ++ glib_config_exec_prefix="$withval", glib_config_exec_prefix="") ++AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program], ++ , enable_glibtest=yes) ++ ++ if test x$glib_config_exec_prefix != x ; then ++ glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix" ++ if test x${GLIB_CONFIG+set} != xset ; then ++ GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config ++ fi ++ fi ++ if test x$glib_config_prefix != x ; then ++ glib_config_args="$glib_config_args --prefix=$glib_config_prefix" ++ if test x${GLIB_CONFIG+set} != xset ; then ++ GLIB_CONFIG=$glib_config_prefix/bin/glib-config ++ fi ++ fi ++ ++ for module in . $4 ++ do ++ case "$module" in ++ gmodule) ++ glib_config_args="$glib_config_args gmodule" ++ ;; ++ gthread) ++ glib_config_args="$glib_config_args gthread" ++ ;; ++ esac ++ done ++ ++ AC_PATH_PROG(GLIB_CONFIG, glib-config, no) ++ min_glib_version=ifelse([$1], ,0.99.7,$1) ++ AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) ++ no_glib="" ++ if test "$GLIB_CONFIG" = "no" ; then ++ no_glib=yes ++ else ++ GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags` ++ GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs` ++ glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \ ++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` ++ glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \ ++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` ++ glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \ ++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` ++ if test "x$enable_glibtest" = "xyes" ; then ++ ac_save_CFLAGS="$CFLAGS" ++ ac_save_LIBS="$LIBS" ++ CFLAGS="$CFLAGS $GLIB_CFLAGS" ++ LIBS="$GLIB_LIBS $LIBS" ++dnl ++dnl Now check if the installed GLIB is sufficiently new. (Also sanity ++dnl checks the results of glib-config to some extent ++dnl ++ rm -f conf.glibtest ++ AC_TRY_RUN([ ++#include ++#include ++#include ++ ++int ++main () ++{ ++ int major, minor, micro; ++ char *tmp_version; ++ ++ system ("touch conf.glibtest"); ++ ++ /* HP/UX 9 (%@#!) writes to sscanf strings */ ++ tmp_version = g_strdup("$min_glib_version"); ++ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { ++ printf("%s, bad version string\n", "$min_glib_version"); ++ exit(1); ++ } ++ ++ if ((glib_major_version != $glib_config_major_version) || ++ (glib_minor_version != $glib_config_minor_version) || ++ (glib_micro_version != $glib_config_micro_version)) ++ { ++ printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", ++ $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, ++ glib_major_version, glib_minor_version, glib_micro_version); ++ printf ("*** was found! If glib-config was correct, then it is best\n"); ++ printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n"); ++ printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); ++ printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); ++ printf("*** required on your system.\n"); ++ printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n"); ++ printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n"); ++ printf("*** before re-running configure\n"); ++ } ++ else if ((glib_major_version != GLIB_MAJOR_VERSION) || ++ (glib_minor_version != GLIB_MINOR_VERSION) || ++ (glib_micro_version != GLIB_MICRO_VERSION)) ++ { ++ printf("*** GLIB header files (version %d.%d.%d) do not match\n", ++ GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); ++ printf("*** library (version %d.%d.%d)\n", ++ glib_major_version, glib_minor_version, glib_micro_version); ++ } ++ else ++ { ++ if ((glib_major_version > major) || ++ ((glib_major_version == major) && (glib_minor_version > minor)) || ++ ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) ++ { ++ return 0; ++ } ++ else ++ { ++ printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", ++ glib_major_version, glib_minor_version, glib_micro_version); ++ printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", ++ major, minor, micro); ++ printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); ++ printf("***\n"); ++ printf("*** If you have already installed a sufficiently new version, this error\n"); ++ printf("*** probably means that the wrong copy of the glib-config shell script is\n"); ++ printf("*** being found. The easiest way to fix this is to remove the old version\n"); ++ printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n"); ++ printf("*** correct copy of glib-config. (In this case, you will have to\n"); ++ printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); ++ printf("*** so that the correct libraries are found at run-time))\n"); ++ } ++ } ++ return 1; ++} ++],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) ++ CFLAGS="$ac_save_CFLAGS" ++ LIBS="$ac_save_LIBS" ++ fi ++ fi ++ if test "x$no_glib" = x ; then ++ AC_MSG_RESULT(yes) ++ ifelse([$2], , :, [$2]) ++ else ++ AC_MSG_RESULT(no) ++ if test "$GLIB_CONFIG" = "no" ; then ++ echo "*** The glib-config script installed by GLIB could not be found" ++ echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in" ++ echo "*** your path, or set the GLIB_CONFIG environment variable to the" ++ echo "*** full path to glib-config." ++ else ++ if test -f conf.glibtest ; then ++ : ++ else ++ echo "*** Could not run GLIB test program, checking why..." ++ CFLAGS="$CFLAGS $GLIB_CFLAGS" ++ LIBS="$LIBS $GLIB_LIBS" ++ AC_TRY_LINK([ ++#include ++#include ++], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], ++ [ echo "*** The test program compiled, but did not run. This usually means" ++ echo "*** that the run-time linker is not finding GLIB or finding the wrong" ++ echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" ++ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" ++ echo "*** to the installed location Also, make sure you have run ldconfig if that" ++ echo "*** is required on your system" ++ echo "***" ++ echo "*** If you have an old version installed, it is best to remove it, although" ++ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ++ echo "***" ++ echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" ++ echo "*** came with the system with the command" ++ echo "***" ++ echo "*** rpm --erase --nodeps gtk gtk-devel" ], ++ [ echo "*** The test program failed to compile or link. See the file config.log for the" ++ echo "*** exact error that occured. This usually means GLIB was incorrectly installed" ++ echo "*** or that you have moved GLIB since it was installed. In the latter case, you" ++ echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ]) ++ CFLAGS="$ac_save_CFLAGS" ++ LIBS="$ac_save_LIBS" ++ fi ++ fi ++ GLIB_CFLAGS="" ++ GLIB_LIBS="" ++ ifelse([$3], , :, [$3]) ++ fi ++ AC_SUBST(GLIB_CFLAGS) ++ AC_SUBST(GLIB_LIBS) ++ rm -f conf.glibtest ++]) +--- /dev/null ++++ bison-1.875/m4/inttypes.m4 +@@ -0,0 +1,27 @@ ++# inttypes.m4 serial 1 (gettext-0.11.4) ++dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. ++dnl This file is free software, distributed under the terms of the GNU ++dnl General Public License. As a special exception to the GNU General ++dnl Public License, this file may be distributed as part of a program ++dnl that contains a configuration script generated by Autoconf, under ++dnl the same distribution terms as the rest of that program. ++ ++dnl From Paul Eggert. ++ ++# Define HAVE_INTTYPES_H if exists and doesn't clash with ++# . ++ ++AC_DEFUN([gt_HEADER_INTTYPES_H], ++[ ++ AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h, ++ [ ++ AC_TRY_COMPILE( ++ [#include ++#include ], ++ [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no) ++ ]) ++ if test $gt_cv_header_inttypes_h = yes; then ++ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, ++ [Define if exists and doesn't clash with .]) ++ fi ++]) +--- /dev/null ++++ bison-1.875/m4/isc-posix.m4 +@@ -0,0 +1,26 @@ ++# isc-posix.m4 serial 2 (gettext-0.11.2) ++dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. ++dnl This file is free software, distributed under the terms of the GNU ++dnl General Public License. As a special exception to the GNU General ++dnl Public License, this file may be distributed as part of a program ++dnl that contains a configuration script generated by Autoconf, under ++dnl the same distribution terms as the rest of that program. ++ ++# This file is not needed with autoconf-2.53 and newer. Remove it in 2005. ++ ++# This test replaces the one in autoconf. ++# Currently this macro should have the same name as the autoconf macro ++# because gettext's gettext.m4 (distributed in the automake package) ++# still uses it. Otherwise, the use in gettext.m4 makes autoheader ++# give these diagnostics: ++# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX ++# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX ++ ++undefine([AC_ISC_POSIX]) ++ ++AC_DEFUN([AC_ISC_POSIX], ++ [ ++ dnl This test replaces the obsolescent AC_ISC_POSIX kludge. ++ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) ++ ] ++) diff --git a/openembedded/packages/bison/bison-native_2.0.bb b/openembedded/packages/bison/bison-native_2.0.bb new file mode 100644 index 0000000000..57065cd502 --- /dev/null +++ b/openembedded/packages/bison/bison-native_2.0.bb @@ -0,0 +1,21 @@ +include bison_${PV}.bb +SECTION = "devel" +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/bison-${PV}" +S = "${WORKDIR}/bison-${PV}" +PR = "r2" + +inherit native autotools + +do_stage() { + rm -f ${STAGING_BINDIR}/yacc + rm -f ${STAGING_BINDIR}/bison + install -m 0755 src/bison ${STAGING_BINDIR}/ + cat >${STAGING_BINDIR}/yacc < ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "busybox.h" ++ ++extern int getkey_main(int argc, char **argv) ++{ ++ int status = EXIT_FAILURE; ++ ++ if ( argc < 2 ) ++ { ++ bb_show_usage(); ++ } ++ ++ /* ++ * If no terminal is attached it is quite useless ++ * to treat it like one. ++ */ ++ if( !isatty(STDIN_FILENO) ) ++ { ++ goto error_hard; ++ } ++ ++ //bb_printf( "DEBUG: time = '%s'\n", argv[1] ); ++ //bb_printf( "DEBUG: mesg = '%s'\n", argv[2] ); ++ ++ struct termios orig; ++ struct termios attr; ++ ++ if ( tcgetattr(STDIN_FILENO, &orig) == -1 ) ++ { ++ goto error_hard; ++ } ++ ++ attr = orig; ++ attr.c_cc[VMIN] = 0; ++ attr.c_cc[VTIME] = 0; ++ attr.c_iflag |= INLCR; ++ attr.c_oflag |= OPOST|ONLCR; ++ attr.c_cflag &= ~PARENB; ++ attr.c_lflag &= ~(ICANON/*|ECHO*/); ++ if ( tcsetattr(STDIN_FILENO,TCSANOW,&attr) == -1 ) ++ { ++ goto error_hard; ++ } ++ ++ fd_set rfds; ++ struct timeval tv; ++ int retval; ++ ++ FD_ZERO(&rfds); ++ FD_SET(0, &rfds); ++ ++ tv.tv_sec = atoi( argv[1] ); ++ tv.tv_usec = 0; ++ ++ if ( argc == 3 ) ++ { ++ bb_printf( argv[2], tv.tv_sec ); ++ bb_printf( "\n" ); ++ fflush(stdout); ++ } ++ retval = select(1, &rfds, NULL, NULL, &tv); ++ if (retval > 0) ++ { ++ status = EXIT_SUCCESS; ++ } ++ ++ if (tcsetattr(STDIN_FILENO,TCSANOW,&orig) == -1 ) ++ { ++ goto error_hard; ++ } ++ ++ return status; ++ ++error_hard : ++ return EXIT_FAILURE; ++}; ++ +--- busybox-1.00/console-tools/Makefile.in~add-getkey-applet.patch ++++ busybox-1.00/console-tools/Makefile.in +@@ -28,6 +28,7 @@ + CONSOLETOOLS_DIR-$(CONFIG_CLEAR) += clear.o + CONSOLETOOLS_DIR-$(CONFIG_DEALLOCVT) += deallocvt.o + CONSOLETOOLS_DIR-$(CONFIG_DUMPKMAP) += dumpkmap.o ++CONSOLETOOLS_DIR-$(CONFIG_GETKEY) += getkey.o + CONSOLETOOLS_DIR-$(CONFIG_LOADFONT) += loadfont.o + CONSOLETOOLS_DIR-$(CONFIG_LOADKMAP) += loadkmap.o + CONSOLETOOLS_DIR-$(CONFIG_OPENVT) += openvt.o +--- busybox-1.00/console-tools/Config.in~add-getkey-applet.patch ++++ busybox-1.00/console-tools/Config.in +@@ -31,6 +31,14 @@ + This program dumps the kernel's keyboard translation table to + stdout, in binary format. You can then use loadkmap to load it. + ++config CONFIG_GETKEY ++ bool "getkey" ++ default n ++ help ++ This program displays a configurable message and waits ++ a dedicated number of seconds for a keypress. It sets ++ the exit code accordingly, i.e. SUCCESS if there was a keypress. ++ + config CONFIG_LOADFONT + bool "loadfont" + default n +--- busybox-1.00/include/applets.h~add-getkey-applet.patch ++++ busybox-1.00/include/applets.h +@@ -223,6 +223,9 @@ + #ifdef CONFIG_FTPPUT + APPLET(ftpput, ftpgetput_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) + #endif ++#ifdef CONFIG_GETKEY ++ APPLET(getkey, getkey_main, _BB_DIR_SBIN, _BB_SUID_NEVER) ++#endif + #ifdef CONFIG_GETOPT + APPLET(getopt, getopt_main, _BB_DIR_BIN, _BB_SUID_NEVER) + #endif +--- busybox-1.00/include/usage.h~add-getkey-applet.patch ++++ busybox-1.00/include/usage.h +@@ -734,6 +734,13 @@ + "\t-p, --password Password to be used\n" \ + "\t-P, --port Port number to be used" + ++#define getkey_trivial_usage \ ++ "time [message]" ++#define getkey_full_usage \ ++ "Display a message and wait for a keypress." ++#define getkey_example_usage \ ++ "$ getkey 5 'Press a key within %d seconds to interrupt autoboot.'" ++ + #define getopt_trivial_usage \ + "[OPTIONS]..." + #define getopt_full_usage \ diff --git a/openembedded/packages/busybox/busybox-1.00/below.patch b/openembedded/packages/busybox/busybox-1.00/below.patch new file mode 100644 index 0000000000..ec97b29962 --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.00/below.patch @@ -0,0 +1,49 @@ +Index: modutils/modprobe.c +=================================================================== +RCS file: /var/cvs/busybox/modutils/modprobe.c,v +retrieving revision 1.41 +diff -u -r1.41 modprobe.c +--- busybox/modutils/modprobe.c 24 Sep 2004 09:18:55 -0000 1.41 ++++ busybox/modutils/modprobe.c 29 Dec 2004 11:56:07 -0000 +@@ -357,6 +357,41 @@ + } + } + } ++ else if ((strncmp (buffer, "below", 5) == 0) && isspace (buffer[5])) { ++ char *mod, *deps; ++ if (parse_tag_value (buffer + 6, &mod, &deps)) { ++ struct dep_t *dt; ++ ++ for (dt = first; dt; dt = dt->m_next) { ++ if (strcmp (dt->m_name, mod) == 0) ++ break; ++ } ++ if (dt) { ++ char *pp; ++ char *name; ++ ++ pp = name = deps; ++ ++ for (;;) { ++ while (*pp != 0 && !isspace (*pp)) ++ pp++; ++ if (isspace (*pp)) ++ *(pp++) = 0; ++ ++ dt->m_depcnt++; ++ dt->m_deparr = (char **) xrealloc (dt->m_deparr, ++ sizeof (char *) * dt->m_depcnt); ++ dt->m_deparr[dt->m_depcnt - 1] = bb_xstrdup (name); ++ ++ while (isspace (*pp)) ++ pp++; ++ name = pp; ++ if (*pp == 0) ++ break; ++ } ++ } ++ } ++ } + } + } + close ( fd ); diff --git a/openembedded/packages/busybox/busybox-1.00/celf-ash-builtins.patch b/openembedded/packages/busybox/busybox-1.00/celf-ash-builtins.patch new file mode 100644 index 0000000000..ec1925e6ad --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.00/celf-ash-builtins.patch @@ -0,0 +1,431 @@ +diff -Naur busybox-1.00-pre3.orig/coreutils/echo.c busybox-1.00-pre3/coreutils/echo.c +--- busybox-1.00-pre3.orig/coreutils/echo.c 2003-03-19 12:11:33.000000000 +0300 ++++ busybox-1.00-pre3/coreutils/echo.c 2003-11-07 17:47:35.000000000 +0300 +@@ -122,7 +122,11 @@ + #endif + + DONE: +- bb_fflush_stdout_and_exit(EXIT_SUCCESS); ++#ifdef CONFIG_FEATURE_BUILTIN_ECHO ++ return EXIT_SUCCESS; ++#else ++ bb_fflush_stdout_and_exit(EXIT_SUCCESS); ++#endif + } + + /*- +diff -Naur busybox-1.00-pre3.orig/coreutils/test.c busybox-1.00-pre3/coreutils/test.c +--- busybox-1.00-pre3.orig/coreutils/test.c 2003-07-15 01:20:45.000000000 +0400 ++++ busybox-1.00-pre3/coreutils/test.c 2003-11-07 17:47:35.000000000 +0300 +@@ -188,19 +188,19 @@ + /* Implement special cases from POSIX.2, section 4.62.4 */ + switch (argc) { + case 1: +- exit(1); ++ return (1); + case 2: +- exit(*argv[1] == '\0'); ++ return (*argv[1] == '\0'); + case 3: + if (argv[1][0] == '!' && argv[1][1] == '\0') { +- exit(!(*argv[2] == '\0')); ++ return (!(*argv[2] == '\0')); + } + break; + case 4: + if (argv[1][0] != '!' || argv[1][1] != '\0') { + if (t_lex(argv[2]), t_wp_op && t_wp_op->op_type == BINOP) { + t_wp = &argv[1]; +- exit(binop() == 0); ++ return (binop() == 0); + } + } + break; +@@ -208,7 +208,7 @@ + if (argv[1][0] == '!' && argv[1][1] == '\0') { + if (t_lex(argv[3]), t_wp_op && t_wp_op->op_type == BINOP) { + t_wp = &argv[2]; +- exit(!(binop() == 0)); ++ return (!(binop() == 0)); + } + } + break; +diff -Naur busybox-1.00-pre3.orig/include/usage.h busybox-1.00-pre3/include/usage.h +--- busybox-1.00-pre3.orig/include/usage.h 2003-08-29 18:18:26.000000000 +0400 ++++ busybox-1.00-pre3/include/usage.h 2003-11-07 17:47:59.000000000 +0300 +@@ -1760,6 +1760,13 @@ + "quit\n" \ + "221 foobar closing connection\n" + ++#define nice_trivial_usage \ ++ "[OPTION] [COMMAND [ARG]...]" ++#define nice_full_usage \ ++ "Run COMMAND with an adjusted scheduling priority." ++#define nice_example_usage \ ++ "$ nice -n 0 /tmp/foo \n" ++ + #define netstat_trivial_usage \ + "[-laenrtuwx]" + #define netstat_full_usage \ +diff -Naur busybox-1.00-pre3.orig/shell/Config.in busybox-1.00-pre3/shell/Config.in +--- busybox-1.00-pre3.orig/shell/Config.in 2003-09-12 08:51:25.000000000 +0400 ++++ busybox-1.00-pre3/shell/Config.in 2003-11-07 17:47:59.000000000 +0300 +@@ -53,6 +53,34 @@ + help + Enable job control in the ash shell. + ++config CONFIG_ASH_PIPE_OPTIMIZATION ++ bool " Enable ash pipe optimization " ++ default y ++ depends on CONFIG_ASH ++ help ++ Eliminate cat at the beginning of the pipe. ++ ++config CONFIG_FEATURE_BUILTIN_TEST ++ bool " Builtin test command" ++ default y ++ depends on CONFIG_ASH ++ help ++ Builtin test command" ++ ++config CONFIG_FEATURE_BUILTIN_ECHO ++ bool " Builtin echo command" ++ default y ++ depends on CONFIG_ASH ++ help ++ Builtin echo command" ++ ++config CONFIG_FEATURE_BUILTIN_PIDOF ++ bool " Builtin pidof command" ++ default y ++ depends on CONFIG_ASH && CONFIG_PIDOF ++ help ++ Builtin pidof command" ++ + config CONFIG_ASH_ALIAS + bool " Enable alias support" + default y +diff -Naur busybox-1.00-pre3.orig/shell/ash.c busybox-1.00-pre3/shell/ash.c +--- busybox-1.00-pre3.orig/shell/ash.c 2003-09-02 06:36:17.000000000 +0400 ++++ busybox-1.00-pre3/shell/ash.c 2003-11-07 17:47:59.000000000 +0300 +@@ -1259,6 +1259,16 @@ + #ifdef JOBS + static int killcmd(int, char **); + #endif ++#ifdef CONFIG_FEATURE_BUILTIN_TEST ++static int testcmd(int, char **); ++#endif ++#ifdef CONFIG_FEATURE_BUILTIN_ECHO ++static int echocmd(int, char**); ++#endif ++#ifdef CONFIG_FEATURE_BUILTIN_PIDOF ++static int pidofcmd(int, char **); ++#endif ++ + + /* $NetBSD: mail.h,v 1.9 2002/11/24 22:35:40 christos Exp $ */ + +@@ -1281,39 +1291,6 @@ + /* unsigned flags; */ + }; + +-#ifdef CONFIG_ASH_CMDCMD +-# ifdef JOBS +-# ifdef CONFIG_ASH_ALIAS +-# define COMMANDCMD (builtincmd + 7) +-# define EXECCMD (builtincmd + 10) +-# else +-# define COMMANDCMD (builtincmd + 6) +-# define EXECCMD (builtincmd + 9) +-# endif +-# else /* ! JOBS */ +-# ifdef CONFIG_ASH_ALIAS +-# define COMMANDCMD (builtincmd + 6) +-# define EXECCMD (builtincmd + 9) +-# else +-# define COMMANDCMD (builtincmd + 5) +-# define EXECCMD (builtincmd + 8) +-# endif +-# endif /* JOBS */ +-#else /* ! CONFIG_ASH_CMDCMD */ +-# ifdef JOBS +-# ifdef CONFIG_ASH_ALIAS +-# define EXECCMD (builtincmd + 9) +-# else +-# define EXECCMD (builtincmd + 8) +-# endif +-# else /* ! JOBS */ +-# ifdef CONFIG_ASH_ALIAS +-# define EXECCMD (builtincmd + 8) +-# else +-# define EXECCMD (builtincmd + 7) +-# endif +-# endif /* JOBS */ +-#endif /* CONFIG_ASH_CMDCMD */ + + #define BUILTIN_NOSPEC "0" + #define BUILTIN_SPECIAL "1" +@@ -1328,65 +1305,21 @@ + #define IS_BUILTIN_REGULAR(builtincmd) ((builtincmd)->name[0] & 2) + + static const struct builtincmd builtincmd[] = { +- { BUILTIN_SPEC_REG ".", dotcmd }, +- { BUILTIN_SPEC_REG ":", truecmd }, +-#ifdef CONFIG_ASH_ALIAS +- { BUILTIN_REG_ASSG "alias", aliascmd }, +-#endif +-#ifdef JOBS +- { BUILTIN_REGULAR "bg", bgcmd }, +-#endif +- { BUILTIN_SPEC_REG "break", breakcmd }, +- { BUILTIN_REGULAR "cd", cdcmd }, +- { BUILTIN_NOSPEC "chdir", cdcmd }, +-#ifdef CONFIG_ASH_CMDCMD +- { BUILTIN_REGULAR "command", commandcmd }, +-#endif +- { BUILTIN_SPEC_REG "continue", breakcmd }, +- { BUILTIN_SPEC_REG "eval", evalcmd }, +- { BUILTIN_SPEC_REG "exec", execcmd }, +- { BUILTIN_SPEC_REG "exit", exitcmd }, +- { BUILTIN_SPEC_REG_ASSG "export", exportcmd }, +- { BUILTIN_REGULAR "false", falsecmd }, +-#ifdef JOBS +- { BUILTIN_REGULAR "fg", fgcmd }, +-#endif +-#ifdef CONFIG_ASH_GETOPTS +- { BUILTIN_REGULAR "getopts", getoptscmd }, +-#endif +- { BUILTIN_NOSPEC "hash", hashcmd }, +-#ifndef CONFIG_FEATURE_SH_EXTRA_QUIET +- { BUILTIN_NOSPEC "help", helpcmd }, +-#endif +-#ifdef JOBS +- { BUILTIN_REGULAR "jobs", jobscmd }, +- { BUILTIN_REGULAR "kill", killcmd }, +-#endif +-#ifdef CONFIG_ASH_MATH_SUPPORT +- { BUILTIN_NOSPEC "let", letcmd }, +-#endif +- { BUILTIN_ASSIGN "local", localcmd }, +- { BUILTIN_NOSPEC "pwd", pwdcmd }, +- { BUILTIN_REGULAR "read", readcmd }, +- { BUILTIN_SPEC_REG_ASSG "readonly", exportcmd }, +- { BUILTIN_SPEC_REG "return", returncmd }, +- { BUILTIN_SPEC_REG "set", setcmd }, +- { BUILTIN_SPEC_REG "shift", shiftcmd }, +- { BUILTIN_SPEC_REG "times", timescmd }, +- { BUILTIN_SPEC_REG "trap", trapcmd }, +- { BUILTIN_REGULAR "true", truecmd }, +- { BUILTIN_NOSPEC "type", typecmd }, +- { BUILTIN_NOSPEC "ulimit", ulimitcmd }, +- { BUILTIN_REGULAR "umask", umaskcmd }, +-#ifdef CONFIG_ASH_ALIAS +- { BUILTIN_REGULAR "unalias", unaliascmd }, +-#endif +- { BUILTIN_SPEC_REG "unset", unsetcmd }, +- { BUILTIN_REGULAR "wait", waitcmd }, ++#define BUILTIN_COMMAND_SPEC(code, str, func) {str, func}, ++#include "ash.d" ++{} + }; + +-#define NUMBUILTINS (sizeof (builtincmd) / sizeof (struct builtincmd) ) ++enum { ++#define BUILTIN_COMMAND_SPEC(code, str, func) code, ++#include "ash.d" ++NUMBUILTINS ++}; + ++#ifdef CONFIG_ASH_CMDCMD ++#define COMMANDCMD (builtincmd + COMMAND_CMD) ++#endif ++#define EXECCMD (builtincmd + EXEC_CMD) + + + struct cmdentry { +@@ -1678,7 +1611,8 @@ + + /* from input.c: */ + { +- basepf.nextc = basepf.buf = basebuf; ++ struct parsefile* pf = &basepf; ++ pf->nextc = pf->buf = basebuf; + } + + /* from trap.c: */ +@@ -2678,6 +2612,14 @@ + * Called to reset things after an exception. + */ + ++#ifdef CONFIG_FEATURE_BUILTIN_ECHO ++static int ++echocmd(int argc, char **argv) ++{ ++ return echo_main(argc, argv); ++} ++#endif ++ + /* + * The eval commmand. + */ +@@ -3028,6 +2970,23 @@ + } + + ++static int ++cat_file(union node *n) ++{ ++#ifdef CONFIG_ASH_PIPE_OPTIMIZATION ++ if (n->type == NCMD ++ && n->ncmd.args != NULL ++ && strcmp(n->ncmd.args->narg.text, "cat") == 0 ++ && n->ncmd.args->narg.next != NULL ++ && *n->ncmd.args->narg.next->narg.text != '-' ++ && n->ncmd.args->narg.next->narg.next == NULL) ++ { ++ return open(n->ncmd.args->narg.next->narg.text, O_RDONLY); ++ } ++#endif ++ return -1; ++} ++ + + /* + * Evaluate a pipeline. All the processes in the pipeline are children +@@ -3057,7 +3016,11 @@ + prehash(lp->n); + pip[1] = -1; + if (lp->next) { +- if (pipe(pip) < 0) { ++ if (prevfd < 0 && (prevfd = cat_file(lp->n)) >= 0) { ++ // it is cat at the beginning of the pipe ++ continue; ++ } ++ if (pipe(pip) < 0) { + close(prevfd); + error("Pipe call failed"); + } +@@ -3104,11 +3067,11 @@ + { + int saveherefd; + +- result->fd = -1; ++ result->fd = cat_file(n); + result->buf = NULL; + result->nleft = 0; + result->jp = NULL; +- if (n == NULL) { ++ if (n == NULL || result->fd >= 0) { + goto out; + } + +@@ -3562,6 +3525,24 @@ + } + } + ++#ifdef CONFIG_FEATURE_BUILTIN_TEST ++static int ++testcmd(int argc, char** argv) ++{ ++ bb_applet_name = argv[0]; ++ return test_main(argc, argv); ++} ++#endif ++ ++#ifdef CONFIG_FEATURE_BUILTIN_PIDOF ++static int ++pidofcmd(int argc, char** argv) ++{ ++ bb_applet_name = argv[0]; ++ return pidof_main(argc, argv); ++} ++#endif ++ + + static int + falsecmd(int argc, char **argv) +@@ -4943,7 +4924,9 @@ + ckfree(in.buf); + if (in.fd >= 0) { + close(in.fd); +- back_exitstatus = waitforjob(in.jp); ++ if (in.jp != NULL) { ++ back_exitstatus = waitforjob(in.jp); ++ } + } + INTON; + +diff -Naur busybox-1.00-pre3.orig/shell/ash.d busybox-1.00-pre3/shell/ash.d +--- busybox-1.00-pre3.orig/shell/ash.d 1970-01-01 03:00:00.000000000 +0300 ++++ busybox-1.00-pre3/shell/ash.d 2003-11-07 17:47:59.000000000 +0300 +@@ -0,0 +1,70 @@ ++BUILTIN_COMMAND_SPEC(DOT_CMD, BUILTIN_SPEC_REG ".", dotcmd) ++BUILTIN_COMMAND_SPEC(COMMA_CMD, BUILTIN_SPEC_REG ":", truecmd) ++#ifdef CONFIG_FEATURE_BUILTIN_TEST ++BUILTIN_COMMAND_SPEC(RPAR_CMD, BUILTIN_REGULAR "[", testcmd) ++#endif ++#ifdef CONFIG_ASH_ALIAS ++BUILTIN_COMMAND_SPEC(ALIAS_CMD, BUILTIN_REG_ASSG "alias", aliascmd) ++#endif ++#ifdef JOBS ++BUILTIN_COMMAND_SPEC(BG_CMD, BUILTIN_REGULAR "bg", bgcmd) ++#endif ++BUILTIN_COMMAND_SPEC(BREAK_CMD, BUILTIN_SPEC_REG "break", breakcmd) ++BUILTIN_COMMAND_SPEC(CD_CMD, BUILTIN_REGULAR "cd", cdcmd) ++BUILTIN_COMMAND_SPEC(CHDIR_CMD, BUILTIN_NOSPEC "chdir", cdcmd) ++#ifdef CONFIG_ASH__CMD_CMD ++BUILTIN_COMMAND_SPEC(COMMAND_CMD, BUILTIN_REGULAR "command", commandcmd) ++#endif ++BUILTIN_COMMAND_SPEC(CONTINUE_CMD,BUILTIN_SPEC_REG "continue", breakcmd) ++#ifdef CONFIG_FEATURE_BUILTIN_ECHO ++BUILTIN_COMMAND_SPEC(ECHO_CMD, BUILTIN_REGULAR "echo", echocmd) ++#endif ++BUILTIN_COMMAND_SPEC(EVAL_CMD, BUILTIN_SPEC_REG "eval", evalcmd) ++BUILTIN_COMMAND_SPEC(EXEC_CMD, BUILTIN_SPEC_REG "exec", execcmd) ++BUILTIN_COMMAND_SPEC(EXIT_CMD, BUILTIN_SPEC_REG "exit", exitcmd) ++BUILTIN_COMMAND_SPEC(EXPORT_CMD, BUILTIN_SPEC_REG_ASSG "export", exportcmd) ++BUILTIN_COMMAND_SPEC(FALSE_CMD, BUILTIN_REGULAR "false", falsecmd) ++#ifdef JOBS ++BUILTIN_COMMAND_SPEC(FG_CMD, BUILTIN_REGULAR "fg", fgcmd) ++#endif ++#ifdef CONFIG_ASH_GETOPTS ++BUILTIN_COMMAND_SPEC(GETOPTS_CMD, BUILTIN_REGULAR "getopts", getoptscmd) ++#endif ++BUILTIN_COMMAND_SPEC(HASH_CMD, BUILTIN_NOSPEC "hash", hashcmd) ++#ifndef CONFIG_FEATURE_SH_EXTRA_QUIET ++BUILTIN_COMMAND_SPEC(HELP_CMD, BUILTIN_NOSPEC "help", helpcmd) ++#endif ++#ifdef JOBS ++BUILTIN_COMMAND_SPEC(JOBS_CMD, BUILTIN_REGULAR "jobs", jobscmd) ++BUILTIN_COMMAND_SPEC(KILL_CMD, BUILTIN_REGULAR "kill", killcmd) ++#endif ++#ifdef CONFIG_ASH_MATH_SUPPORT ++BUILTIN_COMMAND_SPEC(LET_CMD, BUILTIN_NOSPEC "let", letcmd) ++#endif ++BUILTIN_COMMAND_SPEC(LOCAL_CMD, BUILTIN_ASSIGN "local", localcmd) ++#ifdef CONFIG_FEATURE_BUILTIN_PIDOF ++BUILTIN_COMMAND_SPEC(PIDOF_CMD, BUILTIN_REGULAR "pidof", pidofcmd) ++#endif ++BUILTIN_COMMAND_SPEC(PWD_CMD, BUILTIN_NOSPEC "pwd", pwdcmd) ++BUILTIN_COMMAND_SPEC(READ_CMD, BUILTIN_REGULAR "read", readcmd) ++BUILTIN_COMMAND_SPEC(READONLY_CMD,BUILTIN_SPEC_REG_ASSG "readonly", exportcmd) ++BUILTIN_COMMAND_SPEC(RETURN_CMD, BUILTIN_SPEC_REG "return", returncmd) ++BUILTIN_COMMAND_SPEC(SET_CMD, BUILTIN_SPEC_REG "set", setcmd) ++BUILTIN_COMMAND_SPEC(SHIFT_CMD, BUILTIN_SPEC_REG "shift", shiftcmd) ++#ifdef CONFIG_FEATURE_BUILTIN_TEST ++BUILTIN_COMMAND_SPEC(TEST_CMD, BUILTIN_REGULAR "test", testcmd) ++#endif ++BUILTIN_COMMAND_SPEC(TIMES_CMD, BUILTIN_SPEC_REG "times", timescmd) ++BUILTIN_COMMAND_SPEC(TRAP_CMD, BUILTIN_SPEC_REG "trap", trapcmd) ++BUILTIN_COMMAND_SPEC(TRUE_CMD, BUILTIN_REGULAR "true", truecmd) ++BUILTIN_COMMAND_SPEC(TYPE_CMD, BUILTIN_NOSPEC "type", typecmd) ++BUILTIN_COMMAND_SPEC(ULIMIT_CMD, BUILTIN_NOSPEC "ulimit", ulimitcmd) ++BUILTIN_COMMAND_SPEC(UMASK_CMD, BUILTIN_REGULAR "umask", umaskcmd) ++#ifdef CONFIG_ASH_ALIAS ++BUILTIN_COMMAND_SPEC(UNALIAS_CMD, BUILTIN_REGULAR "unalias", unaliascmd) ++#endif ++BUILTIN_COMMAND_SPEC(UNSET_CMD, BUILTIN_SPEC_REG "unset", unsetcmd) ++BUILTIN_COMMAND_SPEC(WAIT_CMD, BUILTIN_REGULAR "wait", waitcmd) ++ ++ ++#undef BUILTIN_COMMAND_SPEC diff --git a/openembedded/packages/busybox/busybox-1.00/console.patch b/openembedded/packages/busybox/busybox-1.00/console.patch new file mode 100644 index 0000000000..d57bdfbe89 --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.00/console.patch @@ -0,0 +1,13 @@ +--- busybox-1.00-pre2/libbb/get_console.c~console ++++ busybox-1.00-pre2/libbb/get_console.c +@@ -86,10 +86,6 @@ + { + int fd; + +- if (-1 == (fd = open_a_console("/dev/console"))) +- return -1; +- else +- return fd; + fd = open_a_console(CURRENT_TTY); + if (fd >= 0) + return fd; diff --git a/openembedded/packages/busybox/busybox-1.00/defconfig b/openembedded/packages/busybox/busybox-1.00/defconfig new file mode 100644 index 0000000000..8b8212c54a --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.00/defconfig @@ -0,0 +1,476 @@ +# +# Automatically generated make config: don't edit +# +HAVE_DOT_CONFIG=y + +# +# General Configuration +# +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +# CONFIG_FEATURE_VERBOSE_USAGE is not set +# CONFIG_FEATURE_INSTALLER is not set +# CONFIG_LOCALE_SUPPORT is not set +CONFIG_FEATURE_DEVFS=y +CONFIG_FEATURE_DEVPTS=y +# CONFIG_FEATURE_CLEAN_UP is not set +# CONFIG_FEATURE_SUID is not set +# CONFIG_SELINUX is not set + +# +# Build Options +# +# CONFIG_STATIC is not set +CONFIG_LFS=y +# USING_CROSS_COMPILER is not set +EXTRA_CFLAGS_OPTIONS="" + +# +# Installation Options +# +# CONFIG_INSTALL_NO_USR is not set +PREFIX="./_install" + +# +# Archival Utilities +# +CONFIG_AR=y +# CONFIG_FEATURE_AR_LONG_FILENAMES is not set +CONFIG_BUNZIP2=y +CONFIG_CPIO=y +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +CONFIG_GUNZIP=y +# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set +CONFIG_GZIP=y +# CONFIG_RPM2CPIO is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +CONFIG_FEATURE_TAR_BZIP2=y +CONFIG_FEATURE_TAR_FROM=y +CONFIG_FEATURE_TAR_GZIP=y +# CONFIG_FEATURE_TAR_COMPRESS is not set +CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY=y +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set +# CONFIG_UNCOMPRESS is not set +CONFIG_UNZIP=y + +# +# Common options for cpio and tar +# +# CONFIG_FEATURE_UNARCHIVE_TAPE is not set + +# +# Coreutils +# +CONFIG_BASENAME=y +# CONFIG_CAL is not set +CONFIG_CAT=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +CONFIG_CHROOT=y +# CONFIG_CMP is not set +CONFIG_CP=y +CONFIG_CUT=y +CONFIG_DATE=y + +# +# date (forced enabled for use with watch) +# +# CONFIG_FEATURE_DATE_ISOFMT is not set +CONFIG_DD=y +CONFIG_DF=y +CONFIG_DIRNAME=y +# CONFIG_DOS2UNIX is not set +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +CONFIG_EXPR=y +CONFIG_FALSE=y +# CONFIG_FOLD is not set +CONFIG_HEAD=y +# CONFIG_FEATURE_FANCY_HEAD is not set +# CONFIG_HOSTID is not set +CONFIG_ID=y +# CONFIG_INSTALL is not set +# CONFIG_LENGTH is not set +CONFIG_LN=y +CONFIG_LOGNAME=y +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +# CONFIG_FEATURE_LS_RECURSIVE is not set +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +CONFIG_OD=y +CONFIG_PRINTF=y +CONFIG_PWD=y +# CONFIG_REALPATH is not set +CONFIG_RM=y +CONFIG_RMDIR=y +CONFIG_SEQ=y +# CONFIG_SHA1SUM is not set +CONFIG_SLEEP=y +# CONFIG_FEATURE_FANCY_SLEEP is not set +CONFIG_SORT=y +CONFIG_STTY=y +CONFIG_SYNC=y +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set +CONFIG_TEST=y + +# +# test (forced enabled for use with shell) +# +# CONFIG_FEATURE_TEST_64 is not set +CONFIG_TOUCH=y +CONFIG_TR=y +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +CONFIG_UNIQ=y +# CONFIG_USLEEP is not set +# CONFIG_UUDECODE is not set +# CONFIG_UUENCODE is not set +CONFIG_WATCH=y +CONFIG_WC=y +CONFIG_WHO=y +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options for cp and mv +# +# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set + +# +# Common options for ls and more +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum +# +# CONFIG_FEATURE_MD5_SHA1_SUM_CHECK is not set + +# +# Console Utilities +# +CONFIG_CHVT=y +CONFIG_CLEAR=y +CONFIG_DEALLOCVT=y +CONFIG_DUMPKMAP=y +CONFIG_GETKEY=y +CONFIG_LOADFONT=y +CONFIG_LOADKMAP=y +CONFIG_OPENVT=y +CONFIG_RESET=y +# CONFIG_SETKEYCODES is not set + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +# CONFIG_PIPE_PROGRESS is not set +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_RUN_PARTS=y +CONFIG_START_STOP_DAEMON=y +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_AWK=y +CONFIG_FEATURE_AWK_MATH=y +# CONFIG_PATCH is not set +CONFIG_SED=y +CONFIG_VI=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +CONFIG_FEATURE_VI_USE_SIGNALS=y +# CONFIG_FEATURE_VI_DOT_CMD is not set +# CONFIG_FEATURE_VI_READONLY is not set +# CONFIG_FEATURE_VI_SETOPTS is not set +# CONFIG_FEATURE_VI_SET is not set +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y + +# +# Finding Utilities +# +CONFIG_FIND=y +CONFIG_FEATURE_FIND_MTIME=y +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +CONFIG_FEATURE_FIND_NEWER=y +# CONFIG_FEATURE_FIND_INUM is not set +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set +# CONFIG_FEATURE_XARGS_SUPPORT_QUOTES is not set +# CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT is not set +# CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM is not set + +# +# Init Utilities +# +# CONFIG_INIT is not set +# CONFIG_HALT is not set +# CONFIG_POWEROFF is not set +# CONFIG_REBOOT is not set +# CONFIG_MESG is not set + +# +# Login/Password Management Utilities +# +# CONFIG_USE_BB_PWD_GRP is not set +# CONFIG_ADDGROUP is not set +# CONFIG_DELGROUP is not set +# CONFIG_ADDUSER is not set +# CONFIG_DELUSER is not set +# CONFIG_GETTY is not set +CONFIG_FEATURE_U_W_TMP=y +# CONFIG_LOGIN is not set +# CONFIG_PASSWD is not set +# CONFIG_SU is not set +# CONFIG_SULOGIN is not set +# CONFIG_VLOCK is not set + +# +# Miscellaneous Utilities +# +# CONFIG_ADJTIMEX is not set +# CONFIG_CROND is not set +# CONFIG_CRONTAB is not set +CONFIG_DC=y +# CONFIG_DEVFSD is not set +# CONFIG_LAST is not set +# CONFIG_HDPARM is not set +# CONFIG_MAKEDEVS is not set +# CONFIG_MT is not set +# CONFIG_RX is not set +CONFIG_STRINGS=y +# CONFIG_TIME is not set +# CONFIG_WATCHDOG is not set + +# +# Linux Module Utilities +# +CONFIG_INSMOD=y +CONFIG_FEATURE_2_4_MODULES=y +CONFIG_FEATURE_2_6_MODULES=y +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS=y +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +CONFIG_FEATURE_INSMOD_LOAD_MAP=y +CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL=y +CONFIG_LSMOD=y +CONFIG_MODPROBE=y +CONFIG_RMMOD=y +CONFIG_FEATURE_CHECK_TAINTED_MODULE=y + +# +# Networking Utilities +# +CONFIG_FEATURE_IPV6=y +# CONFIG_ARPING is not set +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +CONFIG_HOSTNAME=y +# CONFIG_HTTPD is not set +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +# CONFIG_FEATURE_IFCONFIG_SLIP is not set +# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set +CONFIG_FEATURE_IFCONFIG_HW=y +# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set +CONFIG_IFUPDOWN=y +# CONFIG_FEATURE_IFUPDOWN_IP is not set +CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y +CONFIG_FEATURE_IFUPDOWN_IPV4=y +CONFIG_FEATURE_IFUPDOWN_IPV6=y +# CONFIG_FEATURE_IFUPDOWN_IPX is not set +CONFIG_FEATURE_IFUPDOWN_MAPPING=y +# CONFIG_INETD is not set +CONFIG_IP=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +CONFIG_FEATURE_IP_TUNNEL=y +# CONFIG_IPCALC is not set +# CONFIG_IPADDR is not set +# CONFIG_IPLINK is not set +# CONFIG_IPROUTE is not set +# CONFIG_IPTUNNEL is not set +# CONFIG_NAMEIF is not set +CONFIG_NC=y +CONFIG_NETSTAT=y +CONFIG_NSLOOKUP=y +CONFIG_PING=y +CONFIG_FEATURE_FANCY_PING=y +CONFIG_PING6=y +CONFIG_FEATURE_FANCY_PING6=y +CONFIG_ROUTE=y +CONFIG_TELNET=y +# CONFIG_FEATURE_TELNET_TTYPE is not set +CONFIG_FEATURE_TELNET_AUTOLOGIN=y +# CONFIG_TELNETD is not set +CONFIG_TFTP=y +CONFIG_TRACEROUTE=y +# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set +# CONFIG_VCONFIG is not set +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_IP6_LITERAL=y + +# +# udhcp Server/Client +# +CONFIG_UDHCPD=y +CONFIG_UDHCPC=y +CONFIG_FEATURE_UDHCP_SYSLOG=y +# CONFIG_FEATURE_UDHCP_DEBUG is not set + +# +# Process Utilities +# +CONFIG_FREE=y +CONFIG_KILL=y +CONFIG_KILLALL=y +# CONFIG_PIDOF is not set +CONFIG_PS=y +CONFIG_RENICE=y +CONFIG_TOP=y +FEATURE_CPU_USAGE_PERCENTAGE=y +CONFIG_UPTIME=y +# CONFIG_SYSCTL is not set + +# +# Another Bourne-like Shell +# +CONFIG_FEATURE_SH_IS_ASH=y +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_LASH is not set +# CONFIG_FEATURE_SH_IS_MSH is not set +# CONFIG_FEATURE_SH_IS_NONE is not set +CONFIG_ASH=y + +# +# Ash Shell Options +# +CONFIG_ASH_JOB_CONTROL=y +CONFIG_ASH_ALIAS=y +CONFIG_ASH_MATH_SUPPORT=y +# CONFIG_ASH_MATH_SUPPORT_64 is not set +CONFIG_ASH_GETOPTS=y +# CONFIG_ASH_CMDCMD is not set +# CONFIG_ASH_MAIL is not set +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +# CONFIG_ASH_RANDOM_SUPPORT is not set +# CONFIG_HUSH is not set +# CONFIG_LASH is not set +# CONFIG_MSH is not set + +# +# Bourne Shell Options +# +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE_SHELL is not set +CONFIG_FEATURE_COMMAND_EDITING=y +CONFIG_FEATURE_COMMAND_HISTORY=63 +# CONFIG_FEATURE_COMMAND_SAVEHISTORY is not set +CONFIG_FEATURE_COMMAND_TAB_COMPLETION=y +# CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set +CONFIG_FEATURE_SH_FANCY_PROMPT=y + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +# CONFIG_FEATURE_ROTATE_LOGFILE is not set +CONFIG_FEATURE_REMOTE_LOG=y +CONFIG_FEATURE_IPC_SYSLOG=y +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 +CONFIG_LOGREAD=y +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +CONFIG_KLOGD=y +CONFIG_LOGGER=y + +# +# Linux System Utilities +# +CONFIG_DMESG=y +CONFIG_FBSET=y +CONFIG_FEATURE_FBSET_FANCY=y +# CONFIG_FEATURE_FBSET_READMODE is not set +# CONFIG_FDFLUSH is not set +# CONFIG_FDFORMAT is not set +CONFIG_FDISK=y +FDISK_SUPPORT_LARGE_DISKS=y +CONFIG_FEATURE_FDISK_WRITABLE=y +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +# CONFIG_FREERAMDISK is not set +CONFIG_FSCK_MINIX=y +CONFIG_MKFS_MINIX=y + +# +# Minix filesystem support +# +CONFIG_FEATURE_MINIX2=y +# CONFIG_GETOPT is not set +CONFIG_HEXDUMP=y +CONFIG_HWCLOCK=y +CONFIG_FEATURE_HWCLOCK_LONGOPTIONS=y +CONFIG_LOSETUP=y +CONFIG_MKSWAP=y +CONFIG_MORE=y +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_PIVOT_ROOT=y +# CONFIG_RDATE is not set +CONFIG_SWAPONOFF=y +CONFIG_MOUNT=y +CONFIG_NFSMOUNT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_MOUNT_FORCE=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set + +# +# Debugging Options +# +# CONFIG_DEBUG is not set diff --git a/openembedded/packages/busybox/busybox-1.00/dhcp-hostname.patch b/openembedded/packages/busybox/busybox-1.00/dhcp-hostname.patch new file mode 100644 index 0000000000..5eb77a8e10 --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.00/dhcp-hostname.patch @@ -0,0 +1,25 @@ +--- busybox/networking/udhcp/dhcpc.c 2005-05-25 11:49:24.000000000 +0100 ++++ busybox/networking/udhcp/dhcpc.c 2005-05-25 12:54:30.000000000 +0100 +@@ -193,6 +193,7 @@ + long now; + int max_fd; + int sig; ++ char hostbuf[256]; /* SUSv2: hostnames are <= 255 bytes */ + + static const struct option arg_options[] = { + {"clientid", required_argument, 0, 'c'}, +@@ -211,6 +212,14 @@ + {0, 0, 0, 0} + }; + ++ if (gethostname (hostbuf, sizeof (hostbuf)) == 0) { ++ len = strlen (hostbuf); ++ client_config.hostname = xmalloc (len + 2); ++ client_config.hostname[OPT_CODE] = DHCP_HOST_NAME; ++ client_config.hostname[OPT_LEN] = len; ++ strncpy(client_config.hostname + 2, hostbuf, len); ++ } ++ + /* get options */ + while (1) { + int option_index = 0; diff --git a/openembedded/packages/busybox/busybox-1.00/dhcpretrytime.patch b/openembedded/packages/busybox/busybox-1.00/dhcpretrytime.patch new file mode 100644 index 0000000000..c55a38552f --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.00/dhcpretrytime.patch @@ -0,0 +1,81 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- busybox-1.00-rc3/networking/udhcp/dhcpc.c~dhcpretrytime ++++ busybox-1.00-rc3/networking/udhcp/dhcpc.c +@@ -48,6 +48,7 @@ + static unsigned long requested_ip; /* = 0 */ + static unsigned long server_addr; + static unsigned long timeout; ++static unsigned long retrytime = 60; + static int packet_num; /* = 0 */ + static int fd = -1; + +@@ -90,6 +91,7 @@ + " -r, --request=IP IP address to request (default: none)\n" + " -s, --script=file Run file at dhcp events (default:\n" + " " DEFAULT_SCRIPT ")\n" ++" -t, --retrytime time to retry DHCP request (default 60s)\n") + " -v, --version Display version\n" + ); + exit(0); +@@ -204,6 +206,7 @@ + {"quit", no_argument, 0, 'q'}, + {"request", required_argument, 0, 'r'}, + {"script", required_argument, 0, 's'}, ++ {"retrytime", required_argument, 0, 't'}, + {"version", no_argument, 0, 'v'}, + {0, 0, 0, 0} + }; +@@ -211,7 +214,7 @@ + /* get options */ + while (1) { + int option_index = 0; +- c = getopt_long(argc, argv, "c:fbH:h:i:np:qr:s:v", arg_options, &option_index); ++ c = getopt_long(argc, argv, "c:fbH:h:i:np:qr:s:t:v", arg_options, &option_index); + if (c == -1) break; + + switch (c) { +@@ -257,6 +260,9 @@ + case 's': + client_config.script = optarg; + break; ++ case 't': ++ retrytime = atol(optarg); ++ break; + case 'v': + printf("udhcpcd, version %s\n\n", VERSION); + return 0; +@@ -335,7 +341,7 @@ + } + /* wait to try again */ + packet_num = 0; +- timeout = now + 60; ++ timeout = now + retrytime; + } + break; + case RENEW_REQUESTED: +--- busybox-1.00-rc3/networking/ifupdown.c~dhcpretrytime ++++ busybox-1.00-rc3/networking/ifupdown.c +@@ -538,7 +538,7 @@ + static int dhcp_up(struct interface_defn_t *ifd, execfn *exec) + { + if (execable("/sbin/udhcpc")) { +- return( execute("udhcpc -n -p /var/run/udhcpc.%iface%.pid -i " ++ return( execute("udhcpc -b -p /var/run/udhcpc.%iface%.pid -i " + "%iface% [[-H %hostname%]] [[-c %clientid%]]", ifd, exec)); + } else if (execable("/sbin/pump")) { + return( execute("pump -i %iface% [[-h %hostname%]] [[-l %leasehours%]]", ifd, exec)); +@@ -558,8 +558,8 @@ + /* SIGUSR2 forces udhcpc to release the current lease and go inactive, + * and SIGTERM causes udhcpc to exit. Signals are queued and processed + * sequentially so we don't need to sleep */ +- result = execute("kill -USR2 `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec); +- result += execute("kill -TERM `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec); ++ result = execute("kill -USR2 `cat /var/run/udhcpc.%iface%.pid 2>/dev/null` 2>/dev/null", ifd, exec); ++ result += execute("kill -TERM `cat /var/run/udhcpc.%iface%.pid 2>/dev/null` 2>/dev/null", ifd, exec); + } else if (execable("/sbin/pump")) { + result = execute("pump -i %iface% -k", ifd, exec); + } else if (execable("/sbin/dhclient")) { diff --git a/openembedded/packages/busybox/busybox-1.00/fbset.patch b/openembedded/packages/busybox/busybox-1.00/fbset.patch new file mode 100644 index 0000000000..d0609ce6f7 --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.00/fbset.patch @@ -0,0 +1,24 @@ +--- busybox/util-linux/fbset.c~ 2004-07-03 16:24:23.000000000 +0100 ++++ busybox/util-linux/fbset.c 2004-12-30 20:09:26.000000000 +0000 +@@ -337,7 +337,7 @@ + { + struct fb_var_screeninfo var, varset; + int fh, i; +- char *fbdev = DEFAULTFBDEV; ++ char *fbdev = NULL; + char *modefile = DEFAULTFBMODE; + char *thisarg, *mode = NULL; + +@@ -404,7 +404,12 @@ + } + } + ++ if (fbdev == NULL) ++ fbdev = DEFAULTFBDEV; + if ((fh = open(fbdev, O_RDONLY)) < 0) ++#ifdef CONFIG_FEATURE_DEVFS ++ if ((fh = open("/dev/fb0", O_RDONLY)) < 0) ++#endif + bb_perror_msg_and_die("fbset(open)"); + if (ioctl(fh, FBIOGET_VSCREENINFO, &var)) + bb_perror_msg_and_die("fbset(ioctl)"); diff --git a/openembedded/packages/busybox/busybox-1.00/gzip-spurious-const.patch b/openembedded/packages/busybox/busybox-1.00/gzip-spurious-const.patch new file mode 100644 index 0000000000..114a284e99 --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.00/gzip-spurious-const.patch @@ -0,0 +1,11 @@ +--- busybox-1.00/archival/gzip.c.old 2005-06-05 22:57:32.000000000 +0100 ++++ busybox-1.00/archival/gzip.c 2005-06-05 22:57:38.000000000 +0100 +@@ -2162,7 +2162,7 @@ + * Construct the Huffman tree for the bit lengths and return the index in + * bl_order of the last bit length code to send. + */ +-static const int build_bl_tree() ++static int build_bl_tree() + { + int max_blindex; /* index of last bit length code of non zero freq */ + diff --git a/openembedded/packages/busybox/busybox-1.00/hdparm_M.patch b/openembedded/packages/busybox/busybox-1.00/hdparm_M.patch new file mode 100644 index 0000000000..170906535e --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.00/hdparm_M.patch @@ -0,0 +1,47 @@ +diff -Naur busybox-1.00/miscutils/hdparm.c busybox-1.00-patched/miscutils/hdparm.c +--- busybox-1.00/miscutils/hdparm.c 2004-07-21 00:53:59.000000000 +0200 ++++ busybox-1.00-patched/miscutils/hdparm.c 2004-10-21 15:17:13.000000000 +0200 +@@ -1254,6 +1254,7 @@ + static unsigned long set_sleepnow = 0, get_sleepnow = 0; + static unsigned long get_powermode = 0; + static unsigned long set_apmmode = 0, get_apmmode= 0, apmmode = 0; ++static unsigned long set_acoustic = 0, get_acoustic = 0, acoustic = 0; + #endif + #ifdef CONFIG_FEATURE_HDPARM_GET_IDENTITY + static int get_IDentity = 0; +@@ -2123,6 +2124,20 @@ + } + bb_ioctl(fd, HDIO_DRIVE_CMD, &args,"HDIO_DRIVE_CMD"); + } ++ if (set_acoustic) ++ { ++ no_scsi(); ++ acoustic=check_if_min_and_set_val(acoustic,0); ++ acoustic=check_if_maj_and_set_val(acoustic,254); ++ if_printf(get_acoustic," setting AAM level to 0x%02lX (%ld)\n", acoustic, acoustic); ++ bb_ioctl(fd, HDIO_SET_ACOUSTIC, (int*)acoustic,"HDIO_SET_ACOUSTIC"); ++ } ++ if (get_acoustic) ++ { ++ no_scsi(); ++ bb_ioctl(fd, HDIO_GET_ACOUSTIC, (unsigned long*)&parm,"HDIO_GET_ACOUSTIC"); ++ printf(" acoustic = %2ld (128=quiet ... 254=fast)\n", parm); ++ } + if (set_wcache) + { + #ifdef DO_FLUSHCACHE +@@ -2831,6 +2846,13 @@ + p = *argv++, --argc; + p=GET_NUMBER(p,&set_readahead,&Xreadahead); + break; ++ case 'M': ++ get_acoustic = noisy; ++ noisy = 1; ++ if (!*p && argc && isalnum(**argv)) ++ p = *argv++, --argc; ++ p=GET_NUMBER(p,&set_acoustic,&acoustic); ++ break; + case 'B': + get_apmmode = noisy; + noisy = 1; + diff --git a/openembedded/packages/busybox/busybox-1.00/ifupdown-spurious-environ.patch b/openembedded/packages/busybox/busybox-1.00/ifupdown-spurious-environ.patch new file mode 100644 index 0000000000..8753315f2c --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.00/ifupdown-spurious-environ.patch @@ -0,0 +1,12 @@ +--- busybox-1.00/networking/ifupdown.c.old 2005-06-11 19:51:59.000000000 +0100 ++++ busybox-1.00/networking/ifupdown.c 2005-06-11 19:52:19.000000000 +0100 +@@ -148,6 +148,9 @@ + struct mapping_defn_t *mappings; + }; + ++/* XXX */ ++#define environ local_environ ++ + static char no_act = 0; + static char verbose = 0; + static char **environ = NULL; diff --git a/openembedded/packages/busybox/busybox-1.00/iproute-flush-cache.patch b/openembedded/packages/busybox/busybox-1.00/iproute-flush-cache.patch new file mode 100644 index 0000000000..f8becc3390 --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.00/iproute-flush-cache.patch @@ -0,0 +1,23 @@ +Index: networking/libiproute/iproute.c +=================================================================== +RCS file: /var/cvs/busybox/networking/libiproute/iproute.c,v +retrieving revision 1.14 +diff -u -r1.14 iproute.c +--- networking/libiproute/iproute.c 11 Aug 2004 08:10:58 -0000 1.14 ++++ networking/libiproute/iproute.c 30 Nov 2004 20:43:44 -0000 +@@ -537,6 +537,15 @@ + } else if (matches(*argv, "match") == 0) { + NEXT_ARG(); + get_prefix(&filter.mdst, *argv, do_ipv6); ++ } else if (matches(*argv, "table") == 0) { ++ NEXT_ARG(); ++ if (matches(*argv, "cache") == 0) { ++ filter.tb = -1; ++ } else if (matches(*argv, "main") != 0) { ++ invarg("invalid \"table\"", *argv); ++ } ++ } else if (matches(*argv, "cache") == 0) { ++ filter.tb = -1; + } else { + if (matches(*argv, "exact") == 0) { + NEXT_ARG(); diff --git a/openembedded/packages/busybox/busybox-1.00/mount-all-type.patch b/openembedded/packages/busybox/busybox-1.00/mount-all-type.patch new file mode 100644 index 0000000000..476094a804 --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.00/mount-all-type.patch @@ -0,0 +1,84 @@ +--- busybox-1.00/.pc/mount-all-type.patch/util-linux/mount.c 2004-08-02 17:14:02.000000000 -0700 ++++ busybox-1.00/util-linux/mount.c 2005-05-13 00:17:19.054232796 -0700 +@@ -364,6 +364,56 @@ + exit(EXIT_SUCCESS); + } + ++/* Does this file system type, from /etc/fstab, match the given ++ * -t option value? ++ */ ++static int match_fs(const char *option, const char *type) ++{ ++ const int len = strlen(type); ++ const int no = option[0] == 'n' && option[1] == 'o'; ++ const char *optp = option; ++ ++ if (len > 0) do { ++ const char *match = strstr(optp, type); ++ ++ if (match == NULL) { ++ /* No match, but if the option string starts 'no' no match ++ * means yes. ++ */ ++ return no; ++ } ++ ++ /* Match, may be partial, check for end-of-type in option string. */ ++ if (match[len] == 0 || match[len] == ',') { ++ /* Ok, check for type or notype. */ ++ if (match == option) { ++ /* Exact match at start (can't be 'no') */ ++ return 1; ++ } ++ if (match > option+1) { ++ if (match[-1] == ',') { ++ /* Exact match in middle, might be 'no' */ ++ return !no; ++ } ++ if (match == option+2 && no) { ++ /* Exact match to 'notype' at start. */ ++ return 0; ++ } ++ if (match > option+2 && match[-3] == ',' && ++ match[-2] == 'n' && match[-1] == 'o') { ++ return 0; ++ } ++ } ++ } ++ ++ /* Look for another match. */ ++ optp = match+1; ++ } while (1); ++ ++ /* zero length type in fstab (impossible?), don't match it. */ ++ return 0; ++} ++ + extern int mount_main(int argc, char **argv) + { + struct stat statbuf; +@@ -371,6 +421,7 @@ + char *extra_opts; + int flags = 0; + char *filesystemType = "auto"; ++ char *filesystemOption = 0; + int got_filesystemType = 0; + char *device = xmalloc(PATH_MAX); + char *directory = xmalloc(PATH_MAX); +@@ -393,6 +444,7 @@ + break; + case 't': + filesystemType = optarg; ++ filesystemOption = optarg; + got_filesystemType = 1; + break; + case 'w': +@@ -460,6 +512,8 @@ + + strcpy(device, m->mnt_fsname); + strcpy(directory, m->mnt_dir); ++ if (all && filesystemOption != 0 && !match_fs(filesystemOption, m->mnt_type)) ++ continue; + filesystemType = bb_xstrdup(m->mnt_type); + singlemount: + extra_opts = string_flags; diff --git a/openembedded/packages/busybox/busybox-1.00/nylon/defconfig b/openembedded/packages/busybox/busybox-1.00/nylon/defconfig new file mode 100644 index 0000000000..599051bafb --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.00/nylon/defconfig @@ -0,0 +1,458 @@ +# +# Automatically generated make config: don't edit +# +HAVE_DOT_CONFIG=y + +# +# General Configuration +# +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_FEATURE_VERBOSE_USAGE=y +# CONFIG_FEATURE_INSTALLER is not set +# CONFIG_LOCALE_SUPPORT is not set +CONFIG_FEATURE_DEVFS=y +CONFIG_FEATURE_DEVPTS=y +# CONFIG_FEATURE_CLEAN_UP is not set +CONFIG_FEATURE_SUID=y +CONFIG_FEATURE_SUID_CONFIG=y +CONFIG_FEATURE_SUID_CONFIG_QUIET=y +# CONFIG_SELINUX is not set + +# +# Build Options +# +# CONFIG_STATIC is not set +# CONFIG_LFS is not set +# USING_CROSS_COMPILER is not set +EXTRA_CFLAGS_OPTIONS="" + +# +# Installation Options +# +# CONFIG_INSTALL_NO_USR is not set +PREFIX="./_install" + +# +# Archival Utilities +# +CONFIG_AR=y +CONFIG_FEATURE_AR_LONG_FILENAMES=y +CONFIG_BUNZIP2=y +CONFIG_CPIO=y +CONFIG_DPKG=y +CONFIG_DPKG_DEB=y +# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set +CONFIG_GUNZIP=y +CONFIG_FEATURE_GUNZIP_UNCOMPRESS=y +CONFIG_GZIP=y +# CONFIG_RPM2CPIO is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +CONFIG_FEATURE_TAR_BZIP2=y +CONFIG_FEATURE_TAR_FROM=y +CONFIG_FEATURE_TAR_GZIP=y +CONFIG_FEATURE_TAR_COMPRESS=y +CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY=y +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +CONFIG_FEATURE_TAR_LONG_OPTIONS=y +CONFIG_UNCOMPRESS=y +CONFIG_UNZIP=y + +# +# Common options for cpio and tar +# +# CONFIG_FEATURE_UNARCHIVE_TAPE is not set + +# +# Common options for dpkg and dpkg_deb +# +CONFIG_FEATURE_DEB_TAR_GZ=y +CONFIG_FEATURE_DEB_TAR_BZ2=y + +# +# Coreutils +# +CONFIG_BASENAME=y +CONFIG_CAL=y +CONFIG_CAT=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +CONFIG_CHROOT=y +CONFIG_CMP=y +CONFIG_CP=y +CONFIG_CUT=y +CONFIG_DATE=y + +# +# date (forced enabled for use with watch) +# +CONFIG_FEATURE_DATE_ISOFMT=y +CONFIG_DD=y +CONFIG_DF=y +CONFIG_DIRNAME=y +CONFIG_DOS2UNIX=y +CONFIG_UNIX2DOS=y +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +CONFIG_EXPR=y +CONFIG_FALSE=y +CONFIG_FOLD=y +CONFIG_HEAD=y +CONFIG_FEATURE_FANCY_HEAD=y +CONFIG_HOSTID=y +CONFIG_ID=y +CONFIG_INSTALL=y +CONFIG_LENGTH=y +CONFIG_LN=y +CONFIG_LOGNAME=y +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +CONFIG_OD=y +CONFIG_PRINTF=y +CONFIG_PWD=y +CONFIG_REALPATH=y +CONFIG_RM=y +CONFIG_RMDIR=y +CONFIG_SEQ=y +CONFIG_SHA1SUM=y +CONFIG_SLEEP=y +CONFIG_FEATURE_FANCY_SLEEP=y +CONFIG_SORT=y +CONFIG_STTY=y +CONFIG_SYNC=y +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +CONFIG_FEATURE_TEE_USE_BLOCK_IO=y +# CONFIG_TEST is not set +CONFIG_TOUCH=y +CONFIG_TR=y +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +CONFIG_UNIQ=y +CONFIG_USLEEP=y +CONFIG_UUDECODE=y +CONFIG_UUENCODE=y +CONFIG_WATCH=y +CONFIG_WC=y +CONFIG_WHO=y +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options for cp and mv +# +# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set + +# +# Common options for ls and more +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum +# +CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y + +# +# Console Utilities +# +# CONFIG_CHVT is not set +CONFIG_CLEAR=y +# CONFIG_DEALLOCVT is not set +CONFIG_DUMPKMAP=y +CONFIG_GETKEY=y +# CONFIG_LOADFONT is not set +CONFIG_LOADKMAP=y +# CONFIG_OPENVT is not set +CONFIG_RESET=y +CONFIG_SETKEYCODES=y + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +CONFIG_PIPE_PROGRESS=y +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_RUN_PARTS=y +CONFIG_START_STOP_DAEMON=y +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_AWK=y +CONFIG_FEATURE_AWK_MATH=y +CONFIG_PATCH=y +CONFIG_SED=y +CONFIG_VI=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +CONFIG_FEATURE_VI_USE_SIGNALS=y +CONFIG_FEATURE_VI_DOT_CMD=y +CONFIG_FEATURE_VI_READONLY=y +CONFIG_FEATURE_VI_SETOPTS=y +CONFIG_FEATURE_VI_SET=y +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y + +# +# Finding Utilities +# +CONFIG_FIND=y +CONFIG_FEATURE_FIND_MTIME=y +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +CONFIG_FEATURE_FIND_NEWER=y +CONFIG_FEATURE_FIND_INUM=y +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y +CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y +CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y + +# +# Init Utilities +# +# CONFIG_INIT is not set +# CONFIG_HALT is not set +# CONFIG_POWEROFF is not set +# CONFIG_REBOOT is not set +# CONFIG_MESG is not set + +# +# Login/Password Management Utilities +# +# CONFIG_USE_BB_PWD_GRP is not set +# CONFIG_ADDGROUP is not set +# CONFIG_DELGROUP is not set +# CONFIG_ADDUSER is not set +# CONFIG_DELUSER is not set +# CONFIG_GETTY is not set +CONFIG_FEATURE_U_W_TMP=y +# CONFIG_LOGIN is not set +# CONFIG_PASSWD is not set +# CONFIG_SU is not set +# CONFIG_SULOGIN is not set +# CONFIG_VLOCK is not set + +# +# Miscellaneous Utilities +# +# CONFIG_ADJTIMEX is not set +CONFIG_CROND=y +# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set +CONFIG_CRONTAB=y +CONFIG_DC=y +# CONFIG_DEVFSD is not set +# CONFIG_LAST is not set +# CONFIG_HDPARM is not set +# CONFIG_MAKEDEVS is not set +# CONFIG_MT is not set +# CONFIG_RX is not set +CONFIG_STRINGS=y +CONFIG_TIME=y +CONFIG_WATCHDOG=y + +# +# Linux Module Utilities +# +# CONFIG_INSMOD is not set +# CONFIG_LSMOD is not set +# CONFIG_MODPROBE is not set +# CONFIG_RMMOD is not set + +# +# Networking Utilities +# +CONFIG_FEATURE_IPV6=y +CONFIG_ARPING=y +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +CONFIG_HOSTNAME=y +CONFIG_HTTPD=y +# CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY is not set +CONFIG_FEATURE_HTTPD_BASIC_AUTH=y +CONFIG_FEATURE_HTTPD_AUTH_MD5=y +CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP=y +CONFIG_FEATURE_HTTPD_SETUID=y +CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES=y +CONFIG_FEATURE_HTTPD_CGI=y +CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y +CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +# CONFIG_FEATURE_IFCONFIG_SLIP is not set +CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y +CONFIG_FEATURE_IFCONFIG_HW=y +CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y +CONFIG_IFUPDOWN=y +# CONFIG_FEATURE_IFUPDOWN_IP is not set +CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y +CONFIG_FEATURE_IFUPDOWN_IPV4=y +CONFIG_FEATURE_IFUPDOWN_IPV6=y +# CONFIG_FEATURE_IFUPDOWN_IPX is not set +CONFIG_FEATURE_IFUPDOWN_MAPPING=y +CONFIG_INETD=y +CONFIG_FEATURE_INETD_SUPPORT_BILTIN_ECHO=y +CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DISCARD=y +CONFIG_FEATURE_INETD_SUPPORT_BILTIN_TIME=y +CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DAYTIME=y +CONFIG_FEATURE_INETD_SUPPORT_BILTIN_CHARGEN=y +# CONFIG_IP is not set +CONFIG_IPCALC=y +CONFIG_FEATURE_IPCALC_FANCY=y +# CONFIG_IPADDR is not set +# CONFIG_IPLINK is not set +# CONFIG_IPROUTE is not set +# CONFIG_IPTUNNEL is not set +CONFIG_NAMEIF=y +CONFIG_NC=y +CONFIG_NETSTAT=y +CONFIG_NSLOOKUP=y +CONFIG_PING=y +CONFIG_FEATURE_FANCY_PING=y +CONFIG_PING6=y +CONFIG_FEATURE_FANCY_PING6=y +CONFIG_ROUTE=y +CONFIG_TELNET=y +CONFIG_FEATURE_TELNET_TTYPE=y +CONFIG_FEATURE_TELNET_AUTOLOGIN=y +# CONFIG_TELNETD is not set +CONFIG_TFTP=y +CONFIG_FEATURE_TFTP_GET=y +CONFIG_FEATURE_TFTP_PUT=y +CONFIG_FEATURE_TFTP_BLOCKSIZE=y +# CONFIG_FEATURE_TFTP_DEBUG is not set +CONFIG_TRACEROUTE=y +CONFIG_FEATURE_TRACEROUTE_VERBOSE=y +CONFIG_VCONFIG=y +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_IP6_LITERAL=y + +# +# udhcp Server/Client +# +CONFIG_UDHCPD=y +CONFIG_UDHCPC=y +CONFIG_DUMPLEASES=y +CONFIG_FEATURE_UDHCP_SYSLOG=y +# CONFIG_FEATURE_UDHCP_DEBUG is not set + +# +# Process Utilities +# +CONFIG_FREE=y +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_PIDOF=y +CONFIG_PS=y +CONFIG_RENICE=y +CONFIG_TOP=y +FEATURE_CPU_USAGE_PERCENTAGE=y +CONFIG_UPTIME=y +CONFIG_SYSCTL=y + +# +# Another Bourne-like Shell +# +# CONFIG_FEATURE_SH_IS_ASH is not set +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_LASH is not set +# CONFIG_FEATURE_SH_IS_MSH is not set +CONFIG_FEATURE_SH_IS_NONE=y +# CONFIG_ASH is not set +# CONFIG_HUSH is not set +# CONFIG_LASH is not set +# CONFIG_MSH is not set + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +CONFIG_FEATURE_ROTATE_LOGFILE=y +CONFIG_FEATURE_REMOTE_LOG=y +CONFIG_FEATURE_IPC_SYSLOG=y +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 +CONFIG_LOGREAD=y +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +CONFIG_KLOGD=y +CONFIG_LOGGER=y + +# +# Linux System Utilities +# +CONFIG_DMESG=y +CONFIG_FBSET=y +CONFIG_FEATURE_FBSET_FANCY=y +CONFIG_FEATURE_FBSET_READMODE=y +# CONFIG_FDFLUSH is not set +# CONFIG_FDFORMAT is not set +CONFIG_FDISK=y +FDISK_SUPPORT_LARGE_DISKS=y +CONFIG_FEATURE_FDISK_WRITABLE=y +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +CONFIG_FREERAMDISK=y +# CONFIG_FSCK_MINIX is not set +# CONFIG_MKFS_MINIX is not set +# CONFIG_GETOPT is not set +CONFIG_HEXDUMP=y +# CONFIG_HWCLOCK is not set +CONFIG_LOSETUP=y +CONFIG_MKSWAP=y +# CONFIG_MORE is not set +CONFIG_PIVOT_ROOT=y +# CONFIG_RDATE is not set +CONFIG_SWAPONOFF=y +CONFIG_MOUNT=y +CONFIG_NFSMOUNT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_MOUNT_FORCE=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set + +# +# Debugging Options +# +# CONFIG_DEBUG is not set diff --git a/openembedded/packages/busybox/busybox-1.00/openmn/defconfig b/openembedded/packages/busybox/busybox-1.00/openmn/defconfig new file mode 100644 index 0000000000..f98af91853 --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.00/openmn/defconfig @@ -0,0 +1,475 @@ +# +# Automatically generated make config: don't edit +# +HAVE_DOT_CONFIG=y + +# +# General Configuration +# +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +# CONFIG_FEATURE_VERBOSE_USAGE is not set +# CONFIG_FEATURE_INSTALLER is not set +# CONFIG_LOCALE_SUPPORT is not set +CONFIG_FEATURE_DEVFS=y +CONFIG_FEATURE_DEVPTS=y +# CONFIG_FEATURE_CLEAN_UP is not set +# CONFIG_FEATURE_SUID is not set +# CONFIG_FEATURE_SUID_CONFIG is not set +# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set +# CONFIG_SELINUX is not set + +# +# Build Options +# +# CONFIG_STATIC is not set +# CONFIG_LFS is not set +# USING_CROSS_COMPILER is not set +EXTRA_CFLAGS_OPTIONS="" + +# +# Installation Options +# +# CONFIG_INSTALL_NO_USR is not set +PREFIX="./_install" + +# +# Archival Utilities +# +CONFIG_AR=y +# CONFIG_FEATURE_AR_LONG_FILENAMES is not set +CONFIG_BUNZIP2=y +CONFIG_CPIO=y +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +CONFIG_GUNZIP=y +# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set +CONFIG_GZIP=y +# CONFIG_RPM2CPIO is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +CONFIG_FEATURE_TAR_BZIP2=y +CONFIG_FEATURE_TAR_FROM=y +CONFIG_FEATURE_TAR_GZIP=y +# CONFIG_FEATURE_TAR_COMPRESS is not set +CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY=y +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set +# CONFIG_UNCOMPRESS is not set +CONFIG_UNZIP=y + +# +# Common options for cpio and tar +# +# CONFIG_FEATURE_UNARCHIVE_TAPE is not set + +# +# Coreutils +# +CONFIG_BASENAME=y +# CONFIG_CAL is not set +CONFIG_CAT=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +CONFIG_CHROOT=y +CONFIG_CMP=y +CONFIG_CP=y +CONFIG_CUT=y +CONFIG_DATE=y + +# +# date (forced enabled for use with watch) +# +CONFIG_FEATURE_DATE_ISOFMT=y +CONFIG_DD=y +CONFIG_DF=y +CONFIG_DIRNAME=y +# CONFIG_DOS2UNIX is not set +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +CONFIG_EXPR=y +CONFIG_FALSE=y +# CONFIG_FOLD is not set +CONFIG_HEAD=y +# CONFIG_FEATURE_FANCY_HEAD is not set +# CONFIG_HOSTID is not set +CONFIG_ID=y +# CONFIG_INSTALL is not set +# CONFIG_LENGTH is not set +CONFIG_LN=y +CONFIG_LOGNAME=y +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +# CONFIG_FEATURE_LS_COLOR is not set +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +CONFIG_OD=y +CONFIG_PRINTF=y +CONFIG_PWD=y +# CONFIG_REALPATH is not set +CONFIG_RM=y +CONFIG_RMDIR=y +CONFIG_SEQ=y +# CONFIG_SHA1SUM is not set +CONFIG_SLEEP=y +# CONFIG_FEATURE_FANCY_SLEEP is not set +CONFIG_SORT=y +CONFIG_STTY=y +CONFIG_SYNC=y +CONFIG_TAIL=y +# CONFIG_FEATURE_FANCY_TAIL is not set +CONFIG_TEE=y +# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set +CONFIG_TEST=y + +# +# test (forced enabled for use with shell) +# +# CONFIG_FEATURE_TEST_64 is not set +CONFIG_TOUCH=y +CONFIG_TR=y +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +CONFIG_UNIQ=y +CONFIG_USLEEP=y +# CONFIG_UUDECODE is not set +# CONFIG_UUENCODE is not set +CONFIG_WATCH=y +CONFIG_WC=y +CONFIG_WHO=y +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options for cp and mv +# +# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set + +# +# Common options for ls and more +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum +# +# CONFIG_FEATURE_MD5_SHA1_SUM_CHECK is not set + +# +# Console Utilities +# +CONFIG_CHVT=y +CONFIG_CLEAR=y +CONFIG_DEALLOCVT=y +CONFIG_DUMPKMAP=y +CONFIG_GETKEY=y +CONFIG_LOADFONT=y +CONFIG_LOADKMAP=y +CONFIG_OPENVT=y +CONFIG_RESET=y +CONFIG_SETKEYCODES=y + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +# CONFIG_PIPE_PROGRESS is not set +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_RUN_PARTS=y +CONFIG_START_STOP_DAEMON=y +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_AWK=y +CONFIG_FEATURE_AWK_MATH=y +# CONFIG_PATCH is not set +CONFIG_SED=y +CONFIG_VI=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +CONFIG_FEATURE_VI_USE_SIGNALS=y +# CONFIG_FEATURE_VI_DOT_CMD is not set +# CONFIG_FEATURE_VI_READONLY is not set +# CONFIG_FEATURE_VI_SETOPTS is not set +# CONFIG_FEATURE_VI_SET is not set +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y + +# +# Finding Utilities +# +CONFIG_FIND=y +CONFIG_FEATURE_FIND_MTIME=y +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +CONFIG_FEATURE_FIND_NEWER=y +# CONFIG_FEATURE_FIND_INUM is not set +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set +# CONFIG_FEATURE_XARGS_SUPPORT_QUOTES is not set +# CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT is not set +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y + +# +# Init Utilities +# +# CONFIG_INIT is not set +# CONFIG_HALT is not set +# CONFIG_POWEROFF is not set +# CONFIG_REBOOT is not set +# CONFIG_MESG is not set + +# +# Login/Password Management Utilities +# +# CONFIG_USE_BB_PWD_GRP is not set +CONFIG_ADDGROUP=y +CONFIG_DELGROUP=y +CONFIG_ADDUSER=y +CONFIG_DELUSER=y +CONFIG_GETTY=y +CONFIG_FEATURE_U_W_TMP=y +CONFIG_LOGIN=y +# CONFIG_FEATURE_SECURETTY is not set +CONFIG_PASSWD=y +CONFIG_SU=y +CONFIG_SULOGIN=y +CONFIG_VLOCK=y + +# +# Common options for adduser, deluser, login, su +# +CONFIG_FEATURE_SHADOWPASSWDS=y + +# +# Miscellaneous Utilities +# +# CONFIG_ADJTIMEX is not set +# CONFIG_CROND is not set +# CONFIG_CRONTAB is not set +CONFIG_DC=y +# CONFIG_DEVFSD is not set +# CONFIG_LAST is not set +# CONFIG_HDPARM is not set +# CONFIG_MAKEDEVS is not set +# CONFIG_MT is not set +# CONFIG_RX is not set +CONFIG_STRINGS=y +CONFIG_TIME=y +# CONFIG_WATCHDOG is not set + +# +# Linux Module Utilities +# +CONFIG_INSMOD=y +CONFIG_FEATURE_2_4_MODULES=y +CONFIG_FEATURE_2_6_MODULES=y +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS=y +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +CONFIG_FEATURE_INSMOD_LOAD_MAP=y +CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL=y +CONFIG_LSMOD=y +CONFIG_MODPROBE=y +CONFIG_RMMOD=y +# CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set + +# +# Networking Utilities +# +# CONFIG_FEATURE_IPV6 is not set +CONFIG_ARPING=y +# CONFIG_FTPGET is not set +CONFIG_FTPPUT=y +CONFIG_HOSTNAME=y +# CONFIG_HTTPD is not set +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +# CONFIG_FEATURE_IFCONFIG_SLIP is not set +# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set +CONFIG_FEATURE_IFCONFIG_HW=y +# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set +CONFIG_IFUPDOWN=y +# CONFIG_FEATURE_IFUPDOWN_IP is not set +CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y +CONFIG_FEATURE_IFUPDOWN_IPV4=y +# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set +# CONFIG_FEATURE_IFUPDOWN_IPX is not set +# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set +# CONFIG_INETD is not set +CONFIG_IP=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +# CONFIG_FEATURE_IP_TUNNEL is not set +# CONFIG_IPCALC is not set +# CONFIG_IPADDR is not set +# CONFIG_IPLINK is not set +# CONFIG_IPROUTE is not set +# CONFIG_IPTUNNEL is not set +# CONFIG_NAMEIF is not set +CONFIG_NC=y +CONFIG_NETSTAT=y +CONFIG_NSLOOKUP=y +CONFIG_PING=y +CONFIG_FEATURE_FANCY_PING=y +CONFIG_ROUTE=y +CONFIG_TELNET=y +# CONFIG_FEATURE_TELNET_TTYPE is not set +# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set +# CONFIG_TELNETD is not set +# CONFIG_TFTP is not set +CONFIG_TRACEROUTE=y +# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set +# CONFIG_VCONFIG is not set +CONFIG_WGET=y +# CONFIG_FEATURE_WGET_STATUSBAR is not set +CONFIG_FEATURE_WGET_AUTHENTICATION=y +# CONFIG_FEATURE_WGET_IP6_LITERAL is not set + +# +# udhcp Server/Client +# +# CONFIG_UDHCPD is not set +CONFIG_UDHCPC=y +CONFIG_FEATURE_UDHCP_SYSLOG=y +# CONFIG_FEATURE_UDHCP_DEBUG is not set + +# +# Process Utilities +# +CONFIG_FREE=y +CONFIG_KILL=y +CONFIG_KILLALL=y +# CONFIG_PIDOF is not set +CONFIG_PS=y +CONFIG_RENICE=y +CONFIG_TOP=y +FEATURE_CPU_USAGE_PERCENTAGE=y +CONFIG_UPTIME=y +# CONFIG_SYSCTL is not set + +# +# Another Bourne-like Shell +# +CONFIG_FEATURE_SH_IS_ASH=y +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_LASH is not set +# CONFIG_FEATURE_SH_IS_MSH is not set +# CONFIG_FEATURE_SH_IS_NONE is not set +CONFIG_ASH=y + +# +# Ash Shell Options +# +CONFIG_ASH_JOB_CONTROL=y +CONFIG_ASH_ALIAS=y +CONFIG_ASH_MATH_SUPPORT=y +# CONFIG_ASH_MATH_SUPPORT_64 is not set +CONFIG_ASH_GETOPTS=y +# CONFIG_ASH_CMDCMD is not set +# CONFIG_ASH_MAIL is not set +# CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set +# CONFIG_ASH_RANDOM_SUPPORT is not set +# CONFIG_HUSH is not set +# CONFIG_LASH is not set +# CONFIG_MSH is not set + +# +# Bourne Shell Options +# +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE_SHELL is not set +CONFIG_FEATURE_COMMAND_EDITING=y +CONFIG_FEATURE_COMMAND_HISTORY=31 +# CONFIG_FEATURE_COMMAND_SAVEHISTORY is not set +CONFIG_FEATURE_COMMAND_TAB_COMPLETION=y +# CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set +CONFIG_FEATURE_SH_FANCY_PROMPT=y + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +# CONFIG_FEATURE_ROTATE_LOGFILE is not set +# CONFIG_FEATURE_REMOTE_LOG is not set +CONFIG_FEATURE_IPC_SYSLOG=y +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 +CONFIG_LOGREAD=y +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +CONFIG_KLOGD=y +CONFIG_LOGGER=y + +# +# Linux System Utilities +# +CONFIG_DMESG=y +# CONFIG_FBSET is not set +# CONFIG_FDFLUSH is not set +# CONFIG_FDFORMAT is not set +CONFIG_FDISK=y +# FDISK_SUPPORT_LARGE_DISKS is not set +CONFIG_FEATURE_FDISK_WRITABLE=y +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +# CONFIG_FREERAMDISK is not set +# CONFIG_FSCK_MINIX is not set +# CONFIG_MKFS_MINIX is not set +CONFIG_GETOPT=y +CONFIG_HEXDUMP=y +CONFIG_HWCLOCK=y +CONFIG_FEATURE_HWCLOCK_LONGOPTIONS=y +CONFIG_LOSETUP=y +CONFIG_MKSWAP=y +CONFIG_MORE=y +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_PIVOT_ROOT=y +# CONFIG_RDATE is not set +# CONFIG_SWAPONOFF is not set +CONFIG_MOUNT=y +CONFIG_NFSMOUNT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_MOUNT_FORCE=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set + +# +# Debugging Options +# +# CONFIG_DEBUG is not set diff --git a/openembedded/packages/busybox/busybox-1.00/openslug/defconfig b/openembedded/packages/busybox/busybox-1.00/openslug/defconfig new file mode 100644 index 0000000000..7debaeced2 --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.00/openslug/defconfig @@ -0,0 +1,461 @@ +# +# Automatically generated make config: don't edit +# +HAVE_DOT_CONFIG=y + +# +# General Configuration +# +# CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set +CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_FEATURE_VERBOSE_USAGE=y +# CONFIG_FEATURE_INSTALLER is not set +# CONFIG_LOCALE_SUPPORT is not set +CONFIG_FEATURE_DEVFS=y +CONFIG_FEATURE_DEVPTS=y +# CONFIG_FEATURE_CLEAN_UP is not set +# CONFIG_FEATURE_SUID is not set +# CONFIG_SELINUX is not set + +# +# Build Options +# +# CONFIG_STATIC is not set +CONFIG_LFS=y +# USING_CROSS_COMPILER is not set +EXTRA_CFLAGS_OPTIONS="" + +# +# Installation Options +# +# CONFIG_INSTALL_NO_USR is not set +PREFIX="./_install" + +# +# Archival Utilities +# +CONFIG_AR=y +# CONFIG_FEATURE_AR_LONG_FILENAMES is not set +CONFIG_BUNZIP2=y +# CONFIG_CPIO is not set +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +CONFIG_GUNZIP=y +# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set +CONFIG_GZIP=y +# CONFIG_RPM2CPIO is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +CONFIG_FEATURE_TAR_BZIP2=y +CONFIG_FEATURE_TAR_FROM=y +CONFIG_FEATURE_TAR_GZIP=y +# CONFIG_FEATURE_TAR_COMPRESS is not set +CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY=y +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set +# CONFIG_UNCOMPRESS is not set +CONFIG_UNZIP=y + +# +# Common options for cpio and tar +# +# CONFIG_FEATURE_UNARCHIVE_TAPE is not set + +# +# Coreutils +# +CONFIG_BASENAME=y +# CONFIG_CAL is not set +CONFIG_CAT=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +CONFIG_CHROOT=y +# CONFIG_CMP is not set +CONFIG_CP=y +CONFIG_CUT=y +CONFIG_DATE=y + +# +# date (forced enabled for use with watch) +# +# CONFIG_FEATURE_DATE_ISOFMT is not set +CONFIG_DD=y +CONFIG_DF=y +CONFIG_DIRNAME=y +# CONFIG_DOS2UNIX is not set +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +CONFIG_EXPR=y +CONFIG_FALSE=y +# CONFIG_FOLD is not set +CONFIG_HEAD=y +# CONFIG_FEATURE_FANCY_HEAD is not set +# CONFIG_HOSTID is not set +CONFIG_ID=y +# CONFIG_INSTALL is not set +# CONFIG_LENGTH is not set +CONFIG_LN=y +CONFIG_LOGNAME=y +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +CONFIG_OD=y +CONFIG_PRINTF=y +CONFIG_PWD=y +# CONFIG_REALPATH is not set +CONFIG_RM=y +CONFIG_RMDIR=y +CONFIG_SEQ=y +# CONFIG_SHA1SUM is not set +CONFIG_SLEEP=y +# CONFIG_FEATURE_FANCY_SLEEP is not set +CONFIG_SORT=y +CONFIG_STTY=y +CONFIG_SYNC=y +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set +CONFIG_TEST=y + +# +# test (forced enabled for use with shell) +# +# CONFIG_FEATURE_TEST_64 is not set +CONFIG_TOUCH=y +CONFIG_TR=y +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +CONFIG_UNIQ=y +# CONFIG_USLEEP is not set +# CONFIG_UUDECODE is not set +# CONFIG_UUENCODE is not set +CONFIG_WATCH=y +CONFIG_WC=y +CONFIG_WHO=y +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options for cp and mv +# +# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set + +# +# Common options for ls and more +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum +# +# CONFIG_FEATURE_MD5_SHA1_SUM_CHECK is not set + +# +# Console Utilities +# +CONFIG_CHVT=y +CONFIG_CLEAR=y +CONFIG_DEALLOCVT=y +CONFIG_DUMPKMAP=y +CONFIG_GETKEY=y +CONFIG_LOADFONT=y +CONFIG_LOADKMAP=y +CONFIG_OPENVT=y +CONFIG_RESET=y +# CONFIG_SETKEYCODES is not set + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +# CONFIG_PIPE_PROGRESS is not set +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_RUN_PARTS=y +CONFIG_START_STOP_DAEMON=y +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_AWK=y +CONFIG_FEATURE_AWK_MATH=y +# CONFIG_PATCH is not set +CONFIG_SED=y +CONFIG_VI=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +CONFIG_FEATURE_VI_USE_SIGNALS=y +# CONFIG_FEATURE_VI_DOT_CMD is not set +# CONFIG_FEATURE_VI_READONLY is not set +# CONFIG_FEATURE_VI_SETOPTS is not set +# CONFIG_FEATURE_VI_SET is not set +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y + +# +# Finding Utilities +# +# CONFIG_FIND is not set +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +# CONFIG_XARGS is not set + +# +# Init Utilities +# +# CONFIG_INIT is not set +# CONFIG_HALT is not set +# CONFIG_POWEROFF is not set +# CONFIG_REBOOT is not set +# CONFIG_MESG is not set + +# +# Login/Password Management Utilities +# +# CONFIG_USE_BB_PWD_GRP is not set +# CONFIG_ADDGROUP is not set +# CONFIG_DELGROUP is not set +# CONFIG_ADDUSER is not set +# CONFIG_DELUSER is not set +# CONFIG_GETTY is not set +CONFIG_FEATURE_U_W_TMP=y +# CONFIG_LOGIN is not set +# CONFIG_PASSWD is not set +# CONFIG_SU is not set +# CONFIG_SULOGIN is not set +# CONFIG_VLOCK is not set + +# +# Miscellaneous Utilities +# +# CONFIG_ADJTIMEX is not set +# CONFIG_CROND is not set +# CONFIG_CRONTAB is not set +CONFIG_DC=y +# CONFIG_DEVFSD is not set +# CONFIG_LAST is not set +# CONFIG_HDPARM is not set +# CONFIG_MAKEDEVS is not set +# CONFIG_MT is not set +# CONFIG_RX is not set +CONFIG_STRINGS=y +CONFIG_TIME=y +# CONFIG_WATCHDOG is not set + +# +# Linux Module Utilities +# +# CONFIG_INSMOD is not set +# CONFIG_LSMOD is not set +# CONFIG_MODPROBE is not set +# CONFIG_RMMOD is not set + +# +# Networking Utilities +# +CONFIG_FEATURE_IPV6=y +# CONFIG_ARPING is not set +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +CONFIG_HOSTNAME=y +# CONFIG_HTTPD is not set +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +# CONFIG_FEATURE_IFCONFIG_SLIP is not set +# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set +CONFIG_FEATURE_IFCONFIG_HW=y +# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set +CONFIG_IFUPDOWN=y +# CONFIG_FEATURE_IFUPDOWN_IP is not set +CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y +CONFIG_FEATURE_IFUPDOWN_IPV4=y +CONFIG_FEATURE_IFUPDOWN_IPV6=y +# CONFIG_FEATURE_IFUPDOWN_IPX is not set +# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set +# CONFIG_INETD is not set +CONFIG_IP=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +CONFIG_FEATURE_IP_TUNNEL=y +# CONFIG_IPCALC is not set +# CONFIG_IPADDR is not set +# CONFIG_IPLINK is not set +# CONFIG_IPROUTE is not set +# CONFIG_IPTUNNEL is not set +# CONFIG_NAMEIF is not set +CONFIG_NC=y +CONFIG_NETSTAT=y +CONFIG_NSLOOKUP=y +CONFIG_PING=y +CONFIG_FEATURE_FANCY_PING=y +CONFIG_PING6=y +CONFIG_FEATURE_FANCY_PING6=y +CONFIG_ROUTE=y +CONFIG_TELNET=y +# CONFIG_FEATURE_TELNET_TTYPE is not set +CONFIG_FEATURE_TELNET_AUTOLOGIN=y +# CONFIG_TELNETD is not set +CONFIG_TFTP=y +CONFIG_FEATURE_TFTP_GET=y +CONFIG_FEATURE_TFTP_PUT=y +# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set +# CONFIG_FEATURE_TFTP_DEBUG is not set +CONFIG_TRACEROUTE=y +# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set +# CONFIG_VCONFIG is not set +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_IP6_LITERAL=y + +# +# udhcp Server/Client +# +# CONFIG_UDHCPD is not set +CONFIG_UDHCPC=y +CONFIG_FEATURE_UDHCP_SYSLOG=y +# CONFIG_FEATURE_UDHCP_DEBUG is not set + +# +# Process Utilities +# +CONFIG_FREE=y +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_PIDOF=y +CONFIG_PS=y +CONFIG_RENICE=y +CONFIG_TOP=y +FEATURE_CPU_USAGE_PERCENTAGE=y +CONFIG_UPTIME=y +# CONFIG_SYSCTL is not set + +# +# Another Bourne-like Shell +# +CONFIG_FEATURE_SH_IS_ASH=y +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_LASH is not set +# CONFIG_FEATURE_SH_IS_MSH is not set +# CONFIG_FEATURE_SH_IS_NONE is not set +CONFIG_ASH=y + +# +# Ash Shell Options +# +CONFIG_ASH_JOB_CONTROL=y +CONFIG_ASH_PIPE_OPTIMIZATION=y +CONFIG_FEATURE_BUILTIN_TEST=y +CONFIG_FEATURE_BUILTIN_ECHO=y +CONFIG_FEATURE_BUILTIN_PIDOF=y +CONFIG_ASH_ALIAS=y +CONFIG_ASH_MATH_SUPPORT=y +# CONFIG_ASH_MATH_SUPPORT_64 is not set +CONFIG_ASH_GETOPTS=y +# CONFIG_ASH_CMDCMD is not set +# CONFIG_ASH_MAIL is not set +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +# CONFIG_ASH_RANDOM_SUPPORT is not set +# CONFIG_HUSH is not set +# CONFIG_LASH is not set +# CONFIG_MSH is not set + +# +# Bourne Shell Options +# +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE_SHELL is not set +CONFIG_FEATURE_COMMAND_EDITING=y +CONFIG_FEATURE_COMMAND_HISTORY=63 +# CONFIG_FEATURE_COMMAND_SAVEHISTORY is not set +CONFIG_FEATURE_COMMAND_TAB_COMPLETION=y +# CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set +CONFIG_FEATURE_SH_FANCY_PROMPT=y + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +# CONFIG_FEATURE_ROTATE_LOGFILE is not set +CONFIG_FEATURE_REMOTE_LOG=y +CONFIG_FEATURE_IPC_SYSLOG=y +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 +CONFIG_LOGREAD=y +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +CONFIG_KLOGD=y +CONFIG_LOGGER=y + +# +# Linux System Utilities +# +CONFIG_DMESG=y +CONFIG_FBSET=y +CONFIG_FEATURE_FBSET_FANCY=y +# CONFIG_FEATURE_FBSET_READMODE is not set +# CONFIG_FDFLUSH is not set +# CONFIG_FDFORMAT is not set +CONFIG_FDISK=y +FDISK_SUPPORT_LARGE_DISKS=y +CONFIG_FEATURE_FDISK_WRITABLE=y +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +# CONFIG_FREERAMDISK is not set +# CONFIG_FSCK_MINIX is not set +# CONFIG_MKFS_MINIX is not set +# CONFIG_GETOPT is not set +CONFIG_HEXDUMP=y +CONFIG_HWCLOCK=y +CONFIG_FEATURE_HWCLOCK_LONGOPTIONS=y +CONFIG_LOSETUP=y +CONFIG_MKSWAP=y +CONFIG_MORE=y +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_PIVOT_ROOT=y +# CONFIG_RDATE is not set +CONFIG_SWAPONOFF=y +CONFIG_MOUNT=y +CONFIG_NFSMOUNT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_MOUNT_FORCE=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set + +# +# Debugging Options +# +# CONFIG_DEBUG is not set diff --git a/openembedded/packages/busybox/busybox-1.00/openslug/udhcpscript.patch b/openembedded/packages/busybox/busybox-1.00/openslug/udhcpscript.patch new file mode 100644 index 0000000000..010f64a53f --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.00/openslug/udhcpscript.patch @@ -0,0 +1,133 @@ +--- busybox-1.00/.pc/udhcpscript.patch/examples/udhcp/simple.script 2004-10-13 00:18:05.000000000 -0700 ++++ busybox-1.00/examples/udhcp/simple.script 2005-06-05 15:08:28.432605118 -0700 +@@ -1,40 +1,101 @@ + #!/bin/sh ++# openslug UDHCP client script ++# this must set the HW address (MAC) on the interface ++# ++. /etc/default/functions + +-# udhcpc script edited by Tim Riker + +-[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1 ++echodns(){ ++ local dns ++ if test $# -gt 0 ++ then ++ for dns in "$@" ++ do ++ echo "nameserver $dns" ++ done ++ fi ++} ++ ++# Output the correct contents for resolv.conf ++mkresolv() { ++ test -n "$domain" && echo "search $domain" ++ echodns $dns ++} ++ ++# checksum of a file (or stdin if -) ++md5strm() { ++ md5sum $1 2>/dev/null | sed -n 's/^\([0-9A-Za-z]*\).*$/\1/p' ++} ++ ++bind() { ++ local B N metric i olddomain ++ B= ++ test -n "$broadcast" && B="broadcast $broadcast" ++ N= ++ test -n "$subnet" && N="netmask $subnet" ++ ifconfig "$interface" "$ip" $B $N up ++ ++ # If given router information delete the old information and ++ # enter new stuff, routers get metrics incremented by 1 ++ # between each (this is somewhat arbitrary) ++ if test -n "$router" ++ then ++ while route del default gw 0.0.0.0 dev $interface 2>/dev/null ++ do ++ : ++ done + +-RESOLV_CONF="/etc/resolv.conf" +-[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" +-[ -n "$subnet" ] && NETMASK="netmask $subnet" ++ metric=0 ++ for i in $router ++ do ++ route add default gw "$i" dev "$interface" metric $((metric++)) ++ done ++ fi ++ ++ olddomain= ++ test -r /etc/defaultdomain && olddomain="$(cat /etc/defaultdomain)" ++ if test -n "$domain" -a "$domain" != "$olddomain" ++ then ++ echo "$domain" >/etc/defaultdomain ++ # and update the kernel view too ++ echo "$domain" >/proc/sys/kernel/domainname ++ fi ++ ++ # Update /etc/resolv.conf to reflect domain and dns information, ++ # this always clears resolv.conf if none is given ++ md5old="$(md5strm /etc/resolv.conf)" ++ md5new="$(mkresolv | md5strm -)" ++ test "$md5old" != "$md5new" && mkresolv >/etc/resolv.conf ++} + + case "$1" in +- deconfig) +- /sbin/ifconfig $interface 0.0.0.0 +- ;; +- +- renew|bound) +- /sbin/ifconfig $interface $ip $BROADCAST $NETMASK +- +- if [ -n "$router" ] ; then +- echo "deleting routers" +- while route del default gw 0.0.0.0 dev $interface ; do +- : +- done +- +- metric=0 +- for i in $router ; do +- route add default gw $i dev $interface metric $((metric++)) +- done ++deconfig) ++ # Bring the interface up (without inet at this point) ++ ifconfig "$interface" up;; ++ ++renew|bound) ++ bind;; ++ ++leasefail) ++ # Pull the values from the config data if (only only if) this ++ # is the config interface ++ if test "$interface" = "$(config iface)" ++ then ++ ip="$(config ip)" ++ if test -n "$ip" ++ then ++ router="$(config gateway)" ++ subnet="$(config netmask)" ++ broadcast="$(config broadcast)" ++ domain="$(config domain)" ++ dns="$(config dns)" ++ ++ bind + fi ++ fi;; + +- echo -n > $RESOLV_CONF +- [ -n "$domain" ] && echo search $domain >> $RESOLV_CONF +- for i in $dns ; do +- echo adding dns $i +- echo nameserver $i >> $RESOLV_CONF +- done +- ;; ++*) echo "udhcpc: $*: unknown command" >&2 ++ exit 1;; + esac + + exit 0 diff --git a/openembedded/packages/busybox/busybox-1.00/readlink.patch b/openembedded/packages/busybox/busybox-1.00/readlink.patch new file mode 100644 index 0000000000..0c5431085a --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.00/readlink.patch @@ -0,0 +1,85 @@ +diff -p -u -r1.7 Config.in +--- busybox-1.00/debianutils/Config.in 15 Mar 2004 08:28:24 -0000 1.7 ++++ busybox-1.00-patched/debianutils/Config.in 16 Nov 2004 11:46:41 -0000 +@@ -24,6 +24,13 @@ config CONFIG_READLINK + This program reads a symbolic link and returns the name + of the file it points to + ++config CONFIG_FEATURE_READLINK_FOLLOW ++ bool " Enable canonicalization by following all symlinks (-f)" ++ default n ++ depends on CONFIG_READLINK ++ help ++ Enable the readlink option (-f). ++ + config CONFIG_RUN_PARTS + bool "run-parts" + default n +diff -p -u -r1.2 readlink.c +--- busybox-1.00/debianutils/readlink.c 19 Mar 2003 09:11:41 -0000 1.2 ++++ busybox-1.00-patched/debianutils/readlink.c 16 Nov 2004 11:46:41 -0000 +@@ -23,18 +23,38 @@ + #include + #include + #include ++#include + #include "busybox.h" + ++#ifdef CONFIG_FEATURE_READLINK_FOLLOW ++# define READLINK_FOLLOW "f" ++# define READLINK_FLAG_f (1 << 0) ++#else ++# define READLINK_FOLLOW "" ++#endif ++ ++static const char readlink_options[] = READLINK_FOLLOW; ++ + int readlink_main(int argc, char **argv) + { + char *buf = NULL; ++ unsigned long opt = bb_getopt_ulflags(argc, argv, readlink_options); ++#ifdef CONFIG_FEATURE_READLINK_FOLLOW ++ RESERVE_CONFIG_BUFFER(resolved_path, PATH_MAX); ++#endif + + /* no options, no getopt */ + +- if (argc != 2) ++ if (optind + 1 != argc) + bb_show_usage(); + +- buf = xreadlink(argv[1]); ++#ifdef CONFIG_FEATURE_READLINK_FOLLOW ++ if (opt & READLINK_FLAG_f) { ++ buf = realpath(argv[optind], resolved_path); ++ } else ++#endif ++ buf = xreadlink(argv[optind]); ++ + if (!buf) + return EXIT_FAILURE; + puts(buf); +diff -p -u -r1.222 usage.h +--- busybox-1.00/include/usage.h 14 Sep 2004 16:23:56 -0000 1.222 ++++ busybox-1.00-patched/include/usage.h 16 Nov 2004 11:46:42 -0000 +@@ -1985,10 +1985,18 @@ + "\t-s\tSet the system date and time (default).\n" \ + "\t-p\tPrint the date and time." + ++#ifdef CONFIG_FEATURE_READLINK_FOLLOW ++#define USAGE_READLINK_FOLLOW(a) a ++#else ++#define USAGE_READLINK_FOLLOW(a) ++#endif ++ + #define readlink_trivial_usage \ +- "" ++ USAGE_READLINK_FOLLOW("[-f] ") "FILE" + #define readlink_full_usage \ +- "Displays the value of a symbolic link." ++ "Displays the value of a symbolic link." \ ++ USAGE_READLINK_FOLLOW("\n\nOptions:\n" \ ++ "\t-f\tcanonicalize by following all symlinks") + + #define realpath_trivial_usage \ + "pathname ..." diff --git a/openembedded/packages/busybox/busybox-1.00/rmmod.patch b/openembedded/packages/busybox/busybox-1.00/rmmod.patch new file mode 100644 index 0000000000..5a557ef35d --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.00/rmmod.patch @@ -0,0 +1,44 @@ +Index: modutils/rmmod.c +=================================================================== +RCS file: /var/cvs/busybox/modutils/rmmod.c,v +retrieving revision 1.31 +diff -u -r1.31 rmmod.c +--- busybox/modutils/rmmod.c 20 Jul 2004 18:36:51 -0000 1.31 ++++ busybox/modutils/rmmod.c 10 Dec 2004 22:56:36 -0000 +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + #include "busybox.h" + + #ifdef CONFIG_FEATURE_2_6_MODULES +@@ -63,6 +64,16 @@ + void *buf; /* hold the module names which we ignore but must get */ + size_t bufsize = 0; + #endif ++#ifdef CONFIG_FEATURE_2_6_MODULES ++ int k_version = 0; ++ struct utsname myuname; ++ ++ if (uname(&myuname) == 0) { ++ if (myuname.release[0] == '2') { ++ k_version = myuname.release[2] - '0'; ++ } ++ } ++#endif + + /* Parse command line. */ + while ((n = getopt(argc, argv, "a")) != EOF) { +@@ -109,7 +120,10 @@ + for (n = optind; n < argc; n++) { + #ifdef CONFIG_FEATURE_2_6_MODULES + char module_name[strlen(argv[n]) + 1]; +- filename2modname(module_name, argv[n]); ++ if (k_version != 4) ++ filename2modname(module_name, argv[n]); ++ else ++ strcpy(module_name, argv[n]); + #else + #define module_name argv[n] + #endif diff --git a/openembedded/packages/busybox/busybox-1.00/sparc/defconfig b/openembedded/packages/busybox/busybox-1.00/sparc/defconfig new file mode 100644 index 0000000000..8b8cbfc839 --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.00/sparc/defconfig @@ -0,0 +1,467 @@ +# +# Automatically generated make config: don't edit +# +HAVE_DOT_CONFIG=y + +# +# General Configuration +# +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +# CONFIG_FEATURE_VERBOSE_USAGE is not set +# CONFIG_FEATURE_INSTALLER is not set +# CONFIG_LOCALE_SUPPORT is not set +CONFIG_FEATURE_DEVFS=y +CONFIG_FEATURE_DEVPTS=y +# CONFIG_FEATURE_CLEAN_UP is not set +# CONFIG_FEATURE_SUID is not set +# CONFIG_SELINUX is not set + +# +# Build Options +# +# CONFIG_STATIC is not set +# CONFIG_LFS is not set +# USING_CROSS_COMPILER is not set +EXTRA_CFLAGS_OPTIONS="" + +# +# Installation Options +# +# CONFIG_INSTALL_NO_USR is not set +PREFIX="./_install" + +# +# Archival Utilities +# +CONFIG_AR=y +# CONFIG_FEATURE_AR_LONG_FILENAMES is not set +CONFIG_BUNZIP2=y +CONFIG_CPIO=y +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +CONFIG_GUNZIP=y +# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set +CONFIG_GZIP=y +# CONFIG_RPM2CPIO is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +CONFIG_FEATURE_TAR_BZIP2=y +CONFIG_FEATURE_TAR_FROM=y +CONFIG_FEATURE_TAR_GZIP=y +# CONFIG_FEATURE_TAR_COMPRESS is not set +CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY=y +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set +# CONFIG_UNCOMPRESS is not set +CONFIG_UNZIP=y + +# +# Common options for cpio and tar +# +# CONFIG_FEATURE_UNARCHIVE_TAPE is not set + +# +# Coreutils +# +CONFIG_BASENAME=y +# CONFIG_CAL is not set +CONFIG_CAT=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +CONFIG_CHROOT=y +# CONFIG_CMP is not set +CONFIG_CP=y +CONFIG_CUT=y +CONFIG_DATE=y + +# +# date (forced enabled for use with watch) +# +# CONFIG_FEATURE_DATE_ISOFMT is not set +CONFIG_DD=y +CONFIG_DF=y +CONFIG_DIRNAME=y +# CONFIG_DOS2UNIX is not set +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +CONFIG_EXPR=y +CONFIG_FALSE=y +# CONFIG_FOLD is not set +CONFIG_HEAD=y +# CONFIG_FEATURE_FANCY_HEAD is not set +# CONFIG_HOSTID is not set +CONFIG_ID=y +# CONFIG_INSTALL is not set +# CONFIG_LENGTH is not set +CONFIG_LN=y +CONFIG_LOGNAME=y +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +# CONFIG_FEATURE_LS_RECURSIVE is not set +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +CONFIG_OD=y +CONFIG_PRINTF=y +CONFIG_PWD=y +# CONFIG_REALPATH is not set +CONFIG_RM=y +CONFIG_RMDIR=y +CONFIG_SEQ=y +# CONFIG_SHA1SUM is not set +CONFIG_SLEEP=y +# CONFIG_FEATURE_FANCY_SLEEP is not set +CONFIG_SORT=y +CONFIG_STTY=y +CONFIG_SYNC=y +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set +CONFIG_TEST=y + +# +# test (forced enabled for use with shell) +# +# CONFIG_FEATURE_TEST_64 is not set +CONFIG_TOUCH=y +CONFIG_TR=y +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +CONFIG_UNIQ=y +# CONFIG_USLEEP is not set +# CONFIG_UUDECODE is not set +# CONFIG_UUENCODE is not set +CONFIG_WATCH=y +CONFIG_WC=y +CONFIG_WHO=y +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options for cp and mv +# +# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set + +# +# Common options for ls and more +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum +# +# CONFIG_FEATURE_MD5_SHA1_SUM_CHECK is not set + +# +# Console Utilities +# +CONFIG_CHVT=y +CONFIG_CLEAR=y +CONFIG_DEALLOCVT=y +CONFIG_DUMPKMAP=y +CONFIG_GETKEY=y +CONFIG_LOADFONT=y +CONFIG_LOADKMAP=y +CONFIG_OPENVT=y +CONFIG_RESET=y +# CONFIG_SETKEYCODES is not set + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +# CONFIG_PIPE_PROGRESS is not set +CONFIG_READLINK=y +CONFIG_RUN_PARTS=y +CONFIG_START_STOP_DAEMON=y +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_AWK=y +CONFIG_FEATURE_AWK_MATH=y +# CONFIG_PATCH is not set +CONFIG_SED=y +CONFIG_VI=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +CONFIG_FEATURE_VI_USE_SIGNALS=y +# CONFIG_FEATURE_VI_DOT_CMD is not set +# CONFIG_FEATURE_VI_READONLY is not set +# CONFIG_FEATURE_VI_SETOPTS is not set +# CONFIG_FEATURE_VI_SET is not set +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y + +# +# Finding Utilities +# +CONFIG_FIND=y +CONFIG_FEATURE_FIND_MTIME=y +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +CONFIG_FEATURE_FIND_NEWER=y +# CONFIG_FEATURE_FIND_INUM is not set +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set +# CONFIG_FEATURE_XARGS_SUPPORT_QUOTES is not set +# CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT is not set +# CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM is not set + +# +# Init Utilities +# +# CONFIG_INIT is not set +# CONFIG_HALT is not set +# CONFIG_POWEROFF is not set +# CONFIG_REBOOT is not set +# CONFIG_MESG is not set + +# +# Login/Password Management Utilities +# +# CONFIG_USE_BB_PWD_GRP is not set +# CONFIG_ADDGROUP is not set +# CONFIG_DELGROUP is not set +# CONFIG_ADDUSER is not set +# CONFIG_DELUSER is not set +# CONFIG_GETTY is not set +CONFIG_FEATURE_U_W_TMP=y +# CONFIG_LOGIN is not set +# CONFIG_PASSWD is not set +# CONFIG_SU is not set +# CONFIG_SULOGIN is not set +# CONFIG_VLOCK is not set + +# +# Miscellaneous Utilities +# +# CONFIG_ADJTIMEX is not set +# CONFIG_CROND is not set +# CONFIG_CRONTAB is not set +CONFIG_DC=y +# CONFIG_DEVFSD is not set +# CONFIG_LAST is not set +# CONFIG_HDPARM is not set +CONFIG_MAKEDEVS=y +# CONFIG_MT is not set +# CONFIG_RX is not set +CONFIG_STRINGS=y +# CONFIG_TIME is not set +# CONFIG_WATCHDOG is not set + +# +# Linux Module Utilities +# +# CONFIG_INSMOD is not set +# CONFIG_LSMOD is not set +# CONFIG_MODPROBE is not set +# CONFIG_RMMOD is not set + +# +# Networking Utilities +# +CONFIG_FEATURE_IPV6=y +# CONFIG_ARPING is not set +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +CONFIG_HOSTNAME=y +# CONFIG_HTTPD is not set +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +# CONFIG_FEATURE_IFCONFIG_SLIP is not set +# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set +CONFIG_FEATURE_IFCONFIG_HW=y +# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set +CONFIG_IFUPDOWN=y +# CONFIG_FEATURE_IFUPDOWN_IP is not set +CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y +CONFIG_FEATURE_IFUPDOWN_IPV4=y +CONFIG_FEATURE_IFUPDOWN_IPV6=y +# CONFIG_FEATURE_IFUPDOWN_IPX is not set +# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set +# CONFIG_INETD is not set +CONFIG_IP=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +CONFIG_FEATURE_IP_TUNNEL=y +# CONFIG_IPCALC is not set +# CONFIG_IPADDR is not set +# CONFIG_IPLINK is not set +# CONFIG_IPROUTE is not set +# CONFIG_IPTUNNEL is not set +# CONFIG_NAMEIF is not set +CONFIG_NC=y +CONFIG_NETSTAT=y +CONFIG_NSLOOKUP=y +CONFIG_PING=y +CONFIG_FEATURE_FANCY_PING=y +CONFIG_PING6=y +CONFIG_FEATURE_FANCY_PING6=y +CONFIG_ROUTE=y +CONFIG_TELNET=y +# CONFIG_FEATURE_TELNET_TTYPE is not set +CONFIG_FEATURE_TELNET_AUTOLOGIN=y +# CONFIG_TELNETD is not set +# CONFIG_TFTP is not set +CONFIG_TRACEROUTE=y +# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set +# CONFIG_VCONFIG is not set +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_IP6_LITERAL=y + +# +# udhcp Server/Client +# +# CONFIG_UDHCPD is not set +CONFIG_UDHCPC=y +CONFIG_FEATURE_UDHCP_SYSLOG=y +# CONFIG_FEATURE_UDHCP_DEBUG is not set + +# +# Process Utilities +# +CONFIG_FREE=y +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_PIDOF=y +CONFIG_PS=y +CONFIG_RENICE=y +CONFIG_TOP=y +FEATURE_CPU_USAGE_PERCENTAGE=y +CONFIG_UPTIME=y +# CONFIG_SYSCTL is not set + +# +# Another Bourne-like Shell +# +CONFIG_FEATURE_SH_IS_ASH=y +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_LASH is not set +# CONFIG_FEATURE_SH_IS_MSH is not set +# CONFIG_FEATURE_SH_IS_NONE is not set +CONFIG_ASH=y + +# +# Ash Shell Options +# +CONFIG_ASH_JOB_CONTROL=y +CONFIG_ASH_ALIAS=y +CONFIG_ASH_MATH_SUPPORT=y +# CONFIG_ASH_MATH_SUPPORT_64 is not set +CONFIG_ASH_GETOPTS=y +# CONFIG_ASH_CMDCMD is not set +# CONFIG_ASH_MAIL is not set +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +# CONFIG_ASH_RANDOM_SUPPORT is not set +# CONFIG_HUSH is not set +# CONFIG_LASH is not set +# CONFIG_MSH is not set + +# +# Bourne Shell Options +# +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE_SHELL is not set +CONFIG_FEATURE_COMMAND_EDITING=y +CONFIG_FEATURE_COMMAND_HISTORY=63 +# CONFIG_FEATURE_COMMAND_SAVEHISTORY is not set +CONFIG_FEATURE_COMMAND_TAB_COMPLETION=y +# CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set +CONFIG_FEATURE_SH_FANCY_PROMPT=y + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +# CONFIG_FEATURE_ROTATE_LOGFILE is not set +CONFIG_FEATURE_REMOTE_LOG=y +CONFIG_FEATURE_IPC_SYSLOG=y +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 +CONFIG_LOGREAD=y +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +CONFIG_KLOGD=y +CONFIG_LOGGER=y + +# +# Linux System Utilities +# +CONFIG_DMESG=y +CONFIG_FBSET=y +CONFIG_FEATURE_FBSET_FANCY=y +# CONFIG_FEATURE_FBSET_READMODE is not set +# CONFIG_FDFLUSH is not set +# CONFIG_FDFORMAT is not set +CONFIG_FDISK=y +FDISK_SUPPORT_LARGE_DISKS=y +CONFIG_FEATURE_FDISK_WRITABLE=y +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +# CONFIG_FREERAMDISK is not set +CONFIG_FSCK_MINIX=y +CONFIG_MKFS_MINIX=y + +# +# Minix filesystem support +# +CONFIG_FEATURE_MINIX2=y +# CONFIG_GETOPT is not set +CONFIG_HEXDUMP=y +CONFIG_HWCLOCK=y +CONFIG_FEATURE_HWCLOCK_LONGOPTIONS=y +# CONFIG_LOSETUP is not set +CONFIG_MKSWAP=y +CONFIG_MORE=y +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_PIVOT_ROOT=y +# CONFIG_RDATE is not set +CONFIG_SWAPONOFF=y +CONFIG_MOUNT=y +CONFIG_NFSMOUNT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_MOUNT_FORCE=y + +# +# Common options for mount/umount +# +# CONFIG_FEATURE_MOUNT_LOOP is not set +# CONFIG_FEATURE_MTAB_SUPPORT is not set + +# +# Debugging Options +# +# CONFIG_DEBUG is not set diff --git a/openembedded/packages/busybox/busybox-1.00/udhcppidfile-breakage.patch b/openembedded/packages/busybox/busybox-1.00/udhcppidfile-breakage.patch new file mode 100644 index 0000000000..031274908b --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.00/udhcppidfile-breakage.patch @@ -0,0 +1,57 @@ +--- busybox-1.00/networking/udhcp/common.c~udhcppidfile2 ++++ busybox-1.00/networking/udhcp/common.c +@@ -74,7 +74,7 @@ + + if (pid > 0) { + /* parent */ +- if (pidfile_reassign(pidfile, pid) < 0) { ++ if (pidfile != NULL && pidfile_reassign(pidfile, pid) < 0) { + (void)kill(pid, SIGKILL); + exit(1); + } else +@@ -119,7 +119,7 @@ + sanitize_fds(); + + /* do some other misc startup stuff while we are here to save bytes */ +- if (pidfile_acquire(pidfile) < 0) ++ if (pidfile != NULL && pidfile_acquire(pidfile) < 0) + exit(1); + + /* equivelent of doing a fflush after every \n */ +@@ -166,7 +166,7 @@ + sanitize_fds(); + + /* do some other misc startup stuff while we are here to save bytes */ +- if (pidfile_acquire(pidfile) < 0) ++ if (pidfile != NULL && pidfile_acquire(pidfile) < 0) + exit(1); + + /* equivelent of doing a fflush after every \n */ +--- busybox-1.00/networking/udhcp/pidfile.c~udhcppidfile2 ++++ busybox-1.00/networking/udhcp/pidfile.c +@@ -141,7 +141,11 @@ + int pidfile_acquire(const char *pidfile) + { + int fd, result; +- if (!pidfile) return (-1); ++ ++ if (pidfile == NULL) { ++ LOG(LOG_ERR, "pidfile_acquire: filename is NULL\n"); ++ return (-1); ++ } + + if ((fd = pidfile_open(pidfile)) < 0) + return (-1); +@@ -170,7 +174,11 @@ + int pidfile_reassign(const char *pidfile, int pid) + { + int fd, result; +- if (!pidfile) return (-1); ++ ++ if (pidfile == NULL) { ++ LOG(LOG_ERR, "pidfile_reassign: filename is NULL\n"); ++ return (-1); ++ } + + if ((fd = pidfile_open(pidfile)) < 0) + return (-1); diff --git a/openembedded/packages/busybox/busybox-1.00/udhcppidfile.patch b/openembedded/packages/busybox/busybox-1.00/udhcppidfile.patch new file mode 100644 index 0000000000..fb2b2ec19a --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.00/udhcppidfile.patch @@ -0,0 +1,276 @@ +--- busybox-1.00/networking/udhcp/pidfile.h-dist 2004-04-15 03:51:26.000000000 +1000 ++++ busybox-1.00/networking/udhcp/pidfile.h 2004-10-27 15:46:38.000000000 +1000 +@@ -21,5 +21,5 @@ + + + int pidfile_acquire(const char *pidfile); +-void pidfile_write_release(int pid_fd); ++int pidfile_reassign(const char *pidfile, int newpid); + +--- busybox-1.00/networking/udhcp/pidfile.c-dist 2004-04-15 03:51:25.000000000 +1000 ++++ busybox-1.00/networking/udhcp/pidfile.c 2004-10-27 19:43:40.000000000 +1000 +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #include "pidfile.h" + #include "common.h" +@@ -37,39 +38,146 @@ + } + + +-int pidfile_acquire(const char *pidfile) ++static int pidfile_open(const char *pidfile) + { +- int pid_fd; +- if (!pidfile) return -1; ++ int fd; + +- pid_fd = open(pidfile, O_CREAT | O_WRONLY, 0644); +- if (pid_fd < 0) { +- LOG(LOG_ERR, "Unable to open pidfile %s: %m\n", pidfile); +- } else { +- lockf(pid_fd, F_LOCK, 0); +- if (!saved_pidfile) +- atexit(pidfile_delete); +- saved_pidfile = (char *) pidfile; ++ if ((fd = open(pidfile, O_CREAT | O_RDWR, 0644)) < 0) { ++ LOG(LOG_ERR, "pidfile_open: open %s failed: %m\n", pidfile); ++ return (-1); ++ } ++ ++ /* NOTE: lockf is not inherited by child after fork */ ++ if (lockf(fd, F_LOCK, 0) < 0) { ++ LOG(LOG_ERR, "pidfile_open: lock %s failed: %m\n", pidfile); ++ close(fd); ++ return (-1); ++ } ++ ++ return (fd); ++} ++ ++ ++static int pidfile_check(int fd, const char *pidfile) ++{ ++ int len, pid; ++ char buf[20]; ++ ++ if (lseek(fd, 0L, SEEK_SET) < 0) { ++ LOG(LOG_ERR, "pidfile_check: lseek %s failed: %m\n", pidfile); ++ return (-1); ++ } ++ ++ if ((len = read(fd, buf, sizeof buf - 1)) < 0) { ++ LOG(LOG_ERR, "pidfile_check: read %s failed: %m\n", pidfile); ++ return (-1); ++ } ++ ++ if (len == 0) ++ return (0); ++ ++ buf[len] = '\0'; ++ ++ if ((pid = atoi(buf)) <= 1) { ++ LOG(LOG_WARNING, ++ "pidfile_check: ignoring bogus pid (%s) in %s\n", ++ buf, pidfile); ++ return (0); ++ } ++ ++ if (kill((pid_t)pid, 0) == 0) { ++ LOG(LOG_ERR, "pidfile_check: process %d exists (%s)\n", ++ pid, pidfile); ++ return (-1); ++ } ++ ++ if (errno != ESRCH) { ++ LOG(LOG_ERR, "pidfile_check: kill %d failed (%s): %m\n", ++ pid, pidfile); ++ return (-1); ++ } ++ ++ return (0); ++} ++ ++ ++static int pidfile_store(int fd, const char *pidfile, int pid) ++{ ++ int len; ++ char buf[20]; ++ ++ if (lseek(fd, 0L, SEEK_SET) < 0) { ++ LOG(LOG_ERR, "pidfile_store: lseek %s failed: %m\n", pidfile); ++ return (-1); ++ } ++ ++ len = snprintf(buf, sizeof buf - 1, "%d\n", pid); ++ buf[len] = '\0'; ++ ++ if (write(fd, buf, len) < 0) { ++ LOG(LOG_ERR, "pidfile_store: write %s failed: %m\n", ++ pidfile); ++ return (-1); ++ } ++ ++ if (ftruncate(fd, len) < 0) { ++ LOG(LOG_ERR, "pidfile_store: ftruncate %d failed (%s): %m\n", ++ len, pidfile); ++ return (-1); + } + +- return pid_fd; ++ return (0); + } + + +-void pidfile_write_release(int pid_fd) ++static void pidfile_close(int fd) + { +- FILE *out; ++ (void)lseek(fd, 0L, SEEK_SET); ++ (void)lockf(fd, F_ULOCK, 0); ++ (void)close(fd); ++} + +- if (pid_fd < 0) return; + +- if ((out = fdopen(pid_fd, "w")) != NULL) { +- fprintf(out, "%d\n", getpid()); +- fclose(out); ++int pidfile_acquire(const char *pidfile) ++{ ++ int fd, result; ++ if (!pidfile) return (-1); ++ ++ if ((fd = pidfile_open(pidfile)) < 0) ++ return (-1); ++ ++ if ((result = pidfile_check(fd, pidfile)) == 0) ++ result = pidfile_store(fd, pidfile, getpid()); ++ ++ pidfile_close(fd); ++ ++ if (result == 0) { ++ saved_pidfile = (char *) pidfile; ++ atexit(pidfile_delete); + } +- lockf(pid_fd, F_UNLCK, 0); +- close(pid_fd); ++ ++ return (result); + } + + ++/* ++ * reassign the pid in a pidfile - used just after a fork so a parent ++ * can store the pid of its child into the file without any window ++ * where the pid in the file is a dead process (which might let another ++ * instance of the program start). Note the parent must use _exit() to ++ * avoid triggering the unlink scheduled above in pidfile_acquire() ++ */ ++int pidfile_reassign(const char *pidfile, int pid) ++{ ++ int fd, result; ++ if (!pidfile) return (-1); ++ ++ if ((fd = pidfile_open(pidfile)) < 0) ++ return (-1); + ++ result = pidfile_store(fd, pidfile, pid); + ++ pidfile_close(fd); ++ ++ return (result); ++} +--- busybox-1.00/networking/udhcp/common.c-dist 2004-05-19 19:18:04.000000000 +1000 ++++ busybox-1.00/networking/udhcp/common.c 2004-10-27 19:58:10.000000000 +1000 +@@ -64,16 +64,34 @@ + #ifdef __uClinux__ + LOG(LOG_ERR, "Cannot background in uclinux (yet)"); + #else /* __uClinux__ */ +- int pid_fd; ++ int pid, fd; + +- /* hold lock during fork. */ +- pid_fd = pidfile_acquire(pidfile); +- if (daemon(0, 0) == -1) { ++ /* NOTE: lockf is not inherited by the child after fork */ ++ if ((pid = fork()) < 0) { + perror("fork"); + exit(1); + } ++ ++ if (pid > 0) { ++ /* parent */ ++ if (pidfile_reassign(pidfile, pid) < 0) { ++ (void)kill(pid, SIGKILL); ++ exit(1); ++ } else ++ _exit(0); ++ } ++ ++ /* child */ ++ (void)chdir("/"); ++ if ((fd = open("/dev/null", O_RDWR)) >= 0) { ++ (void)dup2(fd, 0); ++ (void)dup2(fd, 1); ++ (void)dup2(fd, 2); ++ (void)close(fd); ++ } ++ (void)setsid(); ++ + daemonized++; +- pidfile_write_release(pid_fd); + #endif /* __uClinux__ */ + } + +@@ -97,14 +115,12 @@ + + void start_log_and_pid(const char *client_server, const char *pidfile) + { +- int pid_fd; +- + /* Make sure our syslog fd isn't overwritten */ + sanitize_fds(); + + /* do some other misc startup stuff while we are here to save bytes */ +- pid_fd = pidfile_acquire(pidfile); +- pidfile_write_release(pid_fd); ++ if (pidfile_acquire(pidfile) < 0) ++ exit(1); + + /* equivelent of doing a fflush after every \n */ + setlinebuf(stdout); +@@ -150,8 +166,8 @@ + sanitize_fds(); + + /* do some other misc startup stuff while we are here to save bytes */ +- pid_fd = pidfile_acquire(pidfile); +- pidfile_write_release(pid_fd); ++ if (pidfile_acquire(pidfile) < 0) ++ exit(1); + + /* equivelent of doing a fflush after every \n */ + setlinebuf(stdout); +--- busybox-1.00/networking/udhcp/common.h-dist 2004-05-19 18:29:05.000000000 +1000 ++++ busybox-1.00/networking/udhcp/common.h 2004-10-27 15:10:16.000000000 +1000 +@@ -42,7 +42,6 @@ + long uptime(void); + void background(const char *pidfile); + void start_log_and_pid(const char *client_server, const char *pidfile); +-void background(const char *pidfile); + void udhcp_logging(int level, const char *fmt, ...); + + #define LOG(level, str, args...) udhcp_logging(level, str, ## args) +--- busybox-1.00/networking/udhcp/script.c-dist 2004-05-19 17:45:47.000000000 +1000 ++++ busybox-1.00/networking/udhcp/script.c 2004-10-27 15:54:04.000000000 +1000 +@@ -228,6 +228,6 @@ + execle(client_config.script, client_config.script, + name, NULL, envp); + LOG(LOG_ERR, "script %s failed: %m", client_config.script); +- exit(1); ++ _exit(1); + } + } diff --git a/openembedded/packages/busybox/busybox-1.00/udhcpscript.patch b/openembedded/packages/busybox/busybox-1.00/udhcpscript.patch new file mode 100644 index 0000000000..fc21d440cd --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.00/udhcpscript.patch @@ -0,0 +1,17 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- busybox-1.00-rc3/examples/udhcp/simple.script~udhcpscript ++++ busybox-1.00-rc3/examples/udhcp/simple.script +@@ -17,8 +17,7 @@ + /sbin/ifconfig $interface $ip $BROADCAST $NETMASK + + if [ -n "$router" ] ; then +- echo "deleting routers" +- while route del default gw 0.0.0.0 dev $interface ; do ++ while route del default gw 0.0.0.0 dev $interface 2>/dev/null ; do + : + done + diff --git a/openembedded/packages/busybox/busybox-1.00/wrt54/defconfig b/openembedded/packages/busybox/busybox-1.00/wrt54/defconfig new file mode 100644 index 0000000000..7f1aef4ef9 --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.00/wrt54/defconfig @@ -0,0 +1,476 @@ +# +# Automatically generated make config: don't edit +# +HAVE_DOT_CONFIG=y + +# +# General Configuration +# +# CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set +CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_FEATURE_VERBOSE_USAGE=y +# CONFIG_FEATURE_INSTALLER is not set +# CONFIG_LOCALE_SUPPORT is not set +CONFIG_FEATURE_DEVFS=y +CONFIG_FEATURE_DEVPTS=y +# CONFIG_FEATURE_CLEAN_UP is not set +CONFIG_FEATURE_SUID=y +# CONFIG_FEATURE_SUID_CONFIG is not set +# CONFIG_SELINUX is not set + +# +# Build Options +# +# CONFIG_STATIC is not set +CONFIG_LFS=y +USING_CROSS_COMPILER=y +CROSS_COMPILER_PREFIX="mipsel-uclibc-" +EXTRA_CFLAGS_OPTIONS="-Os " + +# +# Installation Options +# +# CONFIG_INSTALL_NO_USR is not set +PREFIX="./_install" + +# +# Archival Utilities +# +# CONFIG_AR is not set +CONFIG_BUNZIP2=y +# CONFIG_CPIO is not set +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +CONFIG_GUNZIP=y +CONFIG_FEATURE_GUNZIP_UNCOMPRESS=y +CONFIG_GZIP=y +# CONFIG_RPM2CPIO is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +CONFIG_FEATURE_TAR_BZIP2=y +CONFIG_FEATURE_TAR_FROM=y +CONFIG_FEATURE_TAR_GZIP=y +# CONFIG_FEATURE_TAR_COMPRESS is not set +# CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY is not set +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set +# CONFIG_UNCOMPRESS is not set +# CONFIG_UNZIP is not set + +# +# Common options for cpio and tar +# +# CONFIG_FEATURE_UNARCHIVE_TAPE is not set + +# +# Coreutils +# +CONFIG_BASENAME=y +# CONFIG_CAL is not set +CONFIG_CAT=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +CONFIG_CHROOT=y +# CONFIG_CMP is not set +CONFIG_CP=y +CONFIG_CUT=y +CONFIG_DATE=y +CONFIG_FEATURE_DATE_ISOFMT=y +CONFIG_DD=y +CONFIG_DF=y +CONFIG_DIRNAME=y +# CONFIG_DOS2UNIX is not set +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +CONFIG_EXPR=y +CONFIG_FALSE=y +# CONFIG_FOLD is not set +CONFIG_HEAD=y +CONFIG_FEATURE_FANCY_HEAD=y +CONFIG_HOSTID=y +CONFIG_ID=y +# CONFIG_INSTALL is not set +CONFIG_LENGTH=y +CONFIG_LN=y +# CONFIG_LOGNAME is not set +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_MKFIFO=y +# CONFIG_MKNOD is not set +CONFIG_MV=y +# CONFIG_OD is not set +# CONFIG_PRINTF is not set +CONFIG_PWD=y +# CONFIG_REALPATH is not set +CONFIG_RM=y +CONFIG_RMDIR=y +# CONFIG_SEQ is not set +# CONFIG_SHA1SUM is not set +CONFIG_SLEEP=y +CONFIG_FEATURE_FANCY_SLEEP=y +CONFIG_SORT=y +# CONFIG_STTY is not set +CONFIG_SYNC=y +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +CONFIG_FEATURE_TEE_USE_BLOCK_IO=y +CONFIG_TEST=y + +# +# test (forced enabled for use with shell) +# +# CONFIG_FEATURE_TEST_64 is not set +CONFIG_TOUCH=y +CONFIG_TR=y +CONFIG_TRUE=y +# CONFIG_TTY is not set +CONFIG_UNAME=y +CONFIG_UNIQ=y +# CONFIG_USLEEP is not set +# CONFIG_UUDECODE is not set +# CONFIG_UUENCODE is not set +# CONFIG_WATCH is not set +CONFIG_WC=y +# CONFIG_WHO is not set +# CONFIG_WHOAMI is not set +CONFIG_YES=y + +# +# Common options for cp and mv +# +CONFIG_FEATURE_PRESERVE_HARDLINKS=y + +# +# Common options for ls and more +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum +# +CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y + +# +# Console Utilities +# +# CONFIG_CHVT is not set +CONFIG_CLEAR=y +# CONFIG_DEALLOCVT is not set +# CONFIG_DUMPKMAP is not set +# CONFIG_GETKEY is not set +# CONFIG_LOADFONT is not set +# CONFIG_LOADKMAP is not set +# CONFIG_OPENVT is not set +CONFIG_RESET=y +# CONFIG_SETKEYCODES is not set + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +# CONFIG_PIPE_PROGRESS is not set +# CONFIG_READLINK is not set +CONFIG_RUN_PARTS=y +CONFIG_START_STOP_DAEMON=y +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_AWK=y +CONFIG_FEATURE_AWK_MATH=y +# CONFIG_PATCH is not set +CONFIG_SED=y +CONFIG_VI=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +CONFIG_FEATURE_VI_USE_SIGNALS=y +CONFIG_FEATURE_VI_DOT_CMD=y +CONFIG_FEATURE_VI_READONLY=y +CONFIG_FEATURE_VI_SETOPTS=y +CONFIG_FEATURE_VI_SET=y +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y + +# +# Finding Utilities +# +CONFIG_FIND=y +# CONFIG_FEATURE_FIND_MTIME is not set +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +# CONFIG_FEATURE_FIND_NEWER is not set +# CONFIG_FEATURE_FIND_INUM is not set +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y +CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y +CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y + +# +# Init Utilities +# +CONFIG_INIT=y +CONFIG_FEATURE_USE_INITTAB=y +# CONFIG_FEATURE_INITRD is not set +# CONFIG_FEATURE_INIT_COREDUMPS is not set +# CONFIG_FEATURE_EXTRA_QUIET is not set +# CONFIG_HALT is not set +# CONFIG_POWEROFF is not set +CONFIG_REBOOT=y +CONFIG_MESG=y + +# +# Login/Password Management Utilities +# +# CONFIG_USE_BB_PWD_GRP is not set +# CONFIG_ADDGROUP is not set +# CONFIG_DELGROUP is not set +# CONFIG_ADDUSER is not set +# CONFIG_DELUSER is not set +# CONFIG_GETTY is not set +# CONFIG_FEATURE_U_W_TMP is not set +CONFIG_LOGIN=y +CONFIG_FEATURE_SECURETTY=y +CONFIG_PASSWD=y +# CONFIG_SU is not set +# CONFIG_SULOGIN is not set +# CONFIG_VLOCK is not set + +# +# Common options for adduser, deluser, login, su +# +# CONFIG_FEATURE_SHADOWPASSWDS is not set + +# +# Miscellaneous Utilities +# +# CONFIG_ADJTIMEX is not set +CONFIG_CROND=y +# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set +CONFIG_CRONTAB=y +# CONFIG_DC is not set +# CONFIG_DEVFSD is not set +# CONFIG_LAST is not set +# CONFIG_HDPARM is not set +# CONFIG_MAKEDEVS is not set +# CONFIG_MT is not set +# CONFIG_RX is not set +CONFIG_STRINGS=y +CONFIG_TIME=y +# CONFIG_WATCHDOG is not set + +# +# Linux Module Utilities +# +CONFIG_INSMOD=y +CONFIG_FEATURE_2_4_MODULES=y +# CONFIG_FEATURE_2_6_MODULES is not set +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set +CONFIG_LSMOD=y +CONFIG_FEATURE_QUERY_MODULE_INTERFACE=y +# CONFIG_MODPROBE is not set +CONFIG_RMMOD=y +CONFIG_FEATURE_CHECK_TAINTED_MODULE=y + +# +# Networking Utilities +# +CONFIG_FEATURE_IPV6=y +CONFIG_ARPING=y +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +# CONFIG_HOSTNAME is not set +CONFIG_HTTPD=y +# CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY is not set +CONFIG_FEATURE_HTTPD_BASIC_AUTH=y +CONFIG_FEATURE_HTTPD_AUTH_MD5=y +CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP=y +# CONFIG_FEATURE_HTTPD_SETUID is not set +CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES=y +CONFIG_FEATURE_HTTPD_CGI=y +CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y +CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +# CONFIG_FEATURE_IFCONFIG_SLIP is not set +# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set +CONFIG_FEATURE_IFCONFIG_HW=y +CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y +CONFIG_IFUPDOWN=y +# CONFIG_FEATURE_IFUPDOWN_IP is not set +CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y +CONFIG_FEATURE_IFUPDOWN_IPV4=y +# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set +# CONFIG_FEATURE_IFUPDOWN_IPX is not set +# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set +# CONFIG_INETD is not set +# CONFIG_IP is not set +CONFIG_IPCALC=y +CONFIG_FEATURE_IPCALC_FANCY=y +# CONFIG_IPADDR is not set +# CONFIG_IPLINK is not set +# CONFIG_IPROUTE is not set +# CONFIG_IPTUNNEL is not set +# CONFIG_NAMEIF is not set +CONFIG_NC=y +CONFIG_NETSTAT=y +CONFIG_NSLOOKUP=y +CONFIG_PING=y +CONFIG_FEATURE_FANCY_PING=y +CONFIG_PING6=y +CONFIG_FEATURE_FANCY_PING6=y +CONFIG_ROUTE=y +# CONFIG_TELNET is not set +# CONFIG_TELNETD is not set +# CONFIG_TFTP is not set +CONFIG_TRACEROUTE=y +CONFIG_FEATURE_TRACEROUTE_VERBOSE=y +CONFIG_VCONFIG=y +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_IP6_LITERAL=y + +# +# udhcp Server/Client +# +# CONFIG_UDHCPD is not set +CONFIG_UDHCPC=y +# CONFIG_FEATURE_UDHCP_SYSLOG is not set +# CONFIG_FEATURE_UDHCP_DEBUG is not set + +# +# Process Utilities +# +CONFIG_FREE=y +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_PIDOF=y +CONFIG_PS=y +# CONFIG_RENICE is not set +CONFIG_TOP=y +FEATURE_CPU_USAGE_PERCENTAGE=y +CONFIG_UPTIME=y +CONFIG_SYSCTL=y + +# +# Another Bourne-like Shell +# +CONFIG_FEATURE_SH_IS_ASH=y +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_LASH is not set +# CONFIG_FEATURE_SH_IS_MSH is not set +# CONFIG_FEATURE_SH_IS_NONE is not set +CONFIG_ASH=y + +# +# Ash Shell Options +# +CONFIG_ASH_PIPE_OPTIMIZATION=y +CONFIG_FEATURE_BUILTIN_TEST=y +CONFIG_FEATURE_BUILTIN_ECHO=y +CONFIG_FEATURE_BUILTIN_PIDOF=y +CONFIG_ASH_ALIAS=y +CONFIG_ASH_MATH_SUPPORT=y +# CONFIG_ASH_MATH_SUPPORT_64 is not set +CONFIG_ASH_GETOPTS=y +# CONFIG_ASH_CMDCMD is not set +# CONFIG_ASH_MAIL is not set +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +# CONFIG_ASH_RANDOM_SUPPORT is not set +# CONFIG_HUSH is not set +# CONFIG_LASH is not set +# CONFIG_MSH is not set + +# +# Bourne Shell Options +# +# CONFIG_FEATURE_SH_EXTRA_QUIET is not set +# CONFIG_FEATURE_SH_STANDALONE_SHELL is not set +CONFIG_FEATURE_COMMAND_EDITING=y +CONFIG_FEATURE_COMMAND_HISTORY=15 +# CONFIG_FEATURE_COMMAND_SAVEHISTORY is not set +CONFIG_FEATURE_COMMAND_TAB_COMPLETION=y +# CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set +CONFIG_FEATURE_SH_FANCY_PROMPT=y + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +CONFIG_FEATURE_ROTATE_LOGFILE=y +CONFIG_FEATURE_REMOTE_LOG=y +CONFIG_FEATURE_IPC_SYSLOG=y +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 +CONFIG_LOGREAD=y +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +CONFIG_KLOGD=y +CONFIG_LOGGER=y + +# +# Linux System Utilities +# +CONFIG_DMESG=y +# CONFIG_FBSET is not set +# CONFIG_FDFLUSH is not set +# CONFIG_FDFORMAT is not set +# CONFIG_FDISK is not set +FDISK_SUPPORT_LARGE_DISKS=y +# CONFIG_FREERAMDISK is not set +# CONFIG_FSCK_MINIX is not set +# CONFIG_MKFS_MINIX is not set +# CONFIG_GETOPT is not set +CONFIG_HEXDUMP=y +# CONFIG_HWCLOCK is not set +# CONFIG_LOSETUP is not set +# CONFIG_MKSWAP is not set +CONFIG_MORE=y +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_PIVOT_ROOT=y +CONFIG_RDATE=y +# CONFIG_SWAPONOFF is not set +CONFIG_MOUNT=y +CONFIG_NFSMOUNT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_MOUNT_FORCE=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set + +# +# Debugging Options +# +# CONFIG_DEBUG is not set diff --git a/openembedded/packages/busybox/busybox_1.00.bb b/openembedded/packages/busybox/busybox_1.00.bb new file mode 100644 index 0000000000..988265d72c --- /dev/null +++ b/openembedded/packages/busybox/busybox_1.00.bb @@ -0,0 +1,162 @@ +DESCRIPTION = "BusyBox combines tiny versions of many common UNIX utilities into a single \ +small executable. It provides minimalist replacements for most of the \ +utilities you usually find in GNU fileutils, shellutils, etc. The utilities \ +in BusyBox generally have fewer options than their full-featured GNU \ +cousins; however, the options that are included provide the expected \ +functionality and behave very much like their GNU counterparts. BusyBox \ +provides a fairly complete POSIX environment for any small or embedded \ +system." +HOMEPAGE = "http://www.busybox.net" +LICENSE = "GPL" +SECTION = "base" +PRIORITY = "required" +PR = "r30" + +SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \ + file://add-getkey-applet.patch;patch=1 \ + file://udhcpscript.patch;patch=1 \ + file://dhcpretrytime.patch;patch=1 \ + file://hdparm_M.patch;patch=1 \ + file://udhcppidfile.patch;patch=1 \ + file://udhcppidfile-breakage.patch;patch=1 \ + file://readlink.patch;patch=1 \ + file://iproute-flush-cache.patch;patch=1;pnum=0 \ + file://rmmod.patch;patch=1 \ + file://below.patch;patch=1 \ + file://fbset.patch;patch=1 \ + file://mount-all-type.patch;patch=1 \ + file://dhcp-hostname.patch;patch=1 \ + file://gzip-spurious-const.patch;patch=1 \ + file://ifupdown-spurious-environ.patch;patch=1 \ + file://defconfig \ + file://busybox-cron \ + file://busybox-httpd \ + file://busybox-udhcpd \ + file://syslog \ + file://hwclock.sh \ + file://default.script \ + file://syslog.conf \ + file://mount.busybox \ + file://umount.busybox" + +S = "${WORKDIR}/busybox-${PV}" + +export EXTRA_CFLAGS = "${CFLAGS}" +EXTRA_OEMAKE_append = " CROSS=${HOST_PREFIX}" +PACKAGES =+ "${PN}-httpd ${PN}-udhcpd" + +FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" +FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" + +FILES_${PN} += " ${datadir}/udhcpc" + +INITSCRIPT_PACKAGES = "${PN} ${PN}-httpd ${PN}-udhcpd" +INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd" +INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" +INITSCRIPT_NAME_${PN} = "syslog" +CONFFILES_${PN} = "${sysconfdir}/syslog.conf" + +# This disables the syslog startup links in openslug (see openslug-init) +INITSCRIPT_PARAMS_${PN}_openslug = "start 20 ." + +inherit cml1 update-rc.d + +do_configure () { + install -m 0644 ${WORKDIR}/defconfig ${S}/.config + cml1_do_configure +} + +do_compile () { + unset CFLAGS + base_do_compile +} + +do_install () { + install -d ${D}${sysconfdir}/init.d + oe_runmake 'PREFIX=${D}' install + + # Move everything to /busybox (not supposed to end up in any package) + install -d ${D}/busybox + mv ${D}${base_bindir} ${D}${base_sbindir} ${D}${prefix} ${D}/busybox/ + # Move the busybox binary back to /bin + install -d ${D}${base_bindir} + mv ${D}/busybox${base_bindir}/busybox ${D}${base_bindir}/ + # Move back the sh symlink + mv ${D}/busybox${base_bindir}/sh ${D}${base_bindir}/ + + install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/ + install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/ + if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then + # Move crond back to /usr/sbin/crond + install -d ${D}${sbindir} + mv ${D}/busybox${sbindir}/crond ${D}${sbindir}/ + + install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/ + fi + if grep "CONFIG_HTTPD=y" ${WORKDIR}/defconfig; then + # Move httpd back to /usr/sbin/httpd + install -d ${D}${sbindir} + mv ${D}/busybox${sbindir}/httpd ${D}${sbindir}/ + + install -m 0755 ${WORKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/ + install -d ${D}/srv/www + fi + if grep "CONFIG_UDHCPD=y" ${WORKDIR}/defconfig; then + # Move udhcpd back to /usr/sbin/udhcpd + install -d ${D}${sbindir} + mv ${D}/busybox${sbindir}/udhcpd ${D}${sbindir}/ + + install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/ + fi + if grep "CONFIG_HWCLOCK=y" ${WORKDIR}/defconfig; then + # Move hwclock back to /sbin/hwclock + install -d ${D}${base_sbindir} + mv ${D}/busybox${base_sbindir}/hwclock ${D}${base_sbindir}/ + + install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/ + fi + if grep "CONFIG_UDHCPC=y" ${WORKDIR}/defconfig; then + # Move dhcpc back to /usr/sbin/udhcpc + install -d ${D}${base_sbindir} + mv ${D}/busybox${base_sbindir}/udhcpc ${D}${base_sbindir}/ + + install -d ${D}${sysconfdir}/udhcpc.d + install -d ${D}${datadir}/udhcpc + install -m 0755 ${S}/examples/udhcp/simple.script ${D}${sysconfdir}/udhcpc.d/50default + install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script + fi + + install -m 0644 ${S}/busybox.links ${D}${sysconfdir} +} + +pkg_postinst_${PN} () { + # If we are not making an image we create links for the utilities that doesn't exist + # so the update-alternatives script will get the utilities it needs + # (update-alternatives have no problem replacing links later anyway) + test -n 2> /dev/null || alias test='busybox test' + if test "x$D" = "x"; then while read link; do if test ! -h "$link"; then case "$link" in /*/*/*) to="../../bin/busybox";; /bin/*) to="busybox";; /*/*) to="../bin/busybox";; esac; busybox ln -s $to $link; fi; done &2 + echo " start sets kernel (system) clock from hardware (RTC) clock" >&2 + echo " stop and reload set hardware (RTC) clock from kernel (system) clock" >&2 + exit 1 + ;; +esac diff --git a/openembedded/packages/busybox/files/mount.busybox b/openembedded/packages/busybox/files/mount.busybox new file mode 100755 index 0000000000..fef945b7b2 --- /dev/null +++ b/openembedded/packages/busybox/files/mount.busybox @@ -0,0 +1,3 @@ +#!/bin/sh + +exec /bin/busybox mount $@ diff --git a/openembedded/packages/busybox/files/postinst b/openembedded/packages/busybox/files/postinst new file mode 100644 index 0000000000..36d8190f80 --- /dev/null +++ b/openembedded/packages/busybox/files/postinst @@ -0,0 +1,25 @@ +#!/bin/busybox ash + +action="$1" +oldversion="$2" + +umask 022 + +if /bin/busybox [ "$action" != configure ] +then + exit 0 +fi + +. /etc/default/functions + +setup_init_hwclock() { + updatercd hwclock.sh start 50 S . stop 25 0 1 6 . + /etc/init.d/hwclock.sh restart +} + +/bin/busybox ash /usr/bin/update-alternatives --install /bin/vi vi /bin/busybox 100 +/bin/busybox ash /usr/bin/update-alternatives --install /bin/sh sh /bin/busybox 100 + +setup_init_hwclock + +exit 0 diff --git a/openembedded/packages/busybox/files/prerm b/openembedded/packages/busybox/files/prerm new file mode 100644 index 0000000000..7ade4b1dec --- /dev/null +++ b/openembedded/packages/busybox/files/prerm @@ -0,0 +1,10 @@ +#!/bin/sh + +if [ "$1" != "upgrade" ]; then + update-alternatives --remove sh /bin/busybox + update-alternatives --remove vi /bin/busybox + find /etc -name [SK][0-9][0-9]hwclock.sh | xargs rm -f + find /etc -name [SK][0-9][0-9]syslog | xargs rm -f +fi + +exit 0 diff --git a/openembedded/packages/busybox/files/syslog b/openembedded/packages/busybox/files/syslog new file mode 100644 index 0000000000..a999565e84 --- /dev/null +++ b/openembedded/packages/busybox/files/syslog @@ -0,0 +1,69 @@ +#! /bin/sh +# +# syslog init.d script for busybox syslogd/klogd +# Written by Robert Griebl +# Configuration file added by +set -e + +if [ -f /etc/syslog.conf ]; then + . /etc/syslog.conf + LOG_LOCAL=0 + LOG_REMOTE=0 + for D in $DESTINATION; do + if [ "$D" = "buffer" ]; then + SYSLOG_ARGS="$SYSLOG_ARGS -C $BUFFERSIZE" + LOG_LOCAL=1 + elif [ "$D" = "file" ]; then + if [ -n "$LOGFILE" ]; then + SYSLOG_ARGS="$SYSLOG_ARGS -O $LOGFILE" + fi + if [ -n "$ROTATESIZE" ]; then + SYSLOG_ARGS="$SYSLOG_ARGS -s $ROTATESIZE" + fi + if [ -n "$ROTATEGENS" ]; then + SYSLOG_ARGS="$SYSLOG_ARGS -b $ROTATEGENS" + fi + LOCAL=0 + elif [ "$D" = "remote" ]; then + SYSLOG_ARGS="$SYSLOG_ARGS -R $REMOTE" + LOG_REMOTE=1 + fi + done + if [ "$LOG_LOCAL" = "1" -a "$LOG_REMOTE" = "1" ]; then + SYSLOG_ARGS="$SYSLOG_ARGS -L" + fi + if [ -n "$MARKINT" ]; then + SYSLOG_ARGS="$SYSLOG_ARGS -m $MARKINT" + fi + if [ "$REDUCE" = "yes" ]; then + SYSLOG_ARGS="$SYSLOG_ARGS -S" + fi +else + # default: log to 16K shm circular buffer + SYSLOG_ARGS="-C" +fi + +case "$1" in + start) + echo -n "Starting syslogd/klogd: " + start-stop-daemon -S -b -n syslogd -a /sbin/syslogd -- -n $SYSLOG_ARGS + start-stop-daemon -S -b -n klogd -a /sbin/klogd -- -n + echo "done" + ;; + stop) + echo -n "Stopping syslogd/klogd: " + start-stop-daemon -K -n syslogd + start-stop-daemon -K -n klogd + echo "done" + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "Usage: syslog { start | stop | restart }" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/openembedded/packages/busybox/files/syslog.conf b/openembedded/packages/busybox/files/syslog.conf new file mode 100644 index 0000000000..d4a0e02f5b --- /dev/null +++ b/openembedded/packages/busybox/files/syslog.conf @@ -0,0 +1,9 @@ +DESTINATION="buffer" # log destinations (buffer file remote) +MARKINT=20 # intervall between --mark-- entries +LOGFILE=/var/log/messages # where to log (file) +REMOTE=loghost:514 # where to log (syslog remote) +REDUCE=no # reduce-size logging +#ROTATESIZE=0 # rotate log if grown beyond X [kByte] (incompatible with busybox) +#ROTATEGENS=3 # keep X generations of rotated logs (incompatible with busybox) +BUFFERSIZE=64 # size of circular buffer [kByte] +FOREGROUND=no # run in foreground (don't use!) diff --git a/openembedded/packages/busybox/files/umount.busybox b/openembedded/packages/busybox/files/umount.busybox new file mode 100755 index 0000000000..f3731626e6 --- /dev/null +++ b/openembedded/packages/busybox/files/umount.busybox @@ -0,0 +1,3 @@ +#!/bin/sh + +exec /bin/busybox umount $@ diff --git a/openembedded/packages/cairo/cairo_1.0.0.bb b/openembedded/packages/cairo/cairo_1.0.0.bb new file mode 100644 index 0000000000..aa97a9f4de --- /dev/null +++ b/openembedded/packages/cairo/cairo_1.0.0.bb @@ -0,0 +1,15 @@ +SECTION = "libs" +PRIORITY = "optional" +MAINTAINER = "Phil Blundell " +DEPENDS = "x11 libpng fontconfig libxrender" +DESCRIPTION = "Cairo graphics library" +LICENSE = "MPL LGPL" +PR = "r1" + +SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.gz" + +inherit autotools pkgconfig + +do_stage () { + oe_runmake install DESTDIR="" bindir=${STAGING_BINDIR} includedir=${STAGING_INCDIR} libdir=${STAGING_LIBDIR} prefix=${STAGING_DIR} +} diff --git a/openembedded/packages/compositeext/compositeext_cvs.bb b/openembedded/packages/compositeext/compositeext_cvs.bb new file mode 100644 index 0000000000..4b01bcfef0 --- /dev/null +++ b/openembedded/packages/compositeext/compositeext_cvs.bb @@ -0,0 +1,20 @@ +PV = "0.0cvs${CVSDATE}" +LICENSE= "BSD-X" +SECTION = "libs" +MAINTAINER = "Greg Gilbert " +DEPENDS = "xextensions fixesext" +DESCRIPTION = "X Composite extension headers and specification" +DEFAULT_PREFERENCE = "1" + +SRC_URI = "cvs://anoncvs:anoncvs@pdx.freedesktop.org/cvs/xlibs;module=CompositeExt" +S = "${WORKDIR}/CompositeExt" + +inherit autotools pkgconfig + +do_stage() { + oe_runmake install prefix=${STAGING_DIR} \ + bindir=${STAGING_BINDIR} \ + includedir=${STAGING_INCDIR} \ + libdir=${STAGING_LIBDIR} \ + datadir=${STAGING_DATADIR} +} diff --git a/openembedded/packages/console-tools/console-tools-0.3.2/codepage.patch b/openembedded/packages/console-tools/console-tools-0.3.2/codepage.patch new file mode 100644 index 0000000000..f6bd91e3e0 --- /dev/null +++ b/openembedded/packages/console-tools/console-tools-0.3.2/codepage.patch @@ -0,0 +1,16 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- console-tools-0.3.2/contrib/codepage.c~codepage ++++ console-tools-0.3.2/contrib/codepage.c +@@ -229,7 +229,7 @@ + return 0; + + fprintf(stderr, "\ +-Warning: CP format is a hack!\n ++Warning: CP format is a hack!\n\ + The files produced may or may not be usable!\n"); + + sprintf(outfile, "%d.cp", CPEntryHeader.codepage); diff --git a/openembedded/packages/console-tools/console-tools-0.3.2/compile.patch b/openembedded/packages/console-tools/console-tools-0.3.2/compile.patch new file mode 100644 index 0000000000..29012fe884 --- /dev/null +++ b/openembedded/packages/console-tools/console-tools-0.3.2/compile.patch @@ -0,0 +1,10 @@ +--- console-tools-0.3.2/kbdtools/showkey.c~compile 1999-08-25 17:20:08.000000000 -0400 ++++ console-tools-0.3.2/kbdtools/showkey.c 2004-05-09 03:03:23.000000000 -0400 +@@ -264,7 +264,6 @@ + break; + case cmd_keymap: + printf(")\n"); +- default: + } + } + diff --git a/openembedded/packages/console-tools/console-tools-0.3.2/config/codeset.m4 b/openembedded/packages/console-tools/console-tools-0.3.2/config/codeset.m4 new file mode 100644 index 0000000000..863c9cfa7e --- /dev/null +++ b/openembedded/packages/console-tools/console-tools-0.3.2/config/codeset.m4 @@ -0,0 +1,17 @@ +#serial AM1 + +dnl From Bruno Haible. + +AC_DEFUN([AM_LANGINFO_CODESET], +[ + AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, + [AC_TRY_LINK([#include ], + [char* cs = nl_langinfo(CODESET);], + am_cv_langinfo_codeset=yes, + am_cv_langinfo_codeset=no) + ]) + if test $am_cv_langinfo_codeset = yes; then + AC_DEFINE(HAVE_LANGINFO_CODESET, 1, + [Define if you have and nl_langinfo(CODESET).]) + fi +]) diff --git a/openembedded/packages/console-tools/console-tools-0.3.2/config/gettext.m4 b/openembedded/packages/console-tools/console-tools-0.3.2/config/gettext.m4 new file mode 100644 index 0000000000..e4d524cf0f --- /dev/null +++ b/openembedded/packages/console-tools/console-tools-0.3.2/config/gettext.m4 @@ -0,0 +1,370 @@ +# Macro to add for using GNU gettext. +# Ulrich Drepper , 1995. +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU General Public +# License or the GNU Library General Public License but which still want +# to provide support for the GNU gettext functionality. +# Please note that the actual code of the GNU gettext library is covered +# by the GNU Library General Public License, and the rest of the GNU +# gettext package package is covered by the GNU General Public License. +# They are *not* in the public domain. + +# serial 10 + +dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]). +dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library +dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, +dnl depending on --{enable,disable}-{shared,static} and on the presence of +dnl AM-DISABLE-SHARED). Otherwise, a static library +dnl $(top_builddir)/intl/libintl.a will be created. +dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext +dnl implementations (in libc or libintl) without the ngettext() function +dnl will be ignored. +dnl LIBDIR is used to find the intl libraries. If empty, +dnl the value `$(top_builddir)/intl/' is used. +dnl +dnl The result of the configuration is one of three cases: +dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled +dnl and used. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 2) GNU gettext has been found in the system's C library. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 3) No internationalization, always use English msgid. +dnl Catalog format: none +dnl Catalog extension: none +dnl The use of .gmo is historical (it was needed to avoid overwriting the +dnl GNU format catalogs when building on a platform with an X/Open gettext), +dnl but we keep it in order not to force irrelevant filename changes on the +dnl maintainers. +dnl +AC_DEFUN([AM_WITH_NLS], + [AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE(nls, + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT($USE_NLS) + AC_SUBST(USE_NLS) + + BUILD_INCLUDED_LIBINTL=no + USE_INCLUDED_LIBINTL=no + INTLLIBS= + + dnl If we use NLS figure out what method + if test "$USE_NLS" = "yes"; then + AC_DEFINE(ENABLE_NLS, 1, + [Define to 1 if translation of program messages to the user's native language + is requested.]) + AC_MSG_CHECKING([whether included gettext is requested]) + AC_ARG_WITH(included-gettext, + [ --with-included-gettext use the GNU gettext library included here], + nls_cv_force_use_gnu_gettext=$withval, + nls_cv_force_use_gnu_gettext=no) + AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + dnl User does not insist on using GNU NLS library. Figure out what + dnl to use. If GNU gettext is available we use this. Else we have + dnl to fall back to GNU NLS library. + CATOBJEXT=NONE + + dnl Add a version number to the cache macros. + define(gt_cv_func_gnugettext_libc, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libc]) + define(gt_cv_func_gnugettext_libintl, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libintl]) + + AC_CHECK_HEADER(libintl.h, + [AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, + [AC_TRY_LINK([#include +extern int _nl_msg_cat_cntr;], + [bindtextdomain ("", ""); +return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr], + gt_cv_func_gnugettext_libc=yes, + gt_cv_func_gnugettext_libc=no)]) + + if test "$gt_cv_func_gnugettext_libc" != "yes"; then + AC_CACHE_CHECK([for GNU gettext in libintl], + gt_cv_func_gnugettext_libintl, + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -lintl $LIBICONV" + AC_TRY_LINK([#include +extern int _nl_msg_cat_cntr;], + [bindtextdomain ("", ""); +return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr], + gt_cv_func_gnugettext_libintl=yes, + gt_cv_func_gnugettext_libintl=no) + LIBS="$gt_save_LIBS"]) + fi + + dnl If an already present or preinstalled GNU gettext() is found, + dnl use it. But if this macro is used in GNU gettext, and GNU + dnl gettext is already preinstalled in libintl, we update this + dnl libintl. (Cf. the install rule in intl/Makefile.in.) + if test "$gt_cv_func_gnugettext_libc" = "yes" \ + || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ + && test "$PACKAGE" != gettext; }; then + AC_DEFINE(HAVE_GETTEXT, 1, + [Define if the GNU gettext() function is already present or preinstalled.]) + + if test "$gt_cv_func_gnugettext_libintl" = "yes"; then + dnl If iconv() is in a separate libiconv library, then anyone + dnl linking with libintl{.a,.so} also needs to link with + dnl libiconv. + INTLLIBS="-lintl $LIBICONV" + fi + + gt_save_LIBS="$LIBS" + LIBS="$LIBS $INTLLIBS" + AC_CHECK_FUNCS(dcgettext) + LIBS="$gt_save_LIBS" + + dnl Search for GNU msgfmt in the PATH. + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + + dnl Search for GNU xgettext in the PATH. + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :) + + CATOBJEXT=.gmo + fi + ]) + + if test "$CATOBJEXT" = "NONE"; then + dnl GNU gettext is not found in the C library. + dnl Fall back on GNU gettext library. + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions used to generate GNU NLS library. + INTLOBJS="\$(GETTOBJS)" + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :) + AC_SUBST(MSGFMT) + BUILD_INCLUDED_LIBINTL=yes + USE_INCLUDED_LIBINTL=yes + CATOBJEXT=.gmo + INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV" + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` + fi + + dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. + dnl Test whether we really found GNU msgfmt. + if test "$GMSGFMT" != ":"; then + dnl If it is no GNU msgfmt we define it as : so that the + dnl Makefiles still can work. + if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then + : ; + else + AC_MSG_RESULT( + [found msgfmt program is not GNU msgfmt; ignore it]) + GMSGFMT=":" + fi + fi + + dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. + dnl Test whether we really found GNU xgettext. + if test "$XGETTEXT" != ":"; then + dnl If it is no GNU xgettext we define it as : so that the + dnl Makefiles still can work. + if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then + : ; + else + AC_MSG_RESULT( + [found xgettext program is not GNU xgettext; ignore it]) + XGETTEXT=":" + fi + fi + + dnl We need to process the po/ directory. + POSUB=po + fi + AC_OUTPUT_COMMANDS( + [for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + fi + ;; + esac + done]) + + + dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL + dnl to 'yes' because some of the testsuite requires it. + if test "$PACKAGE" = gettext; then + BUILD_INCLUDED_LIBINTL=yes + fi + + dnl intl/plural.c is generated from intl/plural.y. It requires bison, + dnl because plural.y uses bison specific features. It requires at least + dnl bison-1.26 because earlier versions generate a plural.c that doesn't + dnl compile. + dnl bison is only needed for the maintainer (who touches plural.y). But in + dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put + dnl the rule in general Makefile. Now, some people carelessly touch the + dnl files or have a broken "make" program, hence the plural.c rule will + dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not + dnl present or too old. + AC_CHECK_PROGS([INTLBISON], [bison]) + if test -z "$INTLBISON"; then + ac_verc_fail=yes + else + dnl Found it, now check the version. + AC_MSG_CHECKING([version of bison]) +changequote(<<,>>)dnl + ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) +changequote([,])dnl + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + esac + AC_MSG_RESULT([$ac_prog_version]) + fi + if test $ac_verc_fail = yes; then + INTLBISON=: + fi + + dnl These rules are solely for the distribution goal. While doing this + dnl we only have to keep exactly one list of the available catalogs + dnl in configure.in. + for lang in $ALL_LINGUAS; do + GMOFILES="$GMOFILES $lang.gmo" + POFILES="$POFILES $lang.po" + done + + dnl Make all variables we use known to autoconf. + AC_SUBST(BUILD_INCLUDED_LIBINTL) + AC_SUBST(USE_INCLUDED_LIBINTL) + AC_SUBST(CATALOGS) + AC_SUBST(CATOBJEXT) + AC_SUBST(GMOFILES) + AC_SUBST(INTLLIBS) + AC_SUBST(INTLOBJS) + AC_SUBST(POFILES) + AC_SUBST(POSUB) + + dnl For backward compatibility. Some configure.ins may be using this. + nls_cv_header_intl= + nls_cv_header_libgt= + + dnl For backward compatibility. Some Makefiles may be using this. + DATADIRNAME=share + AC_SUBST(DATADIRNAME) + + dnl For backward compatibility. Some Makefiles may be using this. + INSTOBJEXT=.mo + AC_SUBST(INSTOBJEXT) + + dnl For backward compatibility. Some Makefiles may be using this. + GENCAT=gencat + AC_SUBST(GENCAT) + ]) + +dnl Usage: Just like AM_WITH_NLS, which see. +AC_DEFUN([AM_GNU_GETTEXT], + [AC_REQUIRE([AC_PROG_MAKE_SET])dnl + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl + AC_REQUIRE([AC_PROG_RANLIB])dnl + AC_REQUIRE([AC_ISC_POSIX])dnl + AC_REQUIRE([AC_HEADER_STDC])dnl + AC_REQUIRE([AC_C_CONST])dnl + AC_REQUIRE([AC_C_INLINE])dnl + AC_REQUIRE([AC_TYPE_OFF_T])dnl + AC_REQUIRE([AC_TYPE_SIZE_T])dnl + AC_REQUIRE([AC_FUNC_ALLOCA])dnl + AC_REQUIRE([AC_FUNC_MMAP])dnl + AC_REQUIRE([jm_GLIBC21])dnl + + AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ +stdlib.h string.h unistd.h sys/param.h]) + AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \ +getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \ +strdup strtoul tsearch __argz_count __argz_stringify __argz_next]) + + AM_ICONV + AM_LANGINFO_CODESET + AM_LC_MESSAGES + AM_WITH_NLS([$1],[$2],[$3]) + + if test "x$CATOBJEXT" != "x"; then + if test "x$ALL_LINGUAS" = "x"; then + LINGUAS= + else + AC_MSG_CHECKING(for catalogs to be installed) + NEW_LINGUAS= + for presentlang in $ALL_LINGUAS; do + useit=no + for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + NEW_LINGUAS="$NEW_LINGUAS $presentlang" + fi + done + LINGUAS=$NEW_LINGUAS + AC_MSG_RESULT($LINGUAS) + fi + + dnl Construct list of names of catalog files to be constructed. + if test -n "$LINGUAS"; then + for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done + fi + fi + + dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly + dnl find the mkinstalldirs script in another subdir but $(top_srcdir). + dnl Try to locate is. + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + AC_SUBST(MKINSTALLDIRS) + + dnl Enable libtool support if the surrounding package wishes it. + INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], []) + AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) + ]) diff --git a/openembedded/packages/console-tools/console-tools-0.3.2/config/glibc21.m4 b/openembedded/packages/console-tools/console-tools-0.3.2/config/glibc21.m4 new file mode 100644 index 0000000000..5b88ef231c --- /dev/null +++ b/openembedded/packages/console-tools/console-tools-0.3.2/config/glibc21.m4 @@ -0,0 +1,26 @@ +#serial 2 + +# Test for the GNU C Library, version 2.1 or newer. +# From Bruno Haible. + +AC_DEFUN([jm_GLIBC21], + [ + AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, + ac_cv_gnu_library_2_1, + [AC_EGREP_CPP([Lucky GNU user], + [ +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif +#endif + ], + ac_cv_gnu_library_2_1=yes, + ac_cv_gnu_library_2_1=no) + ] + ) + AC_SUBST(GLIBC21) + GLIBC21="$ac_cv_gnu_library_2_1" + ] +) diff --git a/openembedded/packages/console-tools/console-tools-0.3.2/config/iconv.m4 b/openembedded/packages/console-tools/console-tools-0.3.2/config/iconv.m4 new file mode 100644 index 0000000000..17237344af --- /dev/null +++ b/openembedded/packages/console-tools/console-tools-0.3.2/config/iconv.m4 @@ -0,0 +1,69 @@ +#serial AM2 + +dnl From Bruno Haible. + +AC_DEFUN([AM_ICONV], +[ + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and + dnl those with the standalone portable GNU libiconv installed). + + AC_ARG_WITH([libiconv-prefix], +[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [ + for dir in `echo "$withval" | tr : ' '`; do + if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi + if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi + done + ]) + + AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_func_iconv=yes) + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS -liconv" + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_lib_iconv=yes + am_cv_func_iconv=yes) + LIBS="$am_save_LIBS" + fi + ]) + if test "$am_cv_func_iconv" = yes; then + AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) + AC_MSG_CHECKING([for iconv declaration]) + AC_CACHE_VAL(am_cv_proto_iconv, [ + AC_TRY_COMPILE([ +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif +], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) + am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + AC_MSG_RESULT([$]{ac_t:- + }[$]am_cv_proto_iconv) + AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, + [Define as const if the declaration of iconv() needs const.]) + fi + LIBICONV= + if test "$am_cv_lib_iconv" = yes; then + LIBICONV="-liconv" + fi + AC_SUBST(LIBICONV) +]) diff --git a/openembedded/packages/console-tools/console-tools-0.3.2/config/lcmessage.m4 b/openembedded/packages/console-tools/console-tools-0.3.2/config/lcmessage.m4 new file mode 100644 index 0000000000..18d47a94f7 --- /dev/null +++ b/openembedded/packages/console-tools/console-tools-0.3.2/config/lcmessage.m4 @@ -0,0 +1,24 @@ +# Check whether LC_MESSAGES is available in . +# Ulrich Drepper , 1995. +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU General Public +# License or the GNU Library General Public License but which still want +# to provide support for the GNU gettext functionality. +# Please note that the actual code of the GNU gettext library is covered +# by the GNU Library General Public License, and the rest of the GNU +# gettext package package is covered by the GNU General Public License. +# They are *not* in the public domain. + +# serial 2 + +AC_DEFUN([AM_LC_MESSAGES], + [if test $ac_cv_header_locale_h = yes; then + AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, + [AC_TRY_LINK([#include ], [return LC_MESSAGES], + am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) + if test $am_cv_val_LC_MESSAGES = yes; then + AC_DEFINE(HAVE_LC_MESSAGES, 1, + [Define if your file defines LC_MESSAGES.]) + fi + fi]) diff --git a/openembedded/packages/console-tools/console-tools-0.3.2/config/progtest.m4 b/openembedded/packages/console-tools/console-tools-0.3.2/config/progtest.m4 new file mode 100644 index 0000000000..35dc3da1f7 --- /dev/null +++ b/openembedded/packages/console-tools/console-tools-0.3.2/config/progtest.m4 @@ -0,0 +1,51 @@ +# Search path for a program which passes the given test. +# Ulrich Drepper , 1996. +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU General Public +# License or the GNU Library General Public License but which still want +# to provide support for the GNU gettext functionality. +# Please note that the actual code of the GNU gettext library is covered +# by the GNU Library General Public License, and the rest of the GNU +# gettext package package is covered by the GNU General Public License. +# They are *not* in the public domain. + +# serial 2 + +dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) +AC_DEFUN([AM_PATH_PROG_WITH_TEST], +[# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL(ac_cv_path_$1, +[case "[$]$1" in + /*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in ifelse([$5], , $PATH, [$5]); do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then + AC_MSG_RESULT([$]$1) +else + AC_MSG_RESULT(no) +fi +AC_SUBST($1)dnl +]) diff --git a/openembedded/packages/console-tools/console-tools-0.3.2/configure.patch b/openembedded/packages/console-tools/console-tools-0.3.2/configure.patch new file mode 100644 index 0000000000..f5b75327e9 --- /dev/null +++ b/openembedded/packages/console-tools/console-tools-0.3.2/configure.patch @@ -0,0 +1,46 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- console-tools-0.3.2/configure.in~configure ++++ console-tools-0.3.2/configure.in +@@ -2,13 +2,14 @@ + dnl Process this file with autoconf to produce a configure script. + + # Initialize +-AC_INIT(kbdtools/loadkeys.y) ++AC_INIT ++AC_CONFIG_SRCDIR([kbdtools/loadkeys.y]) + + define(ct_unicodedata_default,/usr/share/unidata/UnicodeData-2.txt) + ct_localdatadir_default=/usr/local/share # iff --enable-localdatadir without specific dir + + #AC_CONFIG_AUX_DIR(autoconf) +-AC_CANONICAL_SYSTEM ++AC_CANONICAL_TARGET([]) + AM_INIT_AUTOMAKE(console-tools, 0.3.2) + + # Defaults +@@ -25,7 +26,7 @@ + # i18n stuff + ALL_LINGUAS="cs de ru ga fr" + AM_GNU_GETTEXT +-AC_OUTPUT_COMMANDS([sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile]) ++AC_CONFIG_COMMANDS([default-1],[[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile]],[[]]) + + AC_DEFINE_UNQUOTED(LOCALEDIR, "/usr/share/locale") + +@@ -172,10 +173,11 @@ + AC_SUBST(CHARMAPDIR) + + # Output +-AC_OUTPUT([Makefile lib/Makefile lib/console/Makefile lib/cfont/Makefile ++AC_CONFIG_FILES([Makefile lib/Makefile lib/console/Makefile lib/cfont/Makefile + lib/ctutils/Makefile lib/ctlocal/Makefile lib/generic/Makefile + fontfiletools/Makefile vttools/Makefile + kbdtools/Makefile screenfonttools/Makefile contrib/Makefile + include/Makefile include/lct/Makefile compat/Makefile + doc/Makefile doc/man/Makefile examples/Makefile + po/Makefile.in intl/Makefile]) ++AC_OUTPUT diff --git a/openembedded/packages/console-tools/console-tools_0.3.2.bb b/openembedded/packages/console-tools/console-tools_0.3.2.bb new file mode 100644 index 0000000000..2a94a4f896 --- /dev/null +++ b/openembedded/packages/console-tools/console-tools_0.3.2.bb @@ -0,0 +1,46 @@ +SECTION = "base" +LICENSE = "GPL" +DESCRIPTION = "Allows you to set-up and manipulate the Linux console." +PR = "r1" + +SRC_URI = "${SOURCEFORGE_MIRROR}/lct/console-tools-${PV}.tar.gz \ + file://codepage.patch;patch=1 \ + file://configure.patch;patch=1 \ + file://compile.patch;patch=1 \ + file://config/*.m4" + +export SUBDIRS = "fontfiletools vttools kbdtools screenfonttools contrib \ + examples po intl compat" + +acpaths = "-I config" +do_configure_prepend () { + mkdir -p config + cp ${WORKDIR}/config/*.m4 config/ +} + +do_compile () { + oe_runmake -C lib + oe_runmake 'SUBDIRS=${SUBDIRS}' +} + +inherit autotools + +do_install () { + autotools_do_install + mv ${D}${bindir}/chvt ${D}${bindir}/chvt.${PN} + mv ${D}${bindir}/deallocvt ${D}${bindir}/deallocvt.${PN} + mv ${D}${bindir}/openvt ${D}${bindir}/openvt.${PN} +} + +pkg_postinst_${PN} () { + update-alternatives --install ${bindir}/chvt chvt chvt.${PN} 100 + update-alternatives --install ${bindir}/deallocvt deallocvt deallocvt.${PN} 100 + update-alternatives --install ${bindir}/openvt openvt openvt.${PN} 100 +} + +pkg_prerm_${PN} () { + update-alternatives --remove chvt chvt.${PN} + update-alternatives --remove deallocvt deallocvt.${PN} + update-alternatives --remove openvt openvt.${PN} +} + diff --git a/openembedded/packages/coreutils/coreutils-5.1.3/install-cross.patch b/openembedded/packages/coreutils/coreutils-5.1.3/install-cross.patch new file mode 100644 index 0000000000..98ba3d916c --- /dev/null +++ b/openembedded/packages/coreutils/coreutils-5.1.3/install-cross.patch @@ -0,0 +1,27 @@ +--- src/install.c~ 2003-08-09 18:46:45.000000000 +0100 ++++ src/install.c 2004-03-27 18:38:45.000000000 +0000 +@@ -516,7 +516,14 @@ + strip (const char *path) + { + int status; +- pid_t pid = fork (); ++ pid_t pid; ++ char *strip_name; ++ ++ strip_name = getenv ("STRIP"); ++ if (strip_name == NULL) ++ strip_name = "strip"; ++ ++ pid = fork (); + + switch (pid) + { +@@ -524,7 +531,7 @@ + error (EXIT_FAILURE, errno, _("fork system call failed")); + break; + case 0: /* Child. */ +- execlp ("strip", "strip", path, NULL); ++ execlp (strip_name, "strip", path, NULL); + error (EXIT_FAILURE, errno, _("cannot run strip")); + break; + default: /* Parent. */ diff --git a/openembedded/packages/coreutils/coreutils-5.1.3/man.patch b/openembedded/packages/coreutils/coreutils-5.1.3/man.patch new file mode 100644 index 0000000000..b067c380e2 --- /dev/null +++ b/openembedded/packages/coreutils/coreutils-5.1.3/man.patch @@ -0,0 +1,42 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- coreutils-5.1.3/configure.ac~man 2004-01-25 16:57:15.000000000 -0600 ++++ coreutils-5.1.3/configure.ac 2004-06-29 14:22:10.000000000 -0500 +@@ -232,6 +232,20 @@ + AM_GNU_GETTEXT([external], [need-ngettext]) + AM_GNU_GETTEXT_VERSION(0.13.1) + ++AC_MSG_CHECKING([whether to build man pages]) ++AC_ARG_WITH(manpages, ++ AS_HELP_STRING([--with-manpages], ++ [Enable building of manpages (default=yes)]), ++ [cu_cv_build_manpages=$enableval], ++ [cu_cv_build_manpages=yes]) ++# help2man doesn't work when crosscompiling, as it needs to run the ++# binary that was built. ++if test x"$cross_compiling" = x"yes"; then ++ cu_cv_build_manpages=no ++fi ++AC_MSG_RESULT($cu_cv_build_manpages) ++AM_CONDITIONAL(ENABLE_MANPAGES, test x"$cu_cv_build_manpages" = x"yes") ++ + AC_CONFIG_FILES( + Makefile + doc/Makefile +--- coreutils-5.1.3/Makefile.am~man 2003-11-09 14:23:02.000000000 -0600 ++++ coreutils-5.1.3/Makefile.am 2004-06-29 14:18:14.000000000 -0500 +@@ -1,6 +1,11 @@ + ## Process this file with automake to produce Makefile.in -*-Makefile-*- + ++if ENABLE_MANPAGES + SUBDIRS = lib src doc man m4 po tests ++else ++SUBDIRS = lib src doc m4 po tests ++endif ++ + EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \ + .kludge-stamp .prev-version THANKS-to-translators THANKStt.in \ + .x-sc_space_tab .x-sc_sun_os_names \ diff --git a/openembedded/packages/coreutils/coreutils-native_5.1.3.bb b/openembedded/packages/coreutils/coreutils-native_5.1.3.bb new file mode 100644 index 0000000000..3fbe1bb6f1 --- /dev/null +++ b/openembedded/packages/coreutils/coreutils-native_5.1.3.bb @@ -0,0 +1,7 @@ +SECTION = "base" +inherit native + +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/coreutils-${PV}" +S = "${WORKDIR}/coreutils-${PV}" + +include coreutils_${PV}.bb diff --git a/openembedded/packages/coreutils/coreutils_5.1.3.bb b/openembedded/packages/coreutils/coreutils_5.1.3.bb new file mode 100644 index 0000000000..31af80907d --- /dev/null +++ b/openembedded/packages/coreutils/coreutils_5.1.3.bb @@ -0,0 +1,85 @@ +LICENSE = "GPL" +SECTION = "base" +DESCRIPTION = "A collection of core GNU utilities." +RREPLACES = "textutils shellutils fileutils" +RPROVIDES = "textutils shellutils fileutils" +PR = "r7" + +SRC_URI = "ftp://alpha.gnu.org/gnu/coreutils/coreutils-${PV}.tar.bz2 \ + file://install-cross.patch;patch=1;pnum=0 \ + file://man.patch;patch=1" + +inherit autotools + +# [ gets a special treatment and is not included in this +bindir_progs = "basename cksum comm csplit cut dir dircolors dirname du \ + env expand expr factor fmt fold groups head hostid id install \ + join link logname md5sum mkfifo nice nl nohup od paste pathchk \ + pinky pr printenv printf ptx readlink seq sha1sum shred sort \ + split stat sum tac tail tee test tr tsort tty unexpand uniq \ + unlink users vdir wc who whoami yes \ + " + +# hostname gets a special treatment and is not included in this +base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill \ + ln ls mkdir mknod mv pwd rm rmdir sleep stty sync touch \ + true uname \ + " + +sbindir_progs= "chroot" + +do_install () { + autotools_do_install + + # Renaming the utilities that should go in /usr/bin + for i in ${bindir_progs}; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${PN}; done + + # Renaming and moving the utilities that should go in /bin (FHS) + install -d ${D}${base_bindir} + for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${PN}; done + + # Renaming and moving the utilities that should go in /usr/sbin (FHS) + install -d ${D}${sbindir} + for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${PN}; done + + # [ requires special handling because [.coreutils will cause the sed stuff + # in update-alternatives to fail, therefore use lbracket - the name used + # for the actual source file. + mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${PN} + # hostname and uptime separated. busybox's versions are preferred + mv ${D}${bindir}/hostname ${D}${base_bindir}/hostname.${PN} + mv ${D}${bindir}/uptime ${D}${bindir}/uptime.${PN} + +} + +pkg_postinst_${PN} () { + # The utilities in /usr/bin + for i in ${bindir_progs}; do update-alternatives --install ${bindir}/$i $i $i.${PN} 100; done + + # The utilities in /bin + for i in ${base_bindir_progs}; do update-alternatives --install ${base_bindir}/$i $i $i.${PN} 100; done + + # The utilities in /usr/sbin + for i in ${sbindir_progs}; do update-alternatives --install ${sbindir}/$i $i $i.${PN} 100; done + + # Special cases. uptime and hostname is broken, prefer busybox's version. [ needs to be treated separately. + update-alternatives --install ${bindir}/uptime uptime uptime.${PN} 10 + update-alternatives --install ${base_bindir}/hostname hostname hostname.${PN} 10 + update-alternatives --install '${bindir}/[' '[' 'lbracket.${PN}' 100 +} + +pkg_prerm_${PN} () { + # The utilities in /usr/bin + for i in ${bindir_progs}; do update-alternatives --remove $i $i.${PN}; done + + # The utilities in /bin + for i in ${base_bindir_progs}; do update-alternatives --remove $i $i.${PN}; done + + # The utilities in /usr/sbin + for i in ${sbindir_progs}; do update-alternatives --remove $i $i.${PN}; done + + # The special cases + update-alternatives --remove hostname hostname.${PN} + update-alternatives --remove uptime uptime.${PN} + update-alternatives --remove '[' 'lbracket.${PN}' +} diff --git a/openembedded/packages/damageext/damageext-1.0/autofoo.patch b/openembedded/packages/damageext/damageext-1.0/autofoo.patch new file mode 100644 index 0000000000..e36fb1d74b --- /dev/null +++ b/openembedded/packages/damageext/damageext-1.0/autofoo.patch @@ -0,0 +1,18 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- damageext-1.0/configure.ac~autofoo 2003-11-25 22:47:58.000000000 -0500 ++++ damageext-1.0/configure.ac 2005-01-16 11:47:08.123775952 -0500 +@@ -25,9 +25,9 @@ + + AC_PREREQ([2.57]) + AC_INIT([damageext], [1.0], [keithp@keithp.com], damageext) ++AC_CONFIG_AUX_DIR(.) + AM_INIT_AUTOMAKE([dist-bzip2]) + AM_MAINTAINER_MODE +-AC_CONFIG_AUX_DIR(.) + + PKG_CHECK_MODULES(FIXESEXT, fixesext) + diff --git a/openembedded/packages/damageext/damageext_cvs.bb b/openembedded/packages/damageext/damageext_cvs.bb new file mode 100644 index 0000000000..6c68c457c8 --- /dev/null +++ b/openembedded/packages/damageext/damageext_cvs.bb @@ -0,0 +1,20 @@ +PV = "0.0cvs${CVSDATE}" +LICENSE = "MIT-X" +SECTION = "libs" +MAINTAINER = "Greg Gilbert " +DEPENDS = "xextensions fixesext" +DESCRIPTION = "X Damage extension headers and specification" +PR = "r1" + +SRC_URI = "cvs://anoncvs:anoncvs@pdx.freedesktop.org/cvs/xlibs;module=DamageExt" +S = "${WORKDIR}/DamageExt" + +inherit autotools pkgconfig + +do_stage() { + oe_runmake install prefix=${STAGING_DIR} \ + bindir=${STAGING_BINDIR} \ + includedir=${STAGING_INCDIR} \ + libdir=${STAGING_LIBDIR} \ + datadir=${STAGING_DATADIR} +} diff --git a/openembedded/packages/db/db3-3.2.9/autofoo.patch b/openembedded/packages/db/db3-3.2.9/autofoo.patch new file mode 100644 index 0000000000..d385b95722 --- /dev/null +++ b/openembedded/packages/db/db3-3.2.9/autofoo.patch @@ -0,0 +1,71 @@ +--- dist/Makefile.in 2000-11-30 17:07:33.000000000 -0600 ++++ dist/Makefile.in 2004-09-01 19:47:37.000000000 -0500 +@@ -2,6 +2,7 @@ + + srcdir= @srcdir@/.. + builddir=. ++top_builddir=. + + ################################################## + # C, C++ +--- dist/configure.in 2001-01-19 11:36:43.000000000 -0600 ++++ dist/configure.in 2004-09-01 19:45:35.000000000 -0500 +@@ -38,7 +38,6 @@ + AC_SUBST(LIBJSO_LIBS) + AC_SUBST(LIBS) + AC_SUBST(LIBSO_LIBS) +-AC_SUBST(LIBTOOL) + AC_SUBST(LIBTSO_LIBS) + AC_SUBST(LIBXSO_LIBS) + AC_SUBST(MAKEFILE_CC) +@@ -48,7 +47,6 @@ + AC_SUBST(RPC_OBJS) + AC_SUBST(SOFLAGS) + AC_SUBST(SOLINK) +-AC_SUBST(SOSUFFIX) + + dnl $o is set to ".o" or ".lo", and is the file suffix used in the + dnl Makefile instead of .o +@@ -205,27 +203,15 @@ + dnl Dynamic library and libtool configuration; optional, but required for + dnl Tcl or Java support. + LIBDB_ARGS="libdb.a" +-LIBTOOL="nolibtool" + POSTLINK="@true" +-SOSUFFIX="so" + if test "$db_cv_dynamic" = "yes"; then ++ AM_PROG_LIBTOOL + SAVE_CC="${MAKEFILE_CC}" + SAVE_CXX="${MAKEFILE_CXX}" + +- # Configure libtool. +- AC_MSG_CHECKING(libtool configuration) +- AC_MSG_RESULT([]) +- ${CONFIG_SHELL-/bin/sh} $srcdir/ltconfig \ +- --no-verify $srcdir/ltmain.sh \ +- --output=./libtool $host_os \ +- --disable-static \ +- || AC_MSG_ERROR([libtool configure failed]) +- +- SOSUFFIX=`sed -e '/^library_names_spec=/!d' -e 's/.*\.\([[a-zA-Z0-9_]]*\).*/\1/' ./libtool` + DEFAULT_LIB="\$(libso_target)" + DEFAULT_INSTALL="install_dynamic" + LIBDB_ARGS="\$(libso_linkname)" +- LIBTOOL="\$(SHELL) ./libtool" + + MAKEFILE_CC="\$(LIBTOOL) --mode=compile ${SAVE_CC}" + MAKEFILE_CXX="\$(LIBTOOL) --mode=compile ${SAVE_CXX}" +@@ -373,13 +359,6 @@ + AC_REPLACE_FUNCS(getcwd getopt memcmp memcpy memmove) + AC_REPLACE_FUNCS(raise snprintf strcasecmp strerror vsnprintf) + +-dnl XXX +-dnl Nasty hack. AC_REPLACE_FUNCS added entries of the form xxx.o to the +-dnl LIBOBJS variable. They have to be xxx.lo if we are building shared +-dnl libraries. Use sed, configure already requires it. +-tmp="`echo \"$LIBOBJS\" | sed \"s/\.o/${o}/g\"`" +-LIBOBJS="$tmp" +- + dnl Check for system functions we optionally use. + AC_CHECK_FUNCS(getuid pstat_getdynamic sysconf sched_yield strtoul yield) + diff --git a/openembedded/packages/db/db3-native_3.2.9.bb b/openembedded/packages/db/db3-native_3.2.9.bb new file mode 100644 index 0000000000..13c6063669 --- /dev/null +++ b/openembedded/packages/db/db3-native_3.2.9.bb @@ -0,0 +1,6 @@ +SECTION = "libs" +inherit native +include db3_${PV}.bb + +FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/db3-${PV}', '${FILE_DIRNAME}/db3', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}" +PACKAGES = "" diff --git a/openembedded/packages/db/db3_3.2.9.bb b/openembedded/packages/db/db3_3.2.9.bb new file mode 100644 index 0000000000..4c78279745 --- /dev/null +++ b/openembedded/packages/db/db3_3.2.9.bb @@ -0,0 +1,80 @@ +SECTION = "libs" +DESCRIPTION = "Berkeley DB v3." +HOMEPAGE = "http://www.sleepycat.com" +LICENSE = "BSD Sleepycat" +PR = "r1" + +SRC_URI = "ftp://sleepycat1.inetu.net/releases/db-${PV}.tar.gz \ + file://autofoo.patch;patch=1" +S = "${WORKDIR}/db-${PV}/dist" +B = "${WORKDIR}/db-${PV}/build_unix" + +inherit autotools + +EXTRA_OECONF = "--enable-shared --enable-compat185 --enable-static" +EXTRA_OEMAKE = "'SHELL=/bin/sh' 'ar=`which ${AR}` cr' 'chmod=`which chmod`' \ + 'cp=`which cp`' 'ln=`which ln`' 'mkdir=`which mkdir`' 'ranlib=`which ${RANLIB}`' \ + 'rm=`which rm`' 'strip=`which ${STRIP}`'" + +PACKAGES = "${PN} ${PN}-bin ${PN}-dev ${PN}-doc ${PN}-locale" + +FILES_${PN} = "${libdir}/libdb-3.2*so*" +FILES_${PN}-bin = "${bindir}" +FILES_${PN}-dev = "${includedir} ${libdir}/libdb.so ${libdir}/libdb.a \ + ${libdir}/libdb-3.so ${libdir}/libdb.la ${libdir}/libdb-3.2.a \ + ${libdir}/libdb-3.2.la" + +do_configure_prepend () { + set -e + ( + cd ${S} + . ./RELEASE + (echo "AC_DEFUN(AM_VERSION_SET, [" && + echo "AC_SUBST(DB_VERSION_MAJOR)" && + echo "AC_DEFINE(DB_VERSION_MAJOR, [$DB_VERSION_MAJOR])" && + echo "DB_VERSION_MAJOR=$DB_VERSION_MAJOR" && + echo "AC_SUBST(DB_VERSION_MINOR)" && + echo "AC_DEFINE(DB_VERSION_MINOR, [$DB_VERSION_MINOR])" && + echo "DB_VERSION_MINOR=$DB_VERSION_MINOR" && + echo "AC_SUBST(DB_VERSION_PATCH)" && + echo "AC_DEFINE(DB_VERSION_PATCH, [$DB_VERSION_PATCH])" && + echo "DB_VERSION_PATCH=$DB_VERSION_PATCH" && + echo "AC_SUBST(DB_VERSION_STRING)" && + echo "AC_DEFINE(DB_VERSION_STRING, [$DB_VERSION_STRING])" && + echo "DB_VERSION_STRING=\"\\\"\$DB_VERSION_STRING\\\"\"" && + echo "])dnl") > acinclude.m4 + ) +} + +do_configure () { + rm -f ${S}/configure + autotools_do_configure +} + +do_compile () { + oe_runmake +} + +do_stage () { + install -m 0644 db_185.h ../include/db_cxx.h db.h ${STAGING_INCDIR}/ + oe_libinstall -so -a libdb-3.2 ${STAGING_LIBDIR} + ln -sf libdb-3.2.so ${STAGING_LIBDIR}/libdb.so + ln -sf libdb-3.2.a ${STAGING_LIBDIR}/libdb.a +} + +do_install () { + oe_runmake \ + prefix=${D}${prefix} \ + exec_prefix=${D}${exec_prefix} \ + bindir=${D}${bindir} \ + includedir=${D}${includedir} \ + libdir=${D}${libdir} \ + docdir=${D}${docdir} \ + install +} + +python do_package() { + if bb.data.getVar('DEBIAN_NAMES', d, 1): + bb.data.setVar('PKG_${PN}', 'libdb3', d) + bb.build.exec_func('package_do_package', d) +} diff --git a/openembedded/packages/db/db_4.3.27.bb b/openembedded/packages/db/db_4.3.27.bb new file mode 100644 index 0000000000..216fb5714b --- /dev/null +++ b/openembedded/packages/db/db_4.3.27.bb @@ -0,0 +1,94 @@ +# Version 4 of the Berkeley DB from Sleepycat +# +# At present this package only installs the DB code +# itself (shared libraries, .a in the dev package), +# documentation and headers. +# +# The headers have the same names as those as v3 +# of the DB, only one version can be used *for dev* +# at once - DB3 and DB4 can both be installed on the +# same system at the same time if really necessary. +SECTION = "libs" +DESCRIPTION = "Berkeley DB v4." +HOMEPAGE = "http://www.sleepycat.com" +LICENSE = "BSD Sleepycat" +PR = "r1" + +SRC_URI = "http://downloads.sleepycat.com/${P}.tar.gz" + +inherit autotools + +# At present virtual/db is only in the db4 file, but it +# should probably be in the other candidates (db3, gdbm) +# because it doesn't make any sense to have multiple +# relational databases on an embedded machine... +PROVIDES += " db4 virtual/db" + +# bitbake isn't quite clever enough to deal with sleepycat, +# the distribution sits in the expected directory, but all +# the builds must occur from a sub-directory. The following +# persuades bitbake to go to the right place +S = "${WORKDIR}/${P}/build_unix" + +# The executables go in a separate package - typically there +# is no need to install these unless doing real database +# management on the system. +PACKAGES += " ${PN}-bin" + +# Package contents +FILES_${PN} = "${libdir}/libdb-4*so*" +FILES_${PN}-bin = "${bindir}" +# The dev package has the .so link (as in db3) and the .a's - +# it is therefore incompatible (cannot be installed at the +# same time) as the db3 package +FILES_${PN}-dev = "${includedir} ${libdir}" + +#configuration - set in local.conf to override +DB4_CONFIG ?= "--enable-o_direct --enable-smallbuild" +# Override the MUTEX setting here, the POSIX library is +# the default - "POSIX/pthreads/library". +# Don't ignore the nice SWP instruction on the ARM: +EXTRA_OECONF = "${DB4_CONFIG}" +# These enable the ARM assembler mutex code, this won't +# work with thumb compilation... +ARM_MUTEX = "--with-mutex=ARM/gcc-assembly" +ARM_MUTEX_thumb = "" +# NOTE: only tested on nslu2, should probably be _armeb +EXTRA_OECONF_nslu2 = "${DB4_CONFIG} ${ARM_MUTEX}" + +# Cancel the site stuff - it's set for db3 and destroys the +# configure. +CONFIG_SITE = "" +do_configure() { + echo '#!/bin/sh' >${S}/configure + echo 'rm ${S}/configure' >>${S}/configure + echo 'exec ../dist/configure "$@"' >>${S}/configure + chmod a+x ${S}/configure + oe_runconf +} + +do_stage() { + # The .h files get installed read-only, the autostage + # function just uses cp -a, so do this by hand + # Install, for the moment, into include/db4 to avoid + # interfering with the db3 headers (which have the same + # name). -I${STAGING_INCDIR}/db4 to use db4, as opposed + # to db3. + rm -rf ${STAGE_TEMP} + mkdir -p ${STAGE_TEMP} + oe_runmake DESTDIR="${STAGE_TEMP}" install_include + mkdir -p ${STAGING_INCDIR}/db4 + cp -af ${STAGE_TEMP}/${includedir}/* ${STAGING_INCDIR}/db4 + rm -rf ${STAGE_TEMP} + oe_libinstall -so -C .libs libdb-4.3 ${STAGING_LIBDIR} +} + +do_install_append() { + # The docs end up in /usr/docs - not right. + if test -d "${D}/${prefix}/docs" + then + mkdir -p "${D}/${datadir}" + test ! -d "${D}/${docdir}" || rmdir "${D}/${docdir}" + mv "${D}/${prefix}/docs" "${D}/${docdir}" + fi +} diff --git a/openembedded/packages/dropbear/dropbear-0.46/allow-nopw.patch b/openembedded/packages/dropbear/dropbear-0.46/allow-nopw.patch new file mode 100644 index 0000000000..1a709b8da0 --- /dev/null +++ b/openembedded/packages/dropbear/dropbear-0.46/allow-nopw.patch @@ -0,0 +1,37 @@ +diff -Nurd dropbear-0.45/svr-auth.c dropbear-0.45.patched/svr-auth.c +--- dropbear-0.45/svr-auth.c 2005-03-06 20:27:02.000000000 -0800 ++++ dropbear-0.45.patched/svr-auth.c 2005-03-08 15:22:43.998592744 -0800 +@@ -237,6 +237,7 @@ + } + + /* check for an empty password */ ++#ifdef DISALLOW_EMPTY_PW + if (ses.authstate.pw->pw_passwd[0] == '\0') { + TRACE(("leave checkusername: empty pword")) + dropbear_log(LOG_WARNING, "user '%s' has blank password, rejected", +@@ -244,7 +245,7 @@ + send_msg_userauth_failure(0, 1); + return DROPBEAR_FAILURE; + } +- ++#endif + TRACE(("shell is %s", ses.authstate.pw->pw_shell)) + + /* check that the shell is set */ +diff -Nurd dropbear-0.45/svr-authpasswd.c dropbear-0.45.patched/svr-authpasswd.c +--- dropbear-0.45/svr-authpasswd.c 2005-03-06 20:27:02.000000000 -0800 ++++ dropbear-0.45.patched/svr-authpasswd.c 2005-03-08 15:22:44.010591023 -0800 +@@ -64,9 +64,13 @@ + * since the shadow password may differ to that tested + * in auth.c */ + if (passwdcrypt[0] == '\0') { ++#ifdef DISALLOW_EMPTY_PASSWD + dropbear_log(LOG_WARNING, "user '%s' has blank password, rejected", + ses.authstate.printableuser); + send_msg_userauth_failure(0, 1); ++#else ++ send_msg_userauth_success(); ++#endif + return; + } + diff --git a/openembedded/packages/dropbear/dropbear-0.46/configure.patch b/openembedded/packages/dropbear/dropbear-0.46/configure.patch new file mode 100644 index 0000000000..9ae84b2604 --- /dev/null +++ b/openembedded/packages/dropbear/dropbear-0.46/configure.patch @@ -0,0 +1,27 @@ +diff -Nurd dropbear-0.45/configure.in dropbear-0.45.patched/configure.in +--- dropbear-0.45/configure.in 2005-03-06 20:27:02.000000000 -0800 ++++ dropbear-0.45.patched/configure.in 2005-03-08 15:22:44.040586721 -0800 +@@ -161,15 +161,20 @@ + AC_MSG_RESULT(Not using openpty) + else + AC_MSG_RESULT(Using openpty if available) +- AC_SEARCH_LIBS(openpty, util, [AC_DEFINE(HAVE_OPENPTY,,Have openpty() function)]) ++ AC_SEARCH_LIBS(openpty, util, [dropbear_cv_func_have_openpty=yes]) + fi + ], + [ + AC_MSG_RESULT(Using openpty if available) +- AC_SEARCH_LIBS(openpty, util, [AC_DEFINE(HAVE_OPENPTY)]) ++ AC_SEARCH_LIBS(openpty, util, [dropbear_cv_func_have_openpty=yes]) + ] + ) +- ++ ++if test "x$dropbear_cv_func_have_openpty" = "xyes"; then ++ AC_DEFINE(HAVE_OPENPTY,,Have openpty() function) ++ no_ptc_check=yes ++ no_ptmx_check=yes ++fi + + AC_ARG_ENABLE(syslog, + [ --disable-syslog Don't include syslog support], diff --git a/openembedded/packages/dropbear/dropbear-0.46/fix-2kb-keys.patch b/openembedded/packages/dropbear/dropbear-0.46/fix-2kb-keys.patch new file mode 100644 index 0000000000..ba2b19d44a --- /dev/null +++ b/openembedded/packages/dropbear/dropbear-0.46/fix-2kb-keys.patch @@ -0,0 +1,11 @@ +diff -Nurd dropbear-0.45/kex.h dropbear-0.45.patched/kex.h +--- dropbear-0.45/kex.h 2005-03-06 20:27:02.000000000 -0800 ++++ dropbear-0.45.patched/kex.h 2005-03-08 15:22:44.064583279 -0800 +@@ -64,6 +64,6 @@ + + }; + +-#define MAX_KEXHASHBUF 2000 ++#define MAX_KEXHASHBUF 3000 + + #endif /* _KEX_H_ */ diff --git a/openembedded/packages/dropbear/dropbear-0.46/urandom-xauth-changes-to-options.h.patch b/openembedded/packages/dropbear/dropbear-0.46/urandom-xauth-changes-to-options.h.patch new file mode 100644 index 0000000000..e2b1dd5da5 --- /dev/null +++ b/openembedded/packages/dropbear/dropbear-0.46/urandom-xauth-changes-to-options.h.patch @@ -0,0 +1,21 @@ +diff -Nurd dropbear-0.45/options.h dropbear-0.45.patched/options.h +--- dropbear-0.45/options.h 2005-03-06 20:27:02.000000000 -0800 ++++ dropbear-0.45.patched/options.h 2005-03-08 15:25:09.368742090 -0800 +@@ -143,7 +143,7 @@ + * however significantly reduce the security of your ssh connections + * if the PRNG state becomes guessable - make sure you know what you are + * doing if you change this. */ +-#define DROPBEAR_RANDOM_DEV "/dev/random" ++#define DROPBEAR_RANDOM_DEV "/dev/urandom" + + /* prngd must be manually set up to produce output */ + /*#define DROPBEAR_PRNGD_SOCKET "/var/run/dropbear-rng"*/ +@@ -167,7 +167,7 @@ + /* The command to invoke for xauth when using X11 forwarding. + * "-q" for quiet */ + #ifndef XAUTH_COMMAND +-#define XAUTH_COMMAND "/usr/X11R6/bin/xauth -q" ++#define XAUTH_COMMAND "xauth -q" + #endif + + /* if you want to enable running an sftp server (such as the one included with diff --git a/openembedded/packages/dropbear/dropbear/init b/openembedded/packages/dropbear/dropbear/init new file mode 100755 index 0000000000..d019bdb4ba --- /dev/null +++ b/openembedded/packages/dropbear/dropbear/init @@ -0,0 +1,98 @@ +#!/bin/sh +# +# Do not configure this file. Edit /etc/default/dropbear instead! +# + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/dropbear +NAME=dropbear +DESC="Dropbear SSH server" + +DROPBEAR_PORT=22 +DROPBEAR_EXTRA_ARGS= +NO_START=0 + +set -e + +test ! -r /etc/default/dropbear || . /etc/default/dropbear +test "$NO_START" = "0" || exit 0 +test -x "$DAEMON" || exit 0 +test ! -h /var/service/dropbear || exit 0 + +readonly_rootfs=0 +for flag in `awk '{ if ($2 == "/") { split($4,FLAGS,",") } }; END { for (f in FLAGS) print FLAGS[f] }' &2 + exit 1 + ;; +esac + +exit 0 diff --git a/openembedded/packages/dropbear/dropbear_0.46.bb b/openembedded/packages/dropbear/dropbear_0.46.bb new file mode 100644 index 0000000000..80373e3a1b --- /dev/null +++ b/openembedded/packages/dropbear/dropbear_0.46.bb @@ -0,0 +1,72 @@ +DESCRIPTION = "Dropbear is a lightweight SSH and SCP Implementation" +HOMEPAGE = "http://matt.ucc.asn.au/dropbear/dropbear.html" +SECTION = "console/network" +LICENSE = "MIT" +DEPENDS = "zlib" +PR = "r3" +PROVIDES = "ssh sshd" + +SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \ + file://urandom-xauth-changes-to-options.h.patch;patch=1 \ + file://configure.patch;patch=1 \ + file://allow-nopw.patch \ + file://fix-2kb-keys.patch;patch=1 \ + file://init" + +inherit autotools update-rc.d + +INITSCRIPT_NAME = "dropbear" +INITSCRIPT_PARAMS = "defaults 10" + +CFLAGS_prepend = "-I. " +LD = "${CC}" + +SBINCOMMANDS = "dropbear dropbearkey dropbearconvert" +BINCOMMANDS = "dbclient ssh scp" +EXTRA_OEMAKE = 'MULTI=1 SCPPROGRESS=1 PROGRAMS="${SBINCOMMANDS} ${BINCOMMANDS}"' + +do_configure_prepend() { + if [ "${DISTRO_TYPE}" == "debug" ]; then + patch -p1 < ${WORKDIR}/allow-nopw.patch + fi +} + +do_install() { + install -d ${D}${sysconfdir} \ + ${D}${sysconfdir}/init.d \ + ${D}${sysconfdir}/default \ + ${D}${sysconfdir}/dropbear \ + ${D}${bindir} \ + ${D}${sbindir} \ + ${D}${localstatedir} + + install -m 0755 dropbearmulti ${D}${sbindir}/ + ln -s ${sbindir}/dropbearmulti ${D}${bindir}/dbclient + + for i in ${SBINCOMMANDS} + do + ln -s ./dropbearmulti ${D}${sbindir}/$i + done + cat ${WORKDIR}/init | sed -e 's,/etc,${sysconfdir},g' \ + -e 's,/usr/sbin,${sbindir},g' \ + -e 's,/var,${localstatedir},g' \ + -e 's,/usr/bin,${bindir},g' \ + -e 's,/usr,${prefix},g' > ${D}${sysconfdir}/init.d/dropbear + chmod 755 ${D}${sysconfdir}/init.d/dropbear +} + +pkg_postinst () { + update-alternatives --install ${bindir}/scp scp ${sbindir}/dropbearmulti 20 + update-alternatives --install ${bindir}/ssh ssh ${sbindir}/dropbearmulti 20 +} + +pkg_postrm_append () { + if [ -f "${sysconfdir}/dropbear/dropbear_rsa_host_key" ]; then + rm ${sysconfdir}/dropbear/dropbear_rsa_host_key + fi + if [ -f "${sysconfdir}/dropbear/dropbear_dss_host_key" ]; then + rm ${sysconfdir}/dropbear/dropbear_dss_host_key + fi + update-alternatives --remove ssh ${bindir}/dropbearmulti + update-alternatives --remove scp ${bindir}/dropbearmulti +} diff --git a/openembedded/packages/expat/expat-1.95.7/autotools.patch b/openembedded/packages/expat/expat-1.95.7/autotools.patch new file mode 100644 index 0000000000..f22b2401c8 --- /dev/null +++ b/openembedded/packages/expat/expat-1.95.7/autotools.patch @@ -0,0 +1,13 @@ +--- expat-1.95.7/configure.in~autotools 2004-05-13 22:46:28.000000000 -0400 ++++ expat-1.95.7/configure.in 2004-05-13 22:46:39.000000000 -0400 +@@ -50,9 +50,7 @@ + + AC_CONFIG_HEADER(expat_config.h) + +-sinclude(conftools/libtool.m4) +-sinclude(conftools/ac_c_bigendian_cross.m4) +- ++ + AC_LIBTOOL_WIN32_DLL + AC_PROG_LIBTOOL + diff --git a/openembedded/packages/expat/expat-native_1.95.7.bb b/openembedded/packages/expat/expat-native_1.95.7.bb new file mode 100644 index 0000000000..2c40ba8488 --- /dev/null +++ b/openembedded/packages/expat/expat-native_1.95.7.bb @@ -0,0 +1,4 @@ +SECTION = "libs" +include expat_${PV}.bb +inherit native +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/expat-${PV}" diff --git a/openembedded/packages/expat/expat_1.95.7.bb b/openembedded/packages/expat/expat_1.95.7.bb new file mode 100644 index 0000000000..95572ce84b --- /dev/null +++ b/openembedded/packages/expat/expat_1.95.7.bb @@ -0,0 +1,29 @@ +SECTION = "libs" +DESCRIPTION = "Jim Clarkes XML parser library." +HOMEPAGE = "http://expat.sourceforge.net/" +LICENSE = "MIT" + +SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.gz \ + file://autotools.patch;patch=1" +S = "${WORKDIR}/expat-${PV}" + +inherit autotools lib_package +export LTCC = "${CC}" + +do_configure () { + rm -f ${S}/conftools/libtool.m4 + autotools_do_configure +} + +do_stage () { + install -m 0644 ${S}/lib/expat.h ${STAGING_INCDIR}/ + oe_libinstall -so libexpat ${STAGING_LIBDIR} +} + +do_install () { + oe_runmake prefix="${D}${prefix}" \ + bindir="${D}${bindir}" \ + libdir="${D}${libdir}" \ + includedir="${D}${includedir}" \ + install +} diff --git a/openembedded/packages/fakeroot/fakeroot-native_1.2.13.bb b/openembedded/packages/fakeroot/fakeroot-native_1.2.13.bb new file mode 100644 index 0000000000..4df6eeb5c5 --- /dev/null +++ b/openembedded/packages/fakeroot/fakeroot-native_1.2.13.bb @@ -0,0 +1,13 @@ +SECTION = "base" +PR = "r0" +include fakeroot_${PV}.bb +inherit native + +SRC_URI += "file://fix-prefix.patch;patch=1" +S = "${WORKDIR}/fakeroot-${PV}" + +EXTRA_OECONF = "--program-prefix=" + +do_stage_append () { + oe_libinstall -so libfakeroot ${STAGING_LIBDIR}/libfakeroot/ +} diff --git a/openembedded/packages/fakeroot/fakeroot_1.2.13.bb b/openembedded/packages/fakeroot/fakeroot_1.2.13.bb new file mode 100644 index 0000000000..f141330276 --- /dev/null +++ b/openembedded/packages/fakeroot/fakeroot_1.2.13.bb @@ -0,0 +1,8 @@ +SECTION = "base" +DESCRIPTION = "Gives a fake root environment" +HOMEPAGE = "http://joostje.op.het.net/fakeroot/index.html" +LICENSE = "GPL" + +SRC_URI = "${DEBIAN_MIRROR}/main/f/fakeroot/fakeroot_${PV}.tar.gz" + +inherit autotools diff --git a/openembedded/packages/fakeroot/files/fix-prefix.patch b/openembedded/packages/fakeroot/files/fix-prefix.patch new file mode 100644 index 0000000000..3884aca01c --- /dev/null +++ b/openembedded/packages/fakeroot/files/fix-prefix.patch @@ -0,0 +1,18 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- fakeroot-1.2.13/scripts/fakeroot.in~fix-prefix ++++ fakeroot-1.2.13/scripts/fakeroot.in +@@ -15,8 +15,8 @@ + } + + # strip /bin/fakeroot to find install prefix +-PREFIX=@prefix@ +-BINDIR=@bindir@ ++BINDIR=`dirname $0` ++PREFIX=`dirname ${BINDIR}` + + LIB=lib@fakeroot_transformed@.so.0 + PATHS=@libdir@:${PREFIX}/lib64/libfakeroot:${PREFIX}/lib32/libfakeroot diff --git a/openembedded/packages/fixesext/fixesext_cvs.bb b/openembedded/packages/fixesext/fixesext_cvs.bb new file mode 100644 index 0000000000..887ae2a138 --- /dev/null +++ b/openembedded/packages/fixesext/fixesext_cvs.bb @@ -0,0 +1,20 @@ +PV = "0.0cvs${CVSDATE}" +LICENSE= "BSD-X" +SECTION = "libs" +MAINTAINER = "Greg Gilbert " +DEPENDS = "xextensions" +DESCRIPTION = "X Fixes extension headers and specification." +DEFAULT_PREFERENCE = "1" + +SRC_URI = "cvs://anoncvs:anoncvs@pdx.freedesktop.org/cvs/xlibs;module=FixesExt" +S = "${WORKDIR}/FixesExt" + +inherit autotools pkgconfig + +do_stage() { + oe_runmake install prefix=${STAGING_DIR} \ + bindir=${STAGING_BINDIR} \ + includedir=${STAGING_INCDIR} \ + libdir=${STAGING_LIBDIR} \ + datadir=${STAGING_DATADIR} +} diff --git a/openembedded/packages/flex/files/fix-gen.patch b/openembedded/packages/flex/files/fix-gen.patch new file mode 100644 index 0000000000..55f4f6fdf5 --- /dev/null +++ b/openembedded/packages/flex/files/fix-gen.patch @@ -0,0 +1,17 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- flex-2.5.31/gen.c~fix-gen ++++ flex-2.5.31/gen.c +@@ -1812,8 +1812,7 @@ + if (yytext_is_array) { + if (!reentrant){ + indent_puts ("static int yy_more_offset = 0;"); +- }else{ +- indent_puts ("static int yy_prev_more_offset = 0;"); ++ indent_puts ("static int yy_prev_more_offset = 0;"); + } + } + else if (!reentrant) { diff --git a/openembedded/packages/flex/flex-2.5.31/include.patch b/openembedded/packages/flex/flex-2.5.31/include.patch new file mode 100644 index 0000000000..b60dcb29de --- /dev/null +++ b/openembedded/packages/flex/flex-2.5.31/include.patch @@ -0,0 +1,27 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- flex-2.5.31/Makefile.am~include ++++ flex-2.5.31/Makefile.am +@@ -141,7 +141,7 @@ + tests + + localedir = $(datadir)/locale +-AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I@includedir@ -I$(top_srcdir)/intl ++AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I$(top_srcdir)/intl + LIBS = @LIBINTL@ @LIBS@ + + skel.c: flex.skl mkskel.sh flexint.h tables_shared.h +--- flex-2.5.31/Makefile.in~include ++++ flex-2.5.31/Makefile.in +@@ -292,7 +292,7 @@ + + + localedir = $(datadir)/locale +-AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I@includedir@ -I$(top_srcdir)/intl ++AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I$(top_srcdir)/intl + + # Run GNU indent on sources. Don't run this unless all the sources compile cleanly. + # diff --git a/openembedded/packages/flex/flex-native_2.5.31.bb b/openembedded/packages/flex/flex-native_2.5.31.bb new file mode 100644 index 0000000000..ff8a42772b --- /dev/null +++ b/openembedded/packages/flex/flex-native_2.5.31.bb @@ -0,0 +1,10 @@ +include flex.inc +inherit native +PR = "r2" + +do_stage () { + install -m 0755 flex ${STAGING_BINDIR} + oe_libinstall -a libfl ${STAGING_LIBDIR} + ln -sf ./flex ${STAGING_BINDIR}/flex++ + ln -sf ./flex ${STAGING_BINDIR}/lex +} diff --git a/openembedded/packages/flex/flex.inc b/openembedded/packages/flex/flex.inc new file mode 100644 index 0000000000..6e605ac9be --- /dev/null +++ b/openembedded/packages/flex/flex.inc @@ -0,0 +1,10 @@ +DESCRIPTION = "Flex is a tool for generating programs that recognize lexical patterns in text." +SECTION = "devel" +LICENSE = "BSD" + +SRC_URI = "${SOURCEFORGE_MIRROR}/lex/flex-2.5.31.tar.bz2 \ + file://fix-gen.patch;patch=1" +S = "${WORKDIR}/flex-${PV}" + +inherit autotools + diff --git a/openembedded/packages/flex/flex_2.5.31.bb b/openembedded/packages/flex/flex_2.5.31.bb new file mode 100644 index 0000000000..b96c645136 --- /dev/null +++ b/openembedded/packages/flex/flex_2.5.31.bb @@ -0,0 +1,9 @@ +include flex.inc +PR = "r4" + +SRC_URI += "file://include.patch;patch=1" + +do_stage() { + oe_libinstall -a libfl ${STAGING_LIBDIR} +} + diff --git a/openembedded/packages/fontconfig/files/local.conf b/openembedded/packages/fontconfig/files/local.conf new file mode 100644 index 0000000000..ddd7cf9d03 --- /dev/null +++ b/openembedded/packages/fontconfig/files/local.conf @@ -0,0 +1,12 @@ + + + + + + + + unknown + + rgb + + diff --git a/openembedded/packages/fontconfig/fontconfig-2.2.95/fc-glyphname.patch b/openembedded/packages/fontconfig/fontconfig-2.2.95/fc-glyphname.patch new file mode 100644 index 0000000000..1afd9324ff --- /dev/null +++ b/openembedded/packages/fontconfig/fontconfig-2.2.95/fc-glyphname.patch @@ -0,0 +1,19 @@ +--- fontconfig/fc-glyphname/Makefile.am~ 2004-04-14 17:06:35.000000000 +0100 ++++ fontconfig/fc-glyphname/Makefile.am 2004-05-15 11:41:35.000000000 +0100 +@@ -27,6 +27,7 @@ + TMPL=fcglyphname.tmpl.h + STMPL=${top_srcdir}/fc-glyphname/${TMPL} + TARG=fcglyphname.h ++FC_GLYPHNAME=./fc-glyphname + + noinst_PROGRAMS=fc-glyphname + +@@ -41,7 +42,7 @@ + + $(TARG): $(STMPL) fc-glyphname $(SGLYPHNAME) + rm -f $(TARG) +- ./fc-glyphname $(SGLYPHNAME) < $(STMPL) > $(TARG) ++ $(FC_GLYPHNAME) $(SGLYPHNAME) < $(STMPL) > $(TARG) + + CLEANFILES=$(TARG) + diff --git a/openembedded/packages/fontconfig/fontconfig-2.2.95/fc-lang.patch b/openembedded/packages/fontconfig/fontconfig-2.2.95/fc-lang.patch new file mode 100644 index 0000000000..d08242a377 --- /dev/null +++ b/openembedded/packages/fontconfig/fontconfig-2.2.95/fc-lang.patch @@ -0,0 +1,18 @@ +--- fontconfig/fc-lang/Makefile.am~ 2004-04-14 17:06:36.000000000 +0100 ++++ fontconfig/fc-lang/Makefile.am 2004-05-15 11:22:44.000000000 +0100 +@@ -27,6 +27,7 @@ + TMPL=fclang.tmpl.h + STMPL=${top_srcdir}/fc-lang/fclang.tmpl.h + TARG=fclang.h ++FC_LANG=./fc-lang + + noinst_PROGRAMS=fc-lang + +@@ -40,6 +41,6 @@ + + $(TARG):$(ORTH) fc-lang $(STMPL) + rm -f $(TARG) +- ./fc-lang -d ${srcdir} $(ORTH) < $(STMPL) > $(TARG) ++ $(FC_LANG) -d ${srcdir} $(ORTH) < $(STMPL) > $(TARG) + + CLEANFILES=$(TARG) diff --git a/openembedded/packages/fontconfig/fontconfig-native_2.2.95.bb b/openembedded/packages/fontconfig/fontconfig-native_2.2.95.bb new file mode 100644 index 0000000000..bc988e0ee2 --- /dev/null +++ b/openembedded/packages/fontconfig/fontconfig-native_2.2.95.bb @@ -0,0 +1,14 @@ +SECTION = "base" +LICENSE = "BSD" +include fontconfig_${PV}.bb +inherit native +DEPENDS = "freetype-native expat-native zlib-native" +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/fontconfig-${PV}" + +EXTRA_OEMAKE = "" + +do_stage () { + oe_runmake install + install fc-lang/fc-lang ${STAGING_BINDIR} + install fc-glyphname/fc-glyphname ${STAGING_BINDIR} +} diff --git a/openembedded/packages/fontconfig/fontconfig_2.2.95.bb b/openembedded/packages/fontconfig/fontconfig_2.2.95.bb new file mode 100644 index 0000000000..6989b7a053 --- /dev/null +++ b/openembedded/packages/fontconfig/fontconfig_2.2.95.bb @@ -0,0 +1,34 @@ +SECTION = "libs" +LICENSE = "BSD" +DESCRIPTION = "A library for configuring and customizing font access." +DEPENDS = "expat freetype freetype-native zlib fontconfig-native" + +SRC_URI = "http://pdx.freedesktop.org/fontconfig/release/fontconfig-${PV}.tar.gz \ + file://fc-glyphname.patch;patch=1 \ + file://fc-lang.patch;patch=1 \ + file://local.conf" +PR = "r1" + +PACKAGES =+ "fontconfig-utils " +FILES_fontconfig-utils = "${bindir}/*" + +S = "${WORKDIR}/fontconfig-${PV}" + +inherit autotools pkgconfig + +export HASDOCBOOK="no" + +EXTRA_OECONF = " --disable-docs " +EXTRA_OEMAKE = "FC_LANG=fc-lang FC_GLYPHNAME=fc-glyphname" + +do_stage () { + oe_libinstall -so -a -C src libfontconfig ${STAGING_LIBDIR} + install -d ${STAGING_INCDIR}/fontconfig + for i in ${S}/fontconfig/*.h; do install -m 0644 $i ${STAGING_INCDIR}/fontconfig/; done +} + +do_install () { + autotools_do_install + install -m 0644 ${WORKDIR}/local.conf ${D}${sysconfdir}/fonts/local.conf +} + diff --git a/openembedded/packages/freetype/files/configure.patch b/openembedded/packages/freetype/files/configure.patch new file mode 100644 index 0000000000..f11cf96be0 --- /dev/null +++ b/openembedded/packages/freetype/files/configure.patch @@ -0,0 +1,47 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +Index: freetype-2.1.8/builds/unix/configure.ac +=================================================================== +--- freetype-2.1.8.orig/builds/unix/configure.ac 2004-04-14 04:49:11.000000000 -0400 ++++ freetype-2.1.8/builds/unix/configure.ac 2005-03-12 03:14:23.000000000 -0500 +@@ -111,8 +111,8 @@ + # Check for system zlib + + AC_ARG_WITH([zlib], +- dnl don't quote AS_HELP_STRING! +- AS_HELP_STRING([--without-zlib], ++ dnl don't quote AC_HELP_STRING! ++ AC_HELP_STRING([--without-zlib], + [use internal zlib instead of system-wide])) + if test x$with_zlib != xno && test -z "$LIBZ"; then + AC_CHECK_LIB([z], [gzsetparams], [AC_CHECK_HEADER([zlib.h], [LIBZ='-lz'])]) +@@ -127,7 +127,7 @@ + # Whether to use Mac OS resource-based fonts or not + + AC_ARG_WITH([old-mac-fonts], +- dnl don't quote AS_HELP_STRING! +- AS_HELP_STRING([--with-old-mac-fonts], ++ dnl don't quote AC_HELP_STRING! ++ AC_HELP_STRING([--with-old-mac-fonts], + [allow Mac resource-based fonts to be used])) + if test x$with_old_mac_fonts = xyes; then +Index: freetype-2.1.8/builds/unix/unix-cc.in +=================================================================== +--- freetype-2.1.8.orig/builds/unix/unix-cc.in 2003-11-09 03:37:13.000000000 -0500 ++++ freetype-2.1.8/builds/unix/unix-cc.in 2005-03-12 18:37:24.613693760 -0500 +@@ -14,9 +14,11 @@ + + CC := @CC@ + COMPILER_SEP := $(SEP) ++SHELL := @SHELL@ ++top_builddir := $(BUILD_DIR) + + ifndef LIBTOOL +- LIBTOOL := $(BUILD_DIR)/libtool ++ LIBTOOL := @LIBTOOL@ + endif + + diff --git a/openembedded/packages/freetype/freetype-native_2.1.10.bb b/openembedded/packages/freetype/freetype-native_2.1.10.bb new file mode 100644 index 0000000000..64fac71cbe --- /dev/null +++ b/openembedded/packages/freetype/freetype-native_2.1.10.bb @@ -0,0 +1,21 @@ +include freetype_${PV}.bb +inherit native +DEPENDS = "" +FILESPATH = "${FILE_DIRNAME}/freetype-${PV}:${FILE_DIRNAME}/freetype:${FILE_DIRNAME}/files" + +EXTRA_OEMAKE= + +do_configure() { + (cd builds/unix && gnu-configize) || die "failure running gnu-configize" + oe_runconf +} + +do_stage() { + autotools_stage_includes + oe_libinstall -so -a -C objs libfreetype ${STAGING_LIBDIR} +} + +do_install() { + : +} + diff --git a/openembedded/packages/freetype/freetype_2.1.10.bb b/openembedded/packages/freetype/freetype_2.1.10.bb new file mode 100644 index 0000000000..772b316cc8 --- /dev/null +++ b/openembedded/packages/freetype/freetype_2.1.10.bb @@ -0,0 +1,31 @@ +DESCRIPTION = "Freetype font rendering library" +HOMEPAGE = "http://www.freetype.org" +SECTION = "libs" +LICENSE = "freetype" +PR = "r0" + +SRC_URI = "${SOURCEFORGE_MIRROR}/freetype/freetype-${PV}.tar.bz2 \ + file://configure.patch;patch=1" +S = "${WORKDIR}/freetype-${PV}" + +inherit autotools pkgconfig binconfig + +LIBTOOL = "${S}/builds/unix/${HOST_SYS}-libtool" +EXTRA_OEMAKE = "'LIBTOOL=${LIBTOOL}'" + +do_configure() { + cd builds/unix + gnu-configize + aclocal -I . + autoconf + cd ${S} + oe_runconf +} + +do_stage() { + autotools_stage_includes + oe_libinstall -so -a -C objs libfreetype ${STAGING_LIBDIR} +} + +FILES_${PN} = "${libdir}/lib*.so.*" +FILES_${PN}-dev += "${bindir}" diff --git a/openembedded/packages/gcc/gcc-3.4.3/15342.patch b/openembedded/packages/gcc/gcc-3.4.3/15342.patch new file mode 100644 index 0000000000..d0f3e72d47 --- /dev/null +++ b/openembedded/packages/gcc/gcc-3.4.3/15342.patch @@ -0,0 +1,22 @@ +--- gcc/gcc/regrename.c~ 2004-01-14 17:55:20.000000000 +0000 ++++ gcc/gcc/regrename.c 2005-02-28 07:24:25.893015200 +0000 +@@ -671,7 +671,8 @@ + + case SET: + scan_rtx (insn, &SET_SRC (x), class, action, OP_IN, 0); +- scan_rtx (insn, &SET_DEST (x), class, action, OP_OUT, 0); ++ scan_rtx (insn, &SET_DEST (x), class, action, ++ GET_CODE (PATTERN (insn)) == COND_EXEC ? OP_INOUT : OP_OUT, 0); + return; + + case STRICT_LOW_PART: +@@ -696,7 +697,8 @@ + abort (); + + case CLOBBER: +- scan_rtx (insn, &SET_DEST (x), class, action, OP_OUT, 1); ++ scan_rtx (insn, &SET_DEST (x), class, action, ++ GET_CODE (PATTERN (insn)) == COND_EXEC ? OP_INOUT : OP_OUT, 0); + return; + + case EXPR_LIST: diff --git a/openembedded/packages/gcc/gcc-3.4.3/GCC3.4.0VisibilityPatch.diff b/openembedded/packages/gcc/gcc-3.4.3/GCC3.4.0VisibilityPatch.diff new file mode 100644 index 0000000000..d51da7157d --- /dev/null +++ b/openembedded/packages/gcc/gcc-3.4.3/GCC3.4.0VisibilityPatch.diff @@ -0,0 +1,1100 @@ + +diff -aur gcc-3.4.0orig/gcc/c-common.c gcc-3.4.0/gcc/c-common.c +--- gcc-3.4.0orig/gcc/c-common.c 2004-03-19 01:32:59.000000000 +0000 ++++ gcc-3.4.0/gcc/c-common.c 2004-05-10 21:05:33.000000000 +0100 +@@ -833,7 +833,7 @@ + handle_deprecated_attribute }, + { "vector_size", 1, 1, false, true, false, + handle_vector_size_attribute }, +- { "visibility", 1, 1, true, false, false, ++ { "visibility", 1, 1, false, false, false, + handle_visibility_attribute }, + { "tls_model", 1, 1, true, false, false, + handle_tls_model_attribute }, +@@ -4886,7 +4886,16 @@ + + *no_add_attrs = true; + +- if (decl_function_context (decl) != 0 || ! TREE_PUBLIC (decl)) ++ if (TYPE_P (*node)) ++ { ++ if (TREE_CODE (*node) != RECORD_TYPE && TREE_CODE (*node) != UNION_TYPE) ++ { ++ warning ("`%s' attribute ignored on non-class types", ++ IDENTIFIER_POINTER (name)); ++ return NULL_TREE; ++ } ++ } ++ else if (decl_function_context (decl) != 0 || ! TREE_PUBLIC (decl)) + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + return NULL_TREE; +@@ -4897,6 +4906,14 @@ + error ("visibility arg not a string"); + return NULL_TREE; + } ++ ++ /* If this is a type, set the visibility on the type decl. */ ++ if (TYPE_P (decl)) ++ { ++ decl = TYPE_NAME (decl); ++ if (! decl) ++ return NULL_TREE; ++ } + + if (strcmp (TREE_STRING_POINTER (id), "default") == 0) + DECL_VISIBILITY (decl) = VISIBILITY_DEFAULT; +@@ -4908,6 +4925,14 @@ + DECL_VISIBILITY (decl) = VISIBILITY_PROTECTED; + else + error ("visibility arg must be one of \"default\", \"hidden\", \"protected\" or \"internal\""); ++ DECL_VISIBILITYSPECIFIED (decl) = 1; ++ ++ /* For decls only, go ahead and attach the attribute to the node as well. ++ This is needed so we can determine whether we have VISIBILITY_DEFAULT ++ because the visibility was not specified, or because it was explicitly ++ overridden from the class visibility. */ ++ if (DECL_P (*node)) ++ *no_add_attrs = false; + + return NULL_TREE; + } + +diff -aur gcc-3.4.0orig/gcc/c-decl.c gcc-3.4.0/gcc/c-decl.c +--- gcc-3.4.0orig/gcc/c-decl.c 2004-03-22 17:58:18.000000000 +0000 ++++ gcc-3.4.0/gcc/c-decl.c 2004-05-10 15:16:27.000000000 +0100 +@@ -1164,9 +1164,8 @@ + } + + /* warnings */ +- /* All decls must agree on a non-default visibility. */ +- if (DECL_VISIBILITY (newdecl) != VISIBILITY_DEFAULT +- && DECL_VISIBILITY (olddecl) != VISIBILITY_DEFAULT ++ /* All decls must agree on a visibility. */ ++ if (DECL_VISIBILITYSPECIFIED (newdecl) && DECL_VISIBILITYSPECIFIED (olddecl) + && DECL_VISIBILITY (newdecl) != DECL_VISIBILITY (olddecl)) + { + warning ("%Jredeclaration of '%D' with different visibility " +@@ -1361,9 +1360,12 @@ + Currently, it can only be defined in the prototype. */ + COPY_DECL_ASSEMBLER_NAME (olddecl, newdecl); + +- /* If either declaration has a nondefault visibility, use it. */ +- if (DECL_VISIBILITY (olddecl) != VISIBILITY_DEFAULT) +- DECL_VISIBILITY (newdecl) = DECL_VISIBILITY (olddecl); ++ /* Use visibility of whichever declaration had it specified */ ++ if (DECL_VISIBILITYSPECIFIED (olddecl)) ++ { ++ DECL_VISIBILITY (newdecl) = DECL_VISIBILITY (olddecl); ++ DECL_VISIBILITYSPECIFIED (newdecl) = 1; ++ } + + if (TREE_CODE (newdecl) == FUNCTION_DECL) + { + +diff -aur gcc-3.4.0orig/gcc/common.opt gcc-3.4.0/gcc/common.opt +--- gcc-3.4.0orig/gcc/common.opt 2004-02-18 00:09:04.000000000 +0000 ++++ gcc-3.4.0/gcc/common.opt 2004-05-09 08:10:50.000000000 +0100 +@@ -718,6 +718,11 @@ + Common + Add extra commentary to assembler output + ++fvisibility= ++Common Joined RejectNegative ++-fvisibility=[default|internal|hidden|protected] Set the default symbol visibility ++ ++ + fvpt + Common + Use expression value profiles in optimizations + +diff -aur gcc-3.4.0orig/gcc/c.opt gcc-3.4.0/gcc/c.opt +--- gcc-3.4.0orig/gcc/c.opt 2004-02-18 00:09:03.000000000 +0000 ++++ gcc-3.4.0/gcc/c.opt 2004-05-09 08:10:50.000000000 +0100 +@@ -656,6 +656,10 @@ + C++ ObjC++ + Use __cxa_atexit to register destructors + ++fvisibility-inlines-hidden ++C++ ++Marks all inlined methods as having hidden visibility ++ + fvtable-gc + C++ ObjC++ + Discard unused virtual functions +diff -aur gcc-3.4.0orig/gcc/c-opts.c gcc-3.4.0/gcc/c-opts.c +--- gcc-3.4.0orig/gcc/c-opts.c 2004-02-18 00:09:03.000000000 +0000 ++++ gcc-3.4.0/gcc/c-opts.c 2004-05-09 08:10:50.000000000 +0100 +@@ -912,6 +912,10 @@ + case OPT_fuse_cxa_atexit: + flag_use_cxa_atexit = value; + break; ++ ++ case OPT_fvisibility_inlines_hidden: ++ visibility_options.inlineshidden = value; ++ break; + + case OPT_fweak: + flag_weak = value; + +diff -aur gcc-3.4.0orig/gcc/cp/class.c gcc-3.4.0/gcc/cp/class.c +--- gcc-3.4.0orig/gcc/cp/class.c 2004-03-09 07:27:23.000000000 +0000 ++++ gcc-3.4.0/gcc/cp/class.c 2004-05-10 21:06:50.000000000 +0100 +@@ -524,6 +524,10 @@ + DECL_ALIGN (decl) = MAX (TYPE_ALIGN (double_type_node), + DECL_ALIGN (decl)); + ++ /* The vtable's visibility is the class visibility. There is no way ++ to override the visibility for just the vtable. */ ++ DECL_VISIBILITY (decl) = CLASSTYPE_VISIBILITY (class_type); ++ DECL_VISIBILITYSPECIFIED (decl) = CLASSTYPE_VISIBILITYSPECIFIED (class_type); + import_export_vtable (decl, class_type, 0); + + return decl; +@@ -2971,7 +2975,25 @@ + continue; + + if (TREE_CODE (x) == CONST_DECL || TREE_CODE (x) == VAR_DECL) +- continue; ++ { ++ /* Apply the class's visibility attribute to static members ++ which do not have a visibility attribute. */ ++ if (! lookup_attribute ("visibility", DECL_ATTRIBUTES (x))) ++ { ++ if (visibility_options.inlineshidden && DECL_INLINE (x)) ++ { ++ DECL_VISIBILITY (x) = VISIBILITY_HIDDEN; ++ DECL_VISIBILITYSPECIFIED (x) = 1; ++ } ++ else ++ { ++ DECL_VISIBILITY (x) = CLASSTYPE_VISIBILITY (current_class_type); ++ DECL_VISIBILITYSPECIFIED (x) = CLASSTYPE_VISIBILITYSPECIFIED (current_class_type); ++ } ++ } ++ ++ continue; ++ } + + /* Now it can only be a FIELD_DECL. */ + +@@ -3708,6 +3730,22 @@ + check_for_override (x, t); + if (DECL_PURE_VIRTUAL_P (x) && ! DECL_VINDEX (x)) + cp_error_at ("initializer specified for non-virtual method `%D'", x); ++ ++ /* Apply the class's visibility attribute to methods which do ++ not have a visibility attribute. */ ++ if (! lookup_attribute ("visibility", DECL_ATTRIBUTES (x))) ++ { ++ if (visibility_options.inlineshidden && DECL_INLINE (x)) ++ { ++ DECL_VISIBILITY (x) = VISIBILITY_HIDDEN; ++ DECL_VISIBILITYSPECIFIED (x) = 1; ++ } ++ else ++ { ++ DECL_VISIBILITY (x) = CLASSTYPE_VISIBILITY (current_class_type); ++ DECL_VISIBILITYSPECIFIED (x) = CLASSTYPE_VISIBILITYSPECIFIED (current_class_type); ++ } ++ } + + /* The name of the field is the original field name + Save this in auxiliary field for later overloading. */ +@@ -7830,3 +7868,4 @@ + *vid->last_init = build_tree_list (NULL_TREE, init); + vid->last_init = &TREE_CHAIN (*vid->last_init); + } ++ + +diff -aur gcc-3.4.0orig/gcc/cp/cp-tree.h gcc-3.4.0/gcc/cp/cp-tree.h +--- gcc-3.4.0orig/gcc/cp/cp-tree.h 2004-03-20 00:13:08.000000000 +0000 ++++ gcc-3.4.0/gcc/cp/cp-tree.h 2004-05-10 20:56:56.000000000 +0100 +@@ -1008,7 +1008,12 @@ + #define PUBLICLY_UNIQUELY_DERIVED_P(PARENT, TYPE) \ + (lookup_base ((TYPE), (PARENT), ba_not_special | ba_quiet, NULL) \ + != NULL_TREE) +- ++ ++/* Gives the visibility specification for a class type. */ ++#define CLASSTYPE_VISIBILITY(TYPE) DECL_VISIBILITY (TYPE_NAME (TYPE)) ++#define CLASSTYPE_VISIBILITYSPECIFIED(TYPE) DECL_VISIBILITYSPECIFIED (TYPE_NAME (TYPE)) ++ ++ + /* This is a few header flags for 'struct lang_type'. Actually, + all but the first are used only for lang_type_class; they + are put in this structure to save space. */ + +diff -aur gcc-3.4.0orig/gcc/cp/decl.c gcc-3.4.0/gcc/cp/decl.c +--- gcc-3.4.0orig/gcc/cp/decl.c 2004-04-01 21:47:21.000000000 +0100 ++++ gcc-3.4.0/gcc/cp/decl.c 2004-05-28 21:16:11.000000000 +0100 +@@ -1869,17 +1869,34 @@ + DECL_COMMON (newdecl) = DECL_COMMON (olddecl); + COPY_DECL_ASSEMBLER_NAME (olddecl, newdecl); + +- /* If either declaration has a nondefault visibility, use it. */ +- if (DECL_VISIBILITY (olddecl) != VISIBILITY_DEFAULT) ++ /* Warn about conflicting visibility specifications. */ ++ if (DECL_VISIBILITYSPECIFIED (olddecl) && DECL_VISIBILITYSPECIFIED (newdecl) ++ && DECL_VISIBILITY (newdecl) != DECL_VISIBILITY (olddecl)) ++ { ++ warning ("%J'%D': visibility attribute ignored because it", ++ newdecl, newdecl); ++ warning ("%Jconflicts with previous declaration here", olddecl); ++ } ++ /* Choose the declaration which specified visibility. */ ++ if (DECL_VISIBILITYSPECIFIED (olddecl)) + { +- if (DECL_VISIBILITY (newdecl) != VISIBILITY_DEFAULT +- && DECL_VISIBILITY (newdecl) != DECL_VISIBILITY (olddecl)) +- { +- warning ("%J'%D': visibility attribute ignored because it", +- newdecl, newdecl); +- warning ("%Jconflicts with previous declaration here", olddecl); +- } + DECL_VISIBILITY (newdecl) = DECL_VISIBILITY (olddecl); ++ DECL_VISIBILITYSPECIFIED (newdecl) = 1; ++ } ++ /* If it's a definition of a global operator new or operator ++ delete, it must be default visibility. */ ++ if (NEW_DELETE_OPNAME_P (DECL_NAME (newdecl)) && DECL_INITIAL (newdecl) != NULL_TREE) ++ { ++ if (!DECL_FUNCTION_MEMBER_P (newdecl) && VISIBILITY_DEFAULT != DECL_VISIBILITY (newdecl)) ++ { ++ warning ("%J`%D': ignoring non-default symbol", ++ newdecl, newdecl); ++ warning ("%Jvisibility on global operator new or delete", newdecl); ++ DECL_VISIBILITY (olddecl) = VISIBILITY_DEFAULT; ++ DECL_VISIBILITYSPECIFIED (olddecl) = 1; ++ DECL_VISIBILITY (newdecl) = VISIBILITY_DEFAULT; ++ DECL_VISIBILITYSPECIFIED (newdecl) = 1; ++ } + } + + if (TREE_CODE (newdecl) == FUNCTION_DECL) + +diff -aur gcc-3.4.0orig/gcc/cp/method.c gcc-3.4.0/gcc/cp/method.c +--- gcc-3.4.0orig/gcc/cp/method.c 2004-04-08 23:15:58.000000000 +0100 ++++ gcc-3.4.0/gcc/cp/method.c 2004-05-09 08:10:52.000000000 +0100 +@@ -394,6 +394,7 @@ + rewrite. */ + TREE_PUBLIC (thunk_fndecl) = TREE_PUBLIC (function); + DECL_VISIBILITY (thunk_fndecl) = DECL_VISIBILITY (function); ++ DECL_VISIBILITYSPECIFIED (thunk_fndecl) = DECL_VISIBILITYSPECIFIED (function); + + if (flag_syntax_only) + { + +diff -aur gcc-3.4.0orig/gcc/cp/optimize.c gcc-3.4.0/gcc/cp/optimize.c +--- gcc-3.4.0orig/gcc/cp/optimize.c 2004-02-08 01:52:50.000000000 +0000 ++++ gcc-3.4.0/gcc/cp/optimize.c 2004-05-09 08:10:52.000000000 +0100 +@@ -155,6 +155,7 @@ + DECL_NOT_REALLY_EXTERN (clone) = DECL_NOT_REALLY_EXTERN (fn); + TREE_PUBLIC (clone) = TREE_PUBLIC (fn); + DECL_VISIBILITY (clone) = DECL_VISIBILITY (fn); ++ DECL_VISIBILITYSPECIFIED (clone) = DECL_VISIBILITYSPECIFIED (fn); + + /* Adjust the parameter names and locations. */ + parm = DECL_ARGUMENTS (fn); + +diff -aur gcc-3.4.0orig/gcc/cp/rtti.c gcc-3.4.0/gcc/cp/rtti.c +--- gcc-3.4.0orig/gcc/cp/rtti.c 2004-03-08 23:00:26.000000000 +0000 ++++ gcc-3.4.0/gcc/cp/rtti.c 2004-05-10 21:09:21.000000000 +0100 +@@ -361,7 +361,11 @@ + pushdecl_top_level_and_finish (d, NULL_TREE); + + if (CLASS_TYPE_P (type)) +- CLASSTYPE_TYPEINFO_VAR (TYPE_MAIN_VARIANT (type)) = d; ++ { ++ CLASSTYPE_TYPEINFO_VAR (TYPE_MAIN_VARIANT (type)) = d; ++ DECL_VISIBILITY (d) = CLASSTYPE_VISIBILITY (type); ++ DECL_VISIBILITYSPECIFIED (d) = CLASSTYPE_VISIBILITYSPECIFIED (type); ++ } + + /* Remember the type it is for. */ + TREE_TYPE (name) = type; +@@ -759,6 +763,11 @@ + TREE_STATIC (name_decl) = 1; + DECL_EXTERNAL (name_decl) = 0; + TREE_PUBLIC (name_decl) = 1; ++ if (CLASS_TYPE_P (target)) ++ { ++ DECL_VISIBILITY (name_decl) = CLASSTYPE_VISIBILITY (target); ++ DECL_VISIBILITYSPECIFIED (name_decl) = CLASSTYPE_VISIBILITYSPECIFIED (target); ++ } + import_export_tinfo (name_decl, target, typeinfo_in_lib_p (target)); + /* External name of the string containing the type's name has a + special name. */ + +diff -aur gcc-3.4.0orig/gcc/c-pragma.c gcc-3.4.0/gcc/c-pragma.c +--- gcc-3.4.0orig/gcc/c-pragma.c 2004-01-23 23:35:53.000000000 +0000 ++++ gcc-3.4.0/gcc/c-pragma.c 2004-05-09 08:10:52.000000000 +0100 +@@ -480,6 +480,86 @@ + return asmname; + } + ++ ++#ifdef HANDLE_PRAGMA_VISIBILITY ++static void handle_pragma_visibility (cpp_reader *); ++ ++/* Sets the default visibility for symbols to something other than that ++ specified on the command line. */ ++static void ++handle_pragma_visibility (cpp_reader *dummy ATTRIBUTE_UNUSED) ++{ /* Form is #pragma GCC visibility push(hidden)|pop */ ++ static int visstack [16], visidx; ++ tree x; ++ enum cpp_ttype token; ++ enum { bad, push, pop } action = bad; ++ ++ token = c_lex (&x); ++ if (token == CPP_NAME) ++ { ++ const char *op = IDENTIFIER_POINTER (x); ++ if (!strcmp (op, "push")) ++ action = push; ++ else if (!strcmp (op, "pop")) ++ action = pop; ++ } ++ if (bad == action) ++ GCC_BAD ("#pragma GCC visibility must be followed by push or pop"); ++ else ++ { ++ if (pop == action) ++ { ++ if (!visidx) ++ { ++ GCC_BAD ("No matching push for '#pragma GCC visibility pop'"); ++ } ++ else ++ { ++ default_visibility = visstack[--visidx]; ++ visibility_options.inpragma = (visidx>0); ++ } ++ } ++ else ++ { ++ if (c_lex (&x) != CPP_OPEN_PAREN) ++ GCC_BAD ("missing '(' after '#pragma GCC visibility push' - ignored"); ++ token = c_lex (&x); ++ if (token != CPP_NAME) ++ { ++ GCC_BAD ("malformed #pragma GCC visibility push"); ++ } ++ else if (visidx >= 16) ++ { ++ GCC_BAD ("No more than sixteen #pragma GCC visibility pushes allowed at once"); ++ } ++ else ++ { ++ const char *str = IDENTIFIER_POINTER (x); ++ visstack[visidx++] = default_visibility; ++ if (!strcmp (str, "default")) ++ default_visibility = VISIBILITY_DEFAULT; ++ else if (!strcmp (str, "internal")) ++ default_visibility = VISIBILITY_INTERNAL; ++ else if (!strcmp (str, "hidden")) ++ default_visibility = VISIBILITY_HIDDEN; ++ else if (!strcmp (str, "protected")) ++ default_visibility = VISIBILITY_PROTECTED; ++ else ++ { ++ GCC_BAD ("#pragma GCC visibility push() must specify default, internal, hidden or protected"); ++ } ++ visibility_options.inpragma = 1; ++ } ++ if (c_lex (&x) != CPP_CLOSE_PAREN) ++ GCC_BAD ("missing '(' after '#pragma GCC visibility push' - ignored"); ++ } ++ } ++ if (c_lex (&x) != CPP_EOF) ++ warning ("junk at end of '#pragma GCC visibility'"); ++} ++ ++#endif ++ + /* Front-end wrapper for pragma registration to avoid dragging + cpplib.h in almost everywhere. */ + void +@@ -505,6 +585,9 @@ + #ifdef HANDLE_PRAGMA_EXTERN_PREFIX + c_register_pragma (0, "extern_prefix", handle_pragma_extern_prefix); + #endif ++#ifdef HANDLE_PRAGMA_VISIBILITY ++ c_register_pragma ("GCC", "visibility", handle_pragma_visibility); ++#endif + + #ifdef REGISTER_TARGET_PRAGMAS + REGISTER_TARGET_PRAGMAS (); +diff -aur gcc-3.4.0orig/gcc/c-pragma.h gcc-3.4.0/gcc/c-pragma.h +--- gcc-3.4.0orig/gcc/c-pragma.h 2004-01-31 06:18:05.000000000 +0000 ++++ gcc-3.4.0/gcc/c-pragma.h 2004-05-09 08:10:53.000000000 +0100 +@@ -44,6 +44,11 @@ + #define HANDLE_PRAGMA_PACK 1 + #endif /* HANDLE_PRAGMA_PACK_PUSH_POP */ + ++/* It's safe to always leave visibility pragma enabled as if ++ visibility is not supported on the host OS platform the ++ statements are ignored. */ ++#define HANDLE_PRAGMA_VISIBILITY 1 ++ + extern void init_pragma (void); + + /* Front-end wrapper for pragma registration to avoid dragging + + +diff -aur gcc-3.4.0orig/gcc/doc/invoke.texi gcc-3.4.0/gcc/doc/invoke.texi +--- gcc-3.4.0orig/gcc/doc/invoke.texi 2004-04-19 00:05:36.000000000 +0100 ++++ gcc-3.4.0/gcc/doc/invoke.texi 2004-05-28 21:29:36.000000000 +0100 +@@ -183,7 +183,8 @@ + -fno-optional-diags -fpermissive @gol + -frepo -fno-rtti -fstats -ftemplate-depth-@var{n} @gol + -fuse-cxa-atexit -fno-weak -nostdinc++ @gol +--fno-default-inline -Wabi -Wctor-dtor-privacy @gol ++-fno-default-inline -fvisibility-inlines-hidden @gol ++-Wabi -Wctor-dtor-privacy @gol + -Wnon-virtual-dtor -Wreorder @gol + -Weffc++ -Wno-deprecated @gol + -Wno-non-template-friend -Wold-style-cast @gol +@@ -674,7 +675,8 @@ + -fargument-alias -fargument-noalias @gol + -fargument-noalias-global -fleading-underscore @gol + -ftls-model=@var{model} @gol +--ftrapv -fwrapv -fbounds-check} ++-ftrapv -fwrapv -fbounds-check @gol ++-fvisibility} + @end table + + @menu +@@ -1433,6 +1435,20 @@ + destructors, but will only work if your C library supports + @code{__cxa_atexit}. + ++@item -fvisibility-inlines-hidden ++@opindex fvisibility-inlines-hidden ++Causes all inlined methods to be marked with ++@code{__attribute__ ((visibility ("hidden")))} so that they do not ++appear in the export table of a DSO and do not require a PLT indirection ++when used within the DSO. Enabling this option can have a dramatic effect ++on load and link times of a DSO as it massively reduces the size of the ++dynamic export table when the library makes heavy use of templates. While ++it can cause bloating through duplication of code within each DSO where ++it is used, often the wastage is less than the considerable space occupied ++by a long symbol name in the export table which is typical when using ++templates and namespaces. For even more savings, combine with the ++@code{-fvisibility=hidden} switch. ++ + @item -fno-weak + @opindex fno-weak + Do not use weak symbol support, even if it is provided by the linker. +@@ -11198,6 +11214,54 @@ + + The default without @option{-fpic} is @code{initial-exec}; with + @option{-fpic} the default is @code{global-dynamic}. ++ ++@item -fvisibility=@var{default|internal|hidden|protected} ++@opindex fvisibility ++Set the default ELF image symbol visibility to the specified option - all ++symbols will be marked with this unless overrided within the code. ++Using this feature can very substantially improve linking and ++load times of shared object libraries, produce more optimised ++code, provide near-perfect API export and prevent symbol clashes. ++It is @strong{strongly} recommended that you use this in any shared objects ++you distribute. ++ ++Despite the nomenclature, @code{default} always means public ie; ++available to be linked against from outside the shared object. ++@code{protected} and @code{internal} are pretty useless in real-world ++usage so the only other commonly used option will be @code{hidden}. ++The default if -fvisibility isn't specified is @code{default} ie; make every ++symbol public - this causes the same behaviour as previous versions of ++GCC. ++ ++A good explanation of the benefits offered by ensuring ELF ++symbols have the correct visibility is given by ``How To Write ++Shared Libraries'' by Ulrich Drepper (which can be found at ++@w{@uref{http://people.redhat.com/~drepper/}}) - however a superior ++solution made possible by this option to marking things hidden when ++the default is public is to make the default hidden and mark things ++public. This is the norm with DLL's on Windows and with @option{-fvisibility=hidden} ++and @code{__attribute__ ((visibility("default")))} instead of ++@code{__declspec(dllexport)} you get almost identical semantics with ++identical syntax. This is a great boon to those working with ++cross-platform projects. ++ ++For those adding visibility support to existing code, you may find ++@samp{#pragma GCC visibility} of use. This works by you enclosing ++the declarations you wish to set visibility for with (for example) ++@samp{#pragma GCC visibility push(hidden)} and ++@samp{#pragma GCC visibility pop}. These can be nested up to sixteen ++times. Bear in mind that symbol visibility should be viewed @strong{as ++part of the API interface contract} and thus all new code should ++always specify visibility when it is not the default ie; declarations ++only for use within the local DSO should @strong{always} be marked explicitly ++as hidden as so to avoid PLT indirection overheads - making this ++abundantly clear also aids readability and self-documentation of the code. ++Note that due to ISO C++ specification requirements, operator new and ++operator delete must always be of default visibility. ++ ++An overview of these techniques, their benefits and how to use them ++is at @w{@uref{http://www.nedprod.com/programs/gccvisibility.html}}. ++ + @end table + + @c man end + +diff -aur gcc-3.4.0orig/gcc/flags.h gcc-3.4.0/gcc/flags.h +--- gcc-3.4.0orig/gcc/flags.h 2004-02-18 00:09:04.000000000 +0000 ++++ gcc-3.4.0/gcc/flags.h 2004-05-09 08:10:53.000000000 +0100 +@@ -60,6 +60,30 @@ + /* Nonzero means emit debugging information only for symbols which are used. */ + extern int flag_debug_only_used_symbols; + ++/* Enumerate visibility settings. */ ++#ifndef SYMBOL_VISIBILITY_DEFINED ++#define SYMBOL_VISIBILITY_DEFINED ++enum symbol_visibility ++{ ++ VISIBILITY_DEFAULT, ++ VISIBILITY_INTERNAL, ++ VISIBILITY_HIDDEN, ++ VISIBILITY_PROTECTED ++}; ++#endif ++ ++/* The default visibility for all symbols (unless overridden). */ ++extern enum symbol_visibility default_visibility; ++ ++struct visibility_flags ++{ ++ unsigned inpragma : 1; /* True when in #pragma GCC visibility. */ ++ unsigned inlineshidden : 1; /* True when -finlineshidden in effect. */ ++}; ++ ++/* Global visibility options. */ ++extern struct visibility_flags visibility_options; ++ + /* Nonzero means do optimizations. -opt. */ + + extern int optimize; + +diff -aur gcc-3.4.0orig/gcc/opts.c gcc-3.4.0/gcc/opts.c +--- gcc-3.4.0orig/gcc/opts.c 2004-02-18 00:09:04.000000000 +0000 ++++ gcc-3.4.0/gcc/opts.c 2004-05-09 08:10:53.000000000 +0100 +@@ -142,6 +142,12 @@ + write_symbols is set to DBX_DEBUG, XCOFF_DEBUG, or DWARF_DEBUG. */ + bool use_gnu_debug_info_extensions; + ++/* The default visibility for all symbols (unless overridden) */ ++enum symbol_visibility default_visibility = VISIBILITY_DEFAULT; ++ ++/* Global visibility options. */ ++struct visibility_flags visibility_options; ++ + /* Columns of --help display. */ + static unsigned int columns = 80; + +@@ -1440,6 +1446,21 @@ + flag_verbose_asm = value; + break; + ++ case OPT_fvisibility_: ++ { ++ if(!strcmp(arg, "default")) ++ default_visibility=VISIBILITY_DEFAULT; ++ else if(!strcmp(arg, "internal")) ++ default_visibility=VISIBILITY_INTERNAL; ++ else if(!strcmp(arg, "hidden")) ++ default_visibility=VISIBILITY_HIDDEN; ++ else if(!strcmp(arg, "protected")) ++ default_visibility=VISIBILITY_PROTECTED; ++ else ++ error("unrecognised visibility value \"%s\"", arg); ++ } ++ break; ++ + case OPT_fweb: + flag_web = value; + break; + +diff -aur gcc-3.4.0orig/gcc/tree.c gcc-3.4.0/gcc/tree.c +--- gcc-3.4.0orig/gcc/tree.c 2004-02-05 22:01:35.000000000 +0000 ++++ gcc-3.4.0/gcc/tree.c 2004-05-10 15:22:52.000000000 +0100 +@@ -2563,6 +2563,11 @@ + layout_decl (t, 0); + else if (code == FUNCTION_DECL) + DECL_MODE (t) = FUNCTION_MODE; ++ ++ /* Set default visibility to whatever the user supplied with ++ visibility_specified depending on #pragma GCC visibility. */ ++ DECL_VISIBILITY (t) = default_visibility; ++ DECL_VISIBILITYSPECIFIED (t) = visibility_options.inpragma; + + return t; + } + +diff -aur gcc-3.4.0orig/gcc/tree.h gcc-3.4.0/gcc/tree.h +--- gcc-3.4.0orig/gcc/tree.h 2004-02-08 01:52:43.000000000 +0000 ++++ gcc-3.4.0/gcc/tree.h 2004-05-09 08:10:54.000000000 +0100 +@@ -1499,6 +1499,10 @@ + /* Value of the decls's visibility attribute */ + #define DECL_VISIBILITY(NODE) (DECL_CHECK (NODE)->decl.visibility) + ++/* Nonzero means that the decl had its visibility specified rather than ++ being inferred. */ ++#define DECL_VISIBILITYSPECIFIED(NODE) (DECL_CHECK (NODE)->decl.visibility_specified) ++ + /* In a FUNCTION_DECL, nonzero if the function cannot be inlined. */ + #define DECL_UNINLINABLE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.uninlinable) + +@@ -1633,7 +1637,8 @@ + || TREE_CODE (DECL_CONTEXT (EXP)) == TRANSLATION_UNIT_DECL) + + /* Enumerate visibility settings. */ +- ++#ifndef SYMBOL_VISIBILITY_DEFINED ++#define SYMBOL_VISIBILITY_DEFINED + enum symbol_visibility + { + VISIBILITY_DEFAULT, +@@ -1641,6 +1646,7 @@ + VISIBILITY_HIDDEN, + VISIBILITY_PROTECTED + }; ++#endif + + struct function; + +@@ -1684,8 +1690,7 @@ + unsigned thread_local_flag : 1; + unsigned declared_inline_flag : 1; + ENUM_BITFIELD(symbol_visibility) visibility : 2; +- unsigned unused : 1; +- /* one unused bit. */ ++ unsigned visibility_specified : 1; + + unsigned lang_flag_0 : 1; + unsigned lang_flag_1 : 1; + +diff -aur gcc-3.4.0orig/gcc/varasm.c gcc-3.4.0/gcc/varasm.c +--- gcc-3.4.0orig/gcc/varasm.c 2004-04-14 22:14:08.000000000 +0100 ++++ gcc-3.4.0/gcc/varasm.c 2004-05-09 08:10:54.000000000 +0100 +@@ -5150,8 +5150,8 @@ + /* Static variables are always local. */ + else if (! TREE_PUBLIC (exp)) + local_p = true; +- /* A variable is local if the user tells us so. */ +- else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT) ++ /* A variable is local if the user explicitly tells us so. */ ++ else if (DECL_VISIBILITYSPECIFIED (exp) && DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT) + local_p = true; + /* Otherwise, variables defined outside this object may not be local. */ + else if (DECL_EXTERNAL (exp)) +@@ -5159,6 +5159,9 @@ + /* Linkonce and weak data are never local. */ + else if (DECL_ONE_ONLY (exp) || DECL_WEAK (exp)) + local_p = false; ++ /* If none of the above and visibility is not default, make local. */ ++ else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT) ++ local_p = true; + /* If PIC, then assume that any global name can be overridden by + symbols resolved from other modules. */ + else if (shlib) + +diff -Naur gcc-3.4.0orig/gcc/testsuite/gcc.dg/visibility-9.c gcc-3.4.0/gcc/testsuite/gcc.dg/visibility-9.c +--- gcc-3.4.0orig/gcc/testsuite/gcc.dg/visibility-9.c 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-3.4.0/gcc/testsuite/gcc.dg/visibility-9.c 2004-05-09 12:40:39.000000000 +0100 +@@ -0,0 +1,9 @@ ++/* Test that -fvisibility works. */ ++/* { dg-do compile } */ ++/* { dg-require-visibility "" } */ ++/* { dg-options "-fvisibility=hidden" } */ ++/* { dg-final { scan-assembler "\\.hidden.*foo" } } */ ++ ++void foo(); ++ ++void foo() { } +diff -Naur gcc-3.4.0orig/gcc/testsuite/gcc.dg/visibility-a.c gcc-3.4.0/gcc/testsuite/gcc.dg/visibility-a.c +--- gcc-3.4.0orig/gcc/testsuite/gcc.dg/visibility-a.c 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-3.4.0/gcc/testsuite/gcc.dg/visibility-a.c 2004-05-09 12:55:04.000000000 +0100 +@@ -0,0 +1,10 @@ ++/* Test that #pragma GCC visibility works. */ ++/* { dg-do compile } */ ++/* { dg-require-visibility "" } */ ++/* { dg-final { scan-assembler "\\.hidden.*foo" } } */ ++ ++#pragma GCC visibility push(hidden) ++void foo(); ++#pragma GCC visibility pop ++ ++void foo() { } +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/fvisibility.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/fvisibility.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/fvisibility.C 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/fvisibility.C 2004-05-09 19:17:13.000000000 +0100 +@@ -0,0 +1,12 @@ ++/* Test that -fvisibility affects class members. */ ++/* { dg-do compile } */ ++/* { dg-require-visibility "" } */ ++/* { dg-options "-fvisibility=hidden" } */ ++/* { dg-final { scan-assembler "\\.hidden.*Foo.methodEv" } } */ ++ ++class Foo ++{ ++ void method(); ++}; ++ ++void Foo::method() { } +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/fvisibility-inlines-hidden.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/fvisibility-inlines-hidden.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/fvisibility-inlines-hidden.C 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/fvisibility-inlines-hidden.C 2004-05-09 19:17:59.000000000 +0100 +@@ -0,0 +1,18 @@ ++/* Test that -fvisibility-inlines-hidden affects class members. */ ++/* { dg-do compile } */ ++/* { dg-require-visibility "" } */ ++/* { dg-options "-fvisibility-inlines-hidden" } */ ++/* { dg-final { scan-assembler "\\.hidden.*Foo.methodEv" } } */ ++ ++class Foo ++{ ++public: ++ void method() { } ++}; ++ ++int main(void) ++{ ++ Foo f; ++ f.method(); ++ return 0; ++} +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/fvisibility-override1.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/fvisibility-override1.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/fvisibility-override1.C 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/fvisibility-override1.C 2004-05-09 19:18:06.000000000 +0100 +@@ -0,0 +1,12 @@ ++/* Test that -fvisibility does not override class member specific settings. */ ++/* { dg-do compile } */ ++/* { dg-require-visibility "" } */ ++/* { dg-options "-fvisibility=hidden" } */ ++/* { dg-final { scan-assembler "\\.internal.*Foo.methodEv" } } */ ++ ++class __attribute__ ((visibility ("internal"))) Foo ++{ ++ void method(); ++}; ++ ++void Foo::method() { } +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/fvisibility-override2.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/fvisibility-override2.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/fvisibility-override2.C 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/fvisibility-override2.C 2004-05-09 19:18:12.000000000 +0100 +@@ -0,0 +1,12 @@ ++/* Test that -fvisibility does not override class member specific settings. */ ++/* { dg-do compile } */ ++/* { dg-require-visibility "" } */ ++/* { dg-options "-fvisibility=hidden" } */ ++/* { dg-final { scan-assembler "\\.internal.*Foo.methodEv" } } */ ++ ++class Foo ++{ ++ __attribute__ ((visibility ("internal"))) void method(); ++}; ++ ++void Foo::method() { } +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/memfuncts.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/memfuncts.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/memfuncts.C 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/memfuncts.C 2004-05-09 19:18:19.000000000 +0100 +@@ -0,0 +1,11 @@ ++/* Test that setting visibility for class member functions works. */ ++/* { dg-do compile } */ ++/* { dg-require-visibility "" } */ ++/* { dg-final { scan-assembler "\\.hidden.*Foo.methodEv" } } */ ++ ++class __attribute__ ((visibility ("hidden"))) Foo ++{ ++ void method(); ++}; ++ ++void Foo::method() { } +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/noPLT.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/noPLT.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/noPLT.C 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/noPLT.C 2004-05-09 19:21:49.000000000 +0100 +@@ -0,0 +1,20 @@ ++/* Test that -fvisibility=hidden prevents PLT. */ ++/* { dg-do compile } */ ++/* { dg-require-visibility "" } */ ++/* { dg-options "-fPIC -fvisibility=hidden" } */ ++/* { dg-final { scan-assembler-not "methodEv@PLT" } } */ ++ ++class Foo ++{ ++public: ++ void method(); ++}; ++ ++void Foo::method() { } ++ ++int main(void) ++{ ++ Foo f; ++ f.method(); ++ return 0; ++} +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/pragma.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/pragma.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/pragma.C 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/pragma.C 2004-05-09 19:18:30.000000000 +0100 +@@ -0,0 +1,13 @@ ++/* Test that #pragma GCC visibility affects class members. */ ++/* { dg-do compile } */ ++/* { dg-require-visibility "" } */ ++/* { dg-final { scan-assembler "\\.hidden.*Foo.methodEv" } } */ ++ ++#pragma GCC visibility push(hidden) ++class Foo ++{ ++ void method(); ++}; ++#pragma GCC visibility pop ++ ++void Foo::method() { } +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/pragma-override1.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/pragma-override1.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/pragma-override1.C 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/pragma-override1.C 2004-05-09 19:18:36.000000000 +0100 +@@ -0,0 +1,13 @@ ++/* Test that #pragma GCC visibility does not override class member specific settings. */ ++/* { dg-do compile } */ ++/* { dg-require-visibility "" } */ ++/* { dg-final { scan-assembler "\\.internal.*Foo.methodEv" } } */ ++ ++#pragma GCC visibility push(hidden) ++class __attribute__ ((visibility ("internal"))) Foo ++{ ++ void method(); ++}; ++#pragma GCC visibility pop ++ ++void Foo::method() { } +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/pragma-override2.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/pragma-override2.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/pragma-override2.C 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/pragma-override2.C 2004-05-09 19:18:44.000000000 +0100 +@@ -0,0 +1,13 @@ ++/* Test that #pragma GCC visibility does not override class member specific settings. */ ++/* { dg-do compile } */ ++/* { dg-require-visibility "" } */ ++/* { dg-final { scan-assembler "\\.internal.*Foo.methodEv" } } */ ++ ++#pragma GCC visibility push(hidden) ++class Foo ++{ ++ __attribute__ ((visibility ("internal"))) void method(); ++}; ++#pragma GCC visibility pop ++ ++void Foo::method() { } +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/staticmemfuncts.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/staticmemfuncts.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/staticmemfuncts.C 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/staticmemfuncts.C 2004-05-09 19:18:50.000000000 +0100 +@@ -0,0 +1,11 @@ ++/* Test that setting visibility for static class member functions works. */ ++/* { dg-do compile } */ ++/* { dg-require-visibility "" } */ ++/* { dg-final { scan-assembler "\\.hidden.*Foo.methodEv" } } */ ++ ++class __attribute__ ((visibility ("hidden"))) Foo ++{ ++ static void method(); ++}; ++ ++void Foo::method() { } +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/virtual.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/virtual.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/virtual.C 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/virtual.C 2004-05-09 13:24:06.000000000 +0100 +@@ -0,0 +1,11 @@ ++/* Test that setting visibility for class affects virtual table. */ ++/* { dg-do compile } */ ++/* { dg-require-visibility "" } */ ++/* { dg-final { scan-assembler "\\.hidden.*ZTV3Foo" } } */ ++ ++class __attribute__ ((visibility ("hidden"))) Foo ++{ ++ virtual void method(); ++}; ++ ++void Foo::method() { } +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/visibility-1.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/visibility-1.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/visibility-1.C 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/visibility-1.C 2003-12-10 06:34:44.000000000 +0000 +@@ -0,0 +1,8 @@ ++/* Test visibility attribute on function definition. */ ++/* { dg-do compile { target *86-*-linux* } } */ ++/* { dg-final { scan-assembler "\\.hidden.*_Z3foov" } } */ ++ ++void ++__attribute__((visibility ("hidden"))) ++foo() ++{ } +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/visibility-2.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/visibility-2.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/visibility-2.C 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/visibility-2.C 2003-12-10 06:34:44.000000000 +0000 +@@ -0,0 +1,7 @@ ++/* Test that visibility attribute on declaration extends to definition. */ ++/* { dg-do compile { target *86-*-linux* } } */ ++/* { dg-final { scan-assembler "\\.hidden.*_Z3foov" } } */ ++ ++void __attribute__((visibility ("hidden"))) foo(); ++ ++void foo() { } +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/visibility-3.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/visibility-3.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/visibility-3.C 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/visibility-3.C 2003-12-10 06:34:45.000000000 +0000 +@@ -0,0 +1,7 @@ ++/* Test visibility attribute on forward declaration of global variable */ ++/* { dg-do compile { target *86-*-linux* } } */ ++/* { dg-final { scan-assembler "\\.hidden.*xyzzy" } } */ ++ ++int ++__attribute__((visibility ("hidden"))) ++xyzzy = 5; +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/visibility-4.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/visibility-4.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/visibility-4.C 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/visibility-4.C 2003-12-10 06:34:45.000000000 +0000 +@@ -0,0 +1,8 @@ ++/* Test visibility attribute on forward declaration of global variable */ ++/* { dg-do compile { target *86-*-linux* } } */ ++/* { dg-final { scan-assembler "\\.hidden.*xyzzy" } } */ ++ ++extern int __attribute__ ((visibility ("hidden"))) ++xyzzy; ++ ++int xyzzy = 5; +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/visibility-5.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/visibility-5.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/visibility-5.C 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/visibility-5.C 2003-12-10 06:34:45.000000000 +0000 +@@ -0,0 +1,11 @@ ++/* Test visibility attribute on definition of a function that has ++ already had a forward declaration. */ ++/* { dg-do compile { target *86-*-linux* } } */ ++/* { dg-final { scan-assembler "\\.hidden.*_Z3foov" } } */ ++ ++void foo(); ++ ++void ++ __attribute__((visibility ("hidden"))) ++foo() ++{ } +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/visibility-6.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/visibility-6.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/visibility-6.C 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/visibility-6.C 2003-12-10 06:34:45.000000000 +0000 +@@ -0,0 +1,10 @@ ++/* Test visibility attribute on definition of global variable that has ++ already had a forward declaration. */ ++/* { dg-do compile { target *86-*-linux* } } */ ++/* { dg-final { scan-assembler "\\.hidden.*xyzzy" } } */ ++ ++extern int xyzzy; ++ ++int ++__attribute__((visibility ("hidden"))) ++xyzzy = 5; +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/visibility-7.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/visibility-7.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility/visibility-7.C 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility/visibility-7.C 2003-12-10 06:34:45.000000000 +0000 +@@ -0,0 +1,11 @@ ++/* Test warning from conflicting visibility specifications. */ ++/* { dg-do compile { target *86-*-linux* } } */ ++/* { dg-final { scan-assembler "\\.hidden.*xyzzy" } } */ ++ ++extern int ++__attribute__((visibility ("hidden"))) ++xyzzy; /* { dg-warning "previous declaration here" "" } */ ++ ++int ++__attribute__((visibility ("protected"))) ++xyzzy = 5; /* { dg-warning "visibility attribute ignored" "" } */ +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility-1.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility-1.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility-1.C 2003-12-10 06:34:44.000000000 +0000 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility-1.C 1970-01-01 01:00:00.000000000 +0100 +@@ -1,8 +0,0 @@ +-/* Test visibility attribute on function definition. */ +-/* { dg-do compile { target *86-*-linux* } } */ +-/* { dg-final { scan-assembler "\\.hidden.*_Z3foov" } } */ +- +-void +-__attribute__((visibility ("hidden"))) +-foo() +-{ } +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility-2.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility-2.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility-2.C 2003-12-10 06:34:44.000000000 +0000 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility-2.C 1970-01-01 01:00:00.000000000 +0100 +@@ -1,7 +0,0 @@ +-/* Test that visibility attribute on declaration extends to definition. */ +-/* { dg-do compile { target *86-*-linux* } } */ +-/* { dg-final { scan-assembler "\\.hidden.*_Z3foov" } } */ +- +-void __attribute__((visibility ("hidden"))) foo(); +- +-void foo() { } +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility-3.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility-3.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility-3.C 2003-12-10 06:34:45.000000000 +0000 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility-3.C 1970-01-01 01:00:00.000000000 +0100 +@@ -1,7 +0,0 @@ +-/* Test visibility attribute on forward declaration of global variable */ +-/* { dg-do compile { target *86-*-linux* } } */ +-/* { dg-final { scan-assembler "\\.hidden.*xyzzy" } } */ +- +-int +-__attribute__((visibility ("hidden"))) +-xyzzy = 5; +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility-4.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility-4.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility-4.C 2003-12-10 06:34:45.000000000 +0000 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility-4.C 1970-01-01 01:00:00.000000000 +0100 +@@ -1,8 +0,0 @@ +-/* Test visibility attribute on forward declaration of global variable */ +-/* { dg-do compile { target *86-*-linux* } } */ +-/* { dg-final { scan-assembler "\\.hidden.*xyzzy" } } */ +- +-extern int __attribute__ ((visibility ("hidden"))) +-xyzzy; +- +-int xyzzy = 5; +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility-5.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility-5.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility-5.C 2003-12-10 06:34:45.000000000 +0000 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility-5.C 1970-01-01 01:00:00.000000000 +0100 +@@ -1,11 +0,0 @@ +-/* Test visibility attribute on definition of a function that has +- already had a forward declaration. */ +-/* { dg-do compile { target *86-*-linux* } } */ +-/* { dg-final { scan-assembler "\\.hidden.*_Z3foov" } } */ +- +-void foo(); +- +-void +- __attribute__((visibility ("hidden"))) +-foo() +-{ } +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility-6.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility-6.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility-6.C 2003-12-10 06:34:45.000000000 +0000 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility-6.C 1970-01-01 01:00:00.000000000 +0100 +@@ -1,10 +0,0 @@ +-/* Test visibility attribute on definition of global variable that has +- already had a forward declaration. */ +-/* { dg-do compile { target *86-*-linux* } } */ +-/* { dg-final { scan-assembler "\\.hidden.*xyzzy" } } */ +- +-extern int xyzzy; +- +-int +-__attribute__((visibility ("hidden"))) +-xyzzy = 5; +diff -Naur gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility-7.C gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility-7.C +--- gcc-3.4.0orig/gcc/testsuite/g++.dg/ext/visibility-7.C 2003-12-10 06:34:45.000000000 +0000 ++++ gcc-3.4.0/gcc/testsuite/g++.dg/ext/visibility-7.C 1970-01-01 01:00:00.000000000 +0100 +@@ -1,11 +0,0 @@ +-/* Test warning from conflicting visibility specifications. */ +-/* { dg-do compile { target *86-*-linux* } } */ +-/* { dg-final { scan-assembler "\\.hidden.*xyzzy" } } */ +- +-extern int +-__attribute__((visibility ("hidden"))) +-xyzzy; /* { dg-warning "previous declaration here" "" } */ +- +-int +-__attribute__((visibility ("protected"))) +-xyzzy = 5; /* { dg-warning "visibility attribute ignored" "" } */ diff --git a/openembedded/packages/gcc/gcc-3.4.3/always-fixincperm.patch b/openembedded/packages/gcc/gcc-3.4.3/always-fixincperm.patch new file mode 100644 index 0000000000..59e5e2edeb --- /dev/null +++ b/openembedded/packages/gcc/gcc-3.4.3/always-fixincperm.patch @@ -0,0 +1,32 @@ +Index: gcc-3.4.3/gcc/configure +=================================================================== +--- gcc-3.4.3.orig/gcc/configure 2004-11-04 23:14:05.000000000 -0500 ++++ gcc-3.4.3/gcc/configure 2005-03-11 14:41:06.373910320 -0500 +@@ -9916,11 +9916,6 @@ + BUILD_PREFIX=build- + BUILD_PREFIX_1=build- + BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' +- +- if test "x$TARGET_SYSTEM_ROOT" = x; then +- STMP_FIXINC= +- STMP_FIXPROTO= +- fi + fi + + # Expand extra_headers to include complete path. +Index: gcc-3.4.3/gcc/configure.ac +=================================================================== +--- gcc-3.4.3.orig/gcc/configure.ac 2004-09-23 20:43:53.000000000 -0400 ++++ gcc-3.4.3/gcc/configure.ac 2005-03-11 14:40:55.256600408 -0500 +@@ -1524,11 +1524,6 @@ + BUILD_PREFIX=build- + BUILD_PREFIX_1=build- + BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' +- +- if test "x$TARGET_SYSTEM_ROOT" = x; then +- STMP_FIXINC= +- STMP_FIXPROTO= +- fi + fi + + # Expand extra_headers to include complete path. diff --git a/openembedded/packages/gcc/gcc-3.4.3/gcc-3.4.0-arm-bigendian-uclibc.patch b/openembedded/packages/gcc/gcc-3.4.3/gcc-3.4.0-arm-bigendian-uclibc.patch new file mode 100644 index 0000000000..8fa9af880a --- /dev/null +++ b/openembedded/packages/gcc/gcc-3.4.3/gcc-3.4.0-arm-bigendian-uclibc.patch @@ -0,0 +1,30 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- gcc-3.4.1/gcc/config.gcc~gcc-3.4.0-arm-bigendian-uclibc ++++ gcc-3.4.1/gcc/config.gcc +@@ -666,6 +666,11 @@ + ;; + arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc + tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h" ++ case $target in ++ arm*b-*) ++ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines" ++ ;; ++ esac + tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux" + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" + gnu_ld=yes +--- gcc-3.4.1/gcc/config/arm/linux-elf.h~gcc-3.4.0-arm-bigendian-uclibc ++++ gcc-3.4.1/gcc/config/arm/linux-elf.h +@@ -120,7 +120,7 @@ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \ + -X \ +- %{mbig-endian:-EB}" \ ++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ + SUBTARGET_EXTRA_LINK_SPEC + #endif + diff --git a/openembedded/packages/gcc/gcc-3.4.3/gcc-3.4.0-arm-bigendian.patch b/openembedded/packages/gcc/gcc-3.4.3/gcc-3.4.0-arm-bigendian.patch new file mode 100644 index 0000000000..c9288c6c15 --- /dev/null +++ b/openembedded/packages/gcc/gcc-3.4.3/gcc-3.4.0-arm-bigendian.patch @@ -0,0 +1,70 @@ +By Lennert Buytenhek +Adds support for arm*b-linux* big-endian ARM targets + +See http://gcc.gnu.org/PR16350 + +diff -urN gcc-3.4.0.orig/gcc/config/arm/linux-elf.h gcc-3.4.0/gcc/config/arm/linux-elf.h +--- gcc-3.4.0.orig/gcc/config/arm/linux-elf.h 2004-01-31 07:18:11.000000000 +0100 ++++ gcc-3.4.0/gcc/config/arm/linux-elf.h 2004-07-02 14:46:29.225443757 +0200 +@@ -30,17 +30,34 @@ + /* Do not assume anything about header files. */ + #define NO_IMPLICIT_EXTERN_C + ++/* ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-* ++ * (big endian) configurations. ++ */ ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END ++#define TARGET_ENDIAN_OPTION "mbig-endian" ++#define TARGET_LINKER_EMULATION "armelfb_linux" ++#else ++#define TARGET_ENDIAN_DEFAULT 0 ++#define TARGET_ENDIAN_OPTION "mlittle-endian" ++#define TARGET_LINKER_EMULATION "armelf_linux" ++#endif ++ + /* Default is to use APCS-32 mode. */ + #undef TARGET_DEFAULT +-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS) ++#define TARGET_DEFAULT \ ++ ( ARM_FLAG_APCS_32 | \ ++ ARM_FLAG_MMU_TRAPS | \ ++ TARGET_ENDIAN_DEFAULT ) + + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6 + +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p" ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p" + + #undef MULTILIB_DEFAULTS + #define MULTILIB_DEFAULTS \ +- { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" } ++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" } + + #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__" + +@@ -89,7 +106,7 @@ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \ + -X \ +- %{mbig-endian:-EB}" \ ++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ + SUBTARGET_EXTRA_LINK_SPEC + + #define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS() +diff -urN gcc-3.4.0.orig/gcc/config.gcc gcc-3.4.0/gcc/config.gcc +--- gcc-3.4.0.orig/gcc/config.gcc 2004-04-17 04:28:24.000000000 +0200 ++++ gcc-3.4.0/gcc/config.gcc 2004-07-02 14:44:40.045822542 +0200 +@@ -666,6 +666,11 @@ + ;; + arm*-*-linux*) # ARM GNU/Linux with ELF + tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h" ++ case $target in ++ arm*b-*) ++ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines" ++ ;; ++ esac + tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux" + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" + gnu_ld=yes diff --git a/openembedded/packages/gcc/gcc-3.4.3/gcc-3.4.0-arm-lib1asm.patch b/openembedded/packages/gcc/gcc-3.4.3/gcc-3.4.0-arm-lib1asm.patch new file mode 100644 index 0000000000..ca42bfbc0a --- /dev/null +++ b/openembedded/packages/gcc/gcc-3.4.3/gcc-3.4.0-arm-lib1asm.patch @@ -0,0 +1,24 @@ +# Fixes errors like the following when building glibc (or any other executable +# or shared library) when using gcc 3.4.0 for ARM with softfloat: +# +# .../libc_pic.os(.text+0x15834): In function `__modf': undefined reference to `__subdf3' +# .../libc_pic.os(.text+0x158b8): In function `__modf': undefined reference to `__subdf3' +# .../libc_pic.os(.text+0x1590c): In function `scalbn': undefined reference to `__muldf3' +# .../libc_pic.os(.text+0x15e94): In function `__ldexpf': undefined reference to `__eqsf2' +# .../libc_pic.os(.text+0xcee4c): In function `monstartup': undefined reference to `__fixsfsi' + +diff -urNd gcc-3.4.0-orig/gcc/config/arm/t-linux gcc-3.4.0/gcc/config/arm/t-linux +--- gcc-3.4.0-orig/gcc/config/arm/t-linux 2003-09-20 23:09:07.000000000 +0200 ++++ gcc-3.4.0/gcc/config/arm/t-linux 2004-05-01 20:31:59.102846400 +0200 +@@ -4,7 +4,10 @@ + LIBGCC2_DEBUG_CFLAGS = -g0 + + LIB1ASMSRC = arm/lib1funcs.asm +-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx ++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \ ++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \ ++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \ ++ _fixsfsi _fixunssfsi + + # MULTILIB_OPTIONS = mhard-float/msoft-float + # MULTILIB_DIRNAMES = hard-float soft-float diff --git a/openembedded/packages/gcc/gcc-3.4.3/gcc-3.4.0-arm-nolibfloat.patch b/openembedded/packages/gcc/gcc-3.4.3/gcc-3.4.0-arm-nolibfloat.patch new file mode 100644 index 0000000000..43eed3ef28 --- /dev/null +++ b/openembedded/packages/gcc/gcc-3.4.3/gcc-3.4.0-arm-nolibfloat.patch @@ -0,0 +1,24 @@ +# Dimitry Andric , 2004-05-01 +# +# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed +# anymore. (The required functions are now in libgcc.) +# +# Fixes errors like +# arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat +# collect2: ld returned 1 exit status +# make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1 +# when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat + +diff -urNd gcc-3.4.0-orig/gcc/config/arm/linux-elf.h gcc-3.4.0/gcc/config/arm/linux-elf.h +--- gcc-3.4.0-orig/gcc/config/arm/linux-elf.h 2004-01-31 07:18:11.000000000 +0100 ++++ gcc-3.4.0/gcc/config/arm/linux-elf.h 2004-05-01 19:19:06.935979200 +0200 +@@ -55,7 +73,7 @@ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" + +-#define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc" ++#define LIBGCC_SPEC "-lgcc" + + /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add + the GNU/Linux magical crtbegin.o file (see crtstuff.c) which + diff --git a/openembedded/packages/gcc/gcc-3.4.3/gcc-3.4.0-arm-softfloat.patch b/openembedded/packages/gcc/gcc-3.4.3/gcc-3.4.0-arm-softfloat.patch new file mode 100644 index 0000000000..f53d64b374 --- /dev/null +++ b/openembedded/packages/gcc/gcc-3.4.3/gcc-3.4.0-arm-softfloat.patch @@ -0,0 +1,256 @@ +# +# Submitted: +# +# Dimitry Andric , 2004-05-01 +# +# Description: +# +# Nicholas Pitre released this patch for gcc soft-float support here: +# http://lists.arm.linux.org.uk/pipermail/linux-arm/2003-October/006436.html +# +# This version has been adapted to work with gcc 3.4.0. +# +# The original patch doesn't distinguish between softfpa and softvfp modes +# in the way Nicholas Pitre probably meant. His description is: +# +# "Default is to use APCS-32 mode with soft-vfp. The old Linux default for +# floats can be achieved with -mhard-float or with the configure +# --with-float=hard option. If -msoft-float or --with-float=soft is used then +# software float support will be used just like the default but with the legacy +# big endian word ordering for double float representation instead." +# +# Which means the following: +# +# * If you compile without -mhard-float or -msoft-float, you should get +# software floating point, using the VFP format. The produced object file +# should have these flags in its header: +# +# private flags = 600: [APCS-32] [VFP float format] [software FP] +# +# * If you compile with -mhard-float, you should get hardware floating point, +# which always uses the FPA format. Object file header flags should be: +# +# private flags = 0: [APCS-32] [FPA float format] +# +# * If you compile with -msoft-float, you should get software floating point, +# using the FPA format. This is done for compatibility reasons with many +# existing distributions. Object file header flags should be: +# +# private flags = 200: [APCS-32] [FPA float format] [software FP] +# +# The original patch from Nicholas Pitre contained the following constructs: +# +# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \ +# %{mhard-float:-mfpu=fpa} \ +# %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}" +# +# However, gcc doesn't accept this ";:" notation, used in the 3rd line. This +# is probably the reason Robert Schwebel modified it to: +# +# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \ +# %{mhard-float:-mfpu=fpa} \ +# %{!mhard-float: %{msoft-float:-mfpu=softfpa -mfpu=softvfp}}" +# +# But this causes the following behaviour: +# +# * If you compile without -mhard-float or -msoft-float, the compiler generates +# software floating point instructions, but *nothing* is passed to the +# assembler, which results in an object file which has flags: +# +# private flags = 0: [APCS-32] [FPA float format] +# +# This is not correct! +# +# * If you compile with -mhard-float, the compiler generates hardware floating +# point instructions, and passes "-mfpu=fpa" to the assembler, which results +# in an object file which has the same flags as in the previous item, but now +# those *are* correct. +# +# * If you compile with -msoft-float, the compiler generates software floating +# point instructions, and passes "-mfpu=softfpa -mfpu=softvfp" (in that +# order) to the assembler, which results in an object file with flags: +# +# private flags = 600: [APCS-32] [VFP float format] [software FP] +# +# This is not correct, because the last "-mfpu=" option on the assembler +# command line determines the actual FPU convention used (which should be FPA +# in this case). +# +# Therefore, I modified this patch to get the desired behaviour. Every +# instance of the notation: +# +# %{msoft-float:-mfpu=softfpa -mfpu=softvfp} +# +# was changed to: +# +# %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp} +# +# I also did the following: +# +# * Modified all TARGET_DEFAULT macros I could find to include ARM_FLAG_VFP, to +# be consistent with Nicholas' original patch. +# * Removed any "msoft-float" or "mhard-float" from all MULTILIB_DEFAULTS +# macros I could find. I think that if you compile without any options, you +# would like to get the defaults. :) +# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed +# anymore. (The required functions are now in libgcc.) + +diff -urNd gcc-3.4.0-orig/gcc/config/arm/coff.h gcc-3.4.0/gcc/config/arm/coff.h +--- gcc-3.4.0-orig/gcc/config/arm/coff.h 2004-02-24 15:25:22.000000000 +0100 ++++ gcc-3.4.0/gcc/config/arm/coff.h 2004-05-01 19:07:06.059409600 +0200 +@@ -31,11 +31,16 @@ + #define TARGET_VERSION fputs (" (ARM/coff)", stderr) + + #undef TARGET_DEFAULT +-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS) ++#define TARGET_DEFAULT \ ++ ( ARM_FLAG_SOFT_FLOAT \ ++ | ARM_FLAG_VFP \ ++ | ARM_FLAG_APCS_32 \ ++ | ARM_FLAG_APCS_FRAME \ ++ | ARM_FLAG_MMU_TRAPS ) + + #ifndef MULTILIB_DEFAULTS + #define MULTILIB_DEFAULTS \ +- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" } ++ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork" } + #endif + + /* This is COFF, but prefer stabs. */ +diff -urNd gcc-3.4.0-orig/gcc/config/arm/elf.h gcc-3.4.0/gcc/config/arm/elf.h +--- gcc-3.4.0-orig/gcc/config/arm/elf.h 2004-02-24 15:25:22.000000000 +0100 ++++ gcc-3.4.0/gcc/config/arm/elf.h 2004-05-01 19:12:16.976486400 +0200 +@@ -46,7 +46,9 @@ + + #ifndef SUBTARGET_ASM_FLOAT_SPEC + #define SUBTARGET_ASM_FLOAT_SPEC "\ +-%{mapcs-float:-mfloat} %{msoft-float:-mfpu=softfpa}" ++%{mapcs-float:-mfloat} \ ++%{mhard-float:-mfpu=fpa} \ ++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}" + #endif + + #ifndef ASM_SPEC +@@ -106,12 +108,17 @@ + #endif + + #ifndef TARGET_DEFAULT +-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS) ++#define TARGET_DEFAULT \ ++ ( ARM_FLAG_SOFT_FLOAT \ ++ | ARM_FLAG_VFP \ ++ | ARM_FLAG_APCS_32 \ ++ | ARM_FLAG_APCS_FRAME \ ++ | ARM_FLAG_MMU_TRAPS ) + #endif + + #ifndef MULTILIB_DEFAULTS + #define MULTILIB_DEFAULTS \ +- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" } ++ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" } + #endif + + #define TARGET_ASM_FILE_START_APP_OFF true +diff -urNd gcc-3.4.0-orig/gcc/config/arm/linux-elf.h gcc-3.4.0/gcc/config/arm/linux-elf.h +--- gcc-3.4.0-orig/gcc/config/arm/linux-elf.h 2004-01-31 07:18:11.000000000 +0100 ++++ gcc-3.4.0/gcc/config/arm/linux-elf.h 2004-05-01 19:19:06.935979200 +0200 +@@ -30,9 +30,27 @@ + /* Do not assume anything about header files. */ + #define NO_IMPLICIT_EXTERN_C + +-/* Default is to use APCS-32 mode. */ ++/* ++ * Default is to use APCS-32 mode with soft-vfp. ++ * The old Linux default for floats can be achieved with -mhard-float ++ * or with the configure --with-float=hard option. ++ * If -msoft-float or --with-float=soft is used then software float ++ * support will be used just like the default but with the legacy ++ * big endian word ordering for double float representation instead. ++ */ ++ + #undef TARGET_DEFAULT +-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS) ++#define TARGET_DEFAULT \ ++ ( ARM_FLAG_APCS_32 \ ++ | ARM_FLAG_SOFT_FLOAT \ ++ | ARM_FLAG_VFP \ ++ | ARM_FLAG_MMU_TRAPS ) ++ ++#undef SUBTARGET_EXTRA_ASM_SPEC ++#define SUBTARGET_EXTRA_ASM_SPEC "\ ++%{!mcpu=*:-mcpu=xscale} \ ++%{mhard-float:-mfpu=fpa} \ ++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}" + + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6 + +@@ -40,7 +58,7 @@ + + #undef MULTILIB_DEFAULTS + #define MULTILIB_DEFAULTS \ +- { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" } ++ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork" } + + #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__" + +@@ -55,7 +73,7 @@ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" + +-#define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc" ++#define LIBGCC_SPEC "-lgcc" + + /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add + the GNU/Linux magical crtbegin.o file (see crtstuff.c) which +diff -urNd gcc-3.4.0-orig/gcc/config/arm/t-linux gcc-3.4.0/gcc/config/arm/t-linux +--- gcc-3.4.0-orig/gcc/config/arm/t-linux 2003-09-20 23:09:07.000000000 +0200 ++++ gcc-3.4.0/gcc/config/arm/t-linux 2004-05-01 20:31:59.102846400 +0200 +@@ -4,7 +4,10 @@ + LIBGCC2_DEBUG_CFLAGS = -g0 + + LIB1ASMSRC = arm/lib1funcs.asm +-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx ++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \ ++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \ ++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \ ++ _fixsfsi _fixunssfsi + + # MULTILIB_OPTIONS = mhard-float/msoft-float + # MULTILIB_DIRNAMES = hard-float soft-float +diff -urNd gcc-3.4.0-orig/gcc/config/arm/unknown-elf.h gcc-3.4.0/gcc/config/arm/unknown-elf.h +--- gcc-3.4.0-orig/gcc/config/arm/unknown-elf.h 2004-02-24 15:25:22.000000000 +0100 ++++ gcc-3.4.0/gcc/config/arm/unknown-elf.h 2004-05-01 19:09:09.016212800 +0200 +@@ -30,7 +30,12 @@ + + /* Default to using APCS-32 and software floating point. */ + #ifndef TARGET_DEFAULT +-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS) ++#define TARGET_DEFAULT \ ++ ( ARM_FLAG_SOFT_FLOAT \ ++ | ARM_FLAG_VFP \ ++ | ARM_FLAG_APCS_32 \ ++ | ARM_FLAG_APCS_FRAME \ ++ | ARM_FLAG_MMU_TRAPS ) + #endif + + /* Now we define the strings used to build the spec file. */ +diff -urNd gcc-3.4.0-orig/gcc/config/arm/xscale-elf.h gcc-3.4.0/gcc/config/arm/xscale-elf.h +--- gcc-3.4.0-orig/gcc/config/arm/xscale-elf.h 2003-07-02 01:26:43.000000000 +0200 ++++ gcc-3.4.0/gcc/config/arm/xscale-elf.h 2004-05-01 20:15:36.620105600 +0200 +@@ -49,11 +49,12 @@ + endian, regardless of the endian-ness of the memory + system. */ + +-#define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \ +- %{mhard-float:-mfpu=fpa} \ +- %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}" ++#define SUBTARGET_EXTRA_ASM_SPEC "\ ++%{!mcpu=*:-mcpu=xscale} \ ++%{mhard-float:-mfpu=fpa} \ ++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}" + + #ifndef MULTILIB_DEFAULTS + #define MULTILIB_DEFAULTS \ +- { "mlittle-endian", "mno-thumb-interwork", "marm", "msoft-float" } ++ { "mlittle-endian", "mno-thumb-interwork", "marm" } + #endif diff --git a/openembedded/packages/gcc/gcc-3.4.3/gcc-3.4.1-uclibc-100-conf.patch b/openembedded/packages/gcc/gcc-3.4.3/gcc-3.4.1-uclibc-100-conf.patch new file mode 100644 index 0000000000..29e4c802e2 --- /dev/null +++ b/openembedded/packages/gcc/gcc-3.4.3/gcc-3.4.1-uclibc-100-conf.patch @@ -0,0 +1,442 @@ +diff -urN gcc-3.4.1-dist/boehm-gc/configure gcc-3.4.1/boehm-gc/configure +--- gcc-3.4.1-dist/boehm-gc/configure 2004-07-01 14:14:03.000000000 -0500 ++++ gcc-3.4.1/boehm-gc/configure 2004-08-12 16:22:57.000000000 -0500 +@@ -1947,6 +1947,11 @@ + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' +diff -urN gcc-3.4.1-dist/boehm-gc/ltconfig gcc-3.4.1/boehm-gc/ltconfig +--- gcc-3.4.1-dist/boehm-gc/ltconfig 2002-11-20 09:59:06.000000000 -0600 ++++ gcc-3.4.1/boehm-gc/ltconfig 2004-08-12 15:54:42.000000000 -0500 +@@ -1981,6 +1981,23 @@ + fi + ;; + ++linux-uclibc*) ++ version_type=linux ++ need_lib_prefix=no ++ need_version=no ++ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ++ soname_spec='${libname}${release}.so$major' ++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' ++ shlibpath_var=LD_LIBRARY_PATH ++ shlibpath_overrides_runpath=no ++ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ++ file_magic_cmd=/usr/bin/file ++ file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ++ # Assume using the uClibc dynamic linker. ++ dynamic_linker="uClibc ld.so" ++ ;; ++ + netbsd*) + version_type=sunos + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then +diff -urN gcc-3.4.1-dist/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h +--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h 2004-01-31 00:18:11.000000000 -0600 ++++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-08-12 15:54:42.000000000 -0500 +@@ -81,6 +81,18 @@ + "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" + + #undef LINK_SPEC ++#ifdef USE_UCLIBC ++#define LINK_SPEC "%{h*} %{version:-v} \ ++ %{b} %{Wl,*:%*} \ ++ %{static:-Bstatic} \ ++ %{shared:-shared} \ ++ %{symbolic:-Bsymbolic} \ ++ %{rdynamic:-export-dynamic} \ ++ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} \ ++ -X \ ++ %{mbig-endian:-EB}" \ ++ SUBTARGET_EXTRA_LINK_SPEC ++#else + #define LINK_SPEC "%{h*} %{version:-v} \ + %{b} %{Wl,*:%*} \ + %{static:-Bstatic} \ +@@ -91,6 +103,7 @@ + -X \ + %{mbig-endian:-EB}" \ + SUBTARGET_EXTRA_LINK_SPEC ++#endif + + #define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS() + +diff -urN gcc-3.4.1-dist/gcc/config/cris/linux.h gcc-3.4.1/gcc/config/cris/linux.h +--- gcc-3.4.1-dist/gcc/config/cris/linux.h 2003-11-28 21:08:09.000000000 -0600 ++++ gcc-3.4.1/gcc/config/cris/linux.h 2004-08-12 15:54:43.000000000 -0500 +@@ -79,6 +79,25 @@ + #undef CRIS_DEFAULT_CPU_VERSION + #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG + ++#ifdef USE_UCLIBC ++ ++#undef CRIS_SUBTARGET_VERSION ++#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc" ++ ++#undef CRIS_LINK_SUBTARGET_SPEC ++#define CRIS_LINK_SUBTARGET_SPEC \ ++ "-mcrislinux\ ++ -rpath-link include/asm/../..%s\ ++ %{shared} %{static}\ ++ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\ ++ %{!shared: \ ++ %{!static: \ ++ %{rdynamic:-export-dynamic} \ ++ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \ ++ %{!r:%{O2|O3: --gc-sections}}" ++ ++#else /* USE_UCLIBC */ ++ + #undef CRIS_SUBTARGET_VERSION + #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu" + +@@ -93,6 +112,8 @@ + %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\ + %{!r:%{O2|O3: --gc-sections}}" + ++#endif /* USE_UCLIBC */ ++ + + /* Node: Run-time Target */ + +diff -urN gcc-3.4.1-dist/gcc/config/cris/t-linux-uclibc gcc-3.4.1/gcc/config/cris/t-linux-uclibc +--- gcc-3.4.1-dist/gcc/config/cris/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.1/gcc/config/cris/t-linux-uclibc 2004-08-12 15:54:43.000000000 -0500 +@@ -0,0 +1,3 @@ ++T_CFLAGS = -DUSE_UCLIBC ++TARGET_LIBGCC2_CFLAGS += -fPIC ++CRTSTUFF_T_CFLAGS_S = $(TARGET_LIBGCC2_CFLAGS) +diff -urN gcc-3.4.1-dist/gcc/config/i386/linux.h gcc-3.4.1/gcc/config/i386/linux.h +--- gcc-3.4.1-dist/gcc/config/i386/linux.h 2003-11-28 21:08:10.000000000 -0600 ++++ gcc-3.4.1/gcc/config/i386/linux.h 2004-08-12 15:54:43.000000000 -0500 +@@ -118,6 +118,15 @@ + %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \ + %{static:-static}}}" + #else ++#if defined USE_UCLIBC ++#define LINK_SPEC "-m elf_i386 %{shared:-shared} \ ++ %{!shared: \ ++ %{!ibcs: \ ++ %{!static: \ ++ %{rdynamic:-export-dynamic} \ ++ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \ ++ %{static:-static}}}" ++#else + #define LINK_SPEC "-m elf_i386 %{shared:-shared} \ + %{!shared: \ + %{!ibcs: \ +@@ -126,6 +135,7 @@ + %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ + %{static:-static}}}" + #endif ++#endif + + /* A C statement (sans semicolon) to output to the stdio stream + FILE the assembler definition of uninitialized global DECL named +diff -urN gcc-3.4.1-dist/gcc/config/mips/linux.h gcc-3.4.1/gcc/config/mips/linux.h +--- gcc-3.4.1-dist/gcc/config/mips/linux.h 2004-06-15 20:42:24.000000000 -0500 ++++ gcc-3.4.1/gcc/config/mips/linux.h 2004-08-12 15:54:43.000000000 -0500 +@@ -109,6 +109,17 @@ + + /* Borrowed from sparc/linux.h */ + #undef LINK_SPEC ++#ifdef USE_UCLIBC ++#define LINK_SPEC \ ++ "%(endian_spec) \ ++ %{shared:-shared} \ ++ %{!shared: \ ++ %{!ibcs: \ ++ %{!static: \ ++ %{rdynamic:-export-dynamic} \ ++ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \ ++ %{static:-static}}}" ++#else + #define LINK_SPEC \ + "%(endian_spec) \ + %{shared:-shared} \ +@@ -118,6 +129,7 @@ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ + %{static:-static}}}" ++#endif + + #undef SUBTARGET_ASM_SPEC + #define SUBTARGET_ASM_SPEC "\ +diff -urN gcc-3.4.1-dist/gcc/config/rs6000/linux.h gcc-3.4.1/gcc/config/rs6000/linux.h +--- gcc-3.4.1-dist/gcc/config/rs6000/linux.h 2004-02-25 09:11:19.000000000 -0600 ++++ gcc-3.4.1/gcc/config/rs6000/linux.h 2004-08-12 15:54:43.000000000 -0500 +@@ -61,7 +61,11 @@ + #define LINK_START_DEFAULT_SPEC "%(link_start_linux)" + + #undef LINK_OS_DEFAULT_SPEC ++#ifdef USE_UCLIBC ++#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)" ++#else + #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" ++#endif + + #define LINK_GCC_C_SEQUENCE_SPEC \ + "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" +diff -urN gcc-3.4.1-dist/gcc/config/rs6000/sysv4.h gcc-3.4.1/gcc/config/rs6000/sysv4.h +--- gcc-3.4.1-dist/gcc/config/rs6000/sysv4.h 2004-06-10 01:39:50.000000000 -0500 ++++ gcc-3.4.1/gcc/config/rs6000/sysv4.h 2004-08-12 15:54:43.000000000 -0500 +@@ -947,6 +947,7 @@ + mcall-linux : %(link_os_linux) ; \ + mcall-gnu : %(link_os_gnu) ; \ + mcall-netbsd : %(link_os_netbsd) ; \ ++ mcall-linux-uclibc : %(link_os_linux_uclibc); \ + mcall-openbsd: %(link_os_openbsd) ; \ + : %(link_os_default) }" + +@@ -1124,6 +1125,10 @@ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}" + ++#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \ ++ %{rdynamic:-export-dynamic} \ ++ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}" ++ + #if defined(HAVE_LD_EH_FRAME_HDR) + # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " + #endif +@@ -1290,6 +1295,7 @@ + { "link_os_sim", LINK_OS_SIM_SPEC }, \ + { "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \ + { "link_os_linux", LINK_OS_LINUX_SPEC }, \ ++ { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \ + { "link_os_gnu", LINK_OS_GNU_SPEC }, \ + { "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \ + { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \ +diff -urN gcc-3.4.1-dist/gcc/config/sh/linux.h gcc-3.4.1/gcc/config/sh/linux.h +--- gcc-3.4.1-dist/gcc/config/sh/linux.h 2004-01-11 20:29:13.000000000 -0600 ++++ gcc-3.4.1/gcc/config/sh/linux.h 2004-08-12 15:54:43.000000000 -0500 +@@ -73,12 +73,21 @@ + #undef SUBTARGET_LINK_EMUL_SUFFIX + #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" + #undef SUBTARGET_LINK_SPEC ++#ifdef USE_UCLIBC ++#define SUBTARGET_LINK_SPEC \ ++ "%{shared:-shared} \ ++ %{!static: \ ++ %{rdynamic:-export-dynamic} \ ++ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \ ++ %{static:-static}" ++#else + #define SUBTARGET_LINK_SPEC \ + "%{shared:-shared} \ + %{!static: \ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ + %{static:-static}" ++#endif + + #undef LIB_SPEC + #define LIB_SPEC \ +diff -urN gcc-3.4.1-dist/gcc/config/sh/t-linux-uclibc gcc-3.4.1/gcc/config/sh/t-linux-uclibc +--- gcc-3.4.1-dist/gcc/config/sh/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.1/gcc/config/sh/t-linux-uclibc 2004-08-12 15:54:43.000000000 -0500 +@@ -0,0 +1,13 @@ ++T_CFLAGS = -DUSE_UCLIBC ++ ++TARGET_LIBGCC2_CFLAGS = -fpic -DNO_FPSCR_VALUES ++LIB1ASMFUNCS_CACHE = _ic_invalidate ++ ++LIB2FUNCS_EXTRA= ++ ++MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) m3e/m4 ++MULTILIB_DIRNAMES= ++MULTILIB_MATCHES = ++MULTILIB_EXCEPTIONS= ++ ++EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o +diff -urN gcc-3.4.1-dist/gcc/config/sh/t-sh64-uclibc gcc-3.4.1/gcc/config/sh/t-sh64-uclibc +--- gcc-3.4.1-dist/gcc/config/sh/t-sh64-uclibc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.1/gcc/config/sh/t-sh64-uclibc 2004-08-12 15:54:43.000000000 -0500 +@@ -0,0 +1,13 @@ ++EXTRA_MULTILIB_PARTS= crt1.o crti.o crtn.o crtbegin.o crtend.o ++ ++LIB1ASMFUNCS = \ ++ _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \ ++ _shcompact_call_trampoline _shcompact_return_trampoline \ ++ _shcompact_incoming_args _ic_invalidate _nested_trampoline \ ++ _push_pop_shmedia_regs \ ++ _udivdi3 _divdi3 _umoddi3 _moddi3 ++ ++MULTILIB_OPTIONS = $(MULTILIB_ENDIAN) m5-32media-nofpu/m5-compact/m5-compact-nofpu/m5-64media/m5-64media-nofpu ++MULTILIB_DIRNAMES= $(MULTILIB_ENDIAN) nofpu compact nofpu/compact media64 nofpu/media64 ++MULTILIB_MATCHES= ++MULTILIB_EXCEPTIONS= +diff -urN gcc-3.4.1-dist/gcc/config/t-linux-uclibc gcc-3.4.1/gcc/config/t-linux-uclibc +--- gcc-3.4.1-dist/gcc/config/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.1/gcc/config/t-linux-uclibc 2004-08-12 15:54:43.000000000 -0500 +@@ -0,0 +1,15 @@ ++T_CFLAGS = -DUSE_UCLIBC ++ ++# Compile crtbeginS.o and crtendS.o with pic. ++CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC ++# Compile libgcc2.a with pic. ++TARGET_LIBGCC2_CFLAGS = -fPIC ++ ++# Override t-slibgcc-elf-ver to export some libgcc symbols with ++# the symbol versions that glibc used. ++#SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver ++ ++# Use unwind-dw2-fde ++LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \ ++ $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c ++LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h +diff -urN gcc-3.4.1-dist/gcc/config.gcc gcc-3.4.1/gcc/config.gcc +--- gcc-3.4.1-dist/gcc/config.gcc 2004-04-21 10:12:35.000000000 -0500 ++++ gcc-3.4.1/gcc/config.gcc 2004-08-12 15:59:46.000000000 -0500 +@@ -664,6 +664,12 @@ + extra_parts="" + use_collect2=yes + ;; ++arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc ++ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h" ++ tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux" ++ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" ++ gnu_ld=yes ++ ;; + arm*-*-linux*) # ARM GNU/Linux with ELF + tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h" + tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux" +@@ -725,6 +731,10 @@ + tmake_file="cris/t-cris cris/t-elfmulti" + gas=yes + ;; ++cris-*-linux-uclibc*) ++ tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h" ++ tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux-uclibc" ++ ;; + cris-*-linux*) + tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h" + tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux" +@@ -988,6 +998,11 @@ + thread_file='single' + fi + ;; ++i[34567]86-*-linux*uclibc*) # Intel 80386's running GNU/Linux ++ # with ELF format using uClibc ++ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h" ++ tmake_file="t-slibgcc-elf-ver t-linux-uclibc i386/t-crtstuff" ++ ;; + i[34567]86-*-linux*) # Intel 80386's running GNU/Linux + # with ELF format using glibc 2 + # aka GNU/Linux C library 6 +@@ -1547,6 +1562,16 @@ + gnu_ld=yes + gas=yes + ;; ++mips*-*-linux-uclibc*) # Linux MIPS, either endian. uClibc ++ tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h" ++ case ${target} in ++ mipsisa32*-*) ++ target_cpu_default="MASK_SOFT_FLOAT" ++ tm_defines="MIPS_ISA_DEFAULT=32" ++ ;; ++ esac ++ tmake_file="t-slibgcc-elf-ver t-linux-uclibc" ++ ;; + mips*-*-linux*) # Linux MIPS, either endian. + tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h" + case ${target} in +@@ -1764,6 +1789,10 @@ + tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxspe.h" + tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm" + ;; ++powerpc-*-linux-uclibc*) ++ tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h" ++ tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux-uclibc rs6000/t-ppccomm" ++ ;; + powerpc-*-linux*) + tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h" + tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm" +@@ -1916,7 +1945,7 @@ + tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h" + ;; + sh-*-linux* | sh[2346lbe]*-*-linux*) +- tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver t-linux" ++ tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver" + case ${target} in + sh*be-*-* | sh*eb-*-*) ;; + *) +@@ -1924,9 +1953,17 @@ + tmake_file="${tmake_file} sh/t-le" + ;; + esac +- tmake_file="${tmake_file} sh/t-linux" ++ case ${target} in ++ *-*-linux-uclibc*) tmake_file="${tmake_file} t-linux-uclibc sh/t-linux-uclibc" ;; ++ *) tmake_file="${tmake_file} t-linux sh/t-linux" ;; ++ esac + tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/linux.h" + case ${target} in ++ sh64*-*-linux-uclibc*) ++ tmake_file="${tmake_file} sh/t-sh64-uclibc" ++ tm_file="${tm_file} sh/sh64.h" ++ extra_headers="shmedia.h ushmedia.h sshmedia.h" ++ ;; + sh64*) + tmake_file="${tmake_file} sh/t-sh64" + tm_file="${tm_file} sh/sh64.h" +diff -urN gcc-3.4.1-dist/libtool.m4 gcc-3.4.1/libtool.m4 +--- gcc-3.4.1-dist/libtool.m4 2004-05-18 04:08:37.000000000 -0500 ++++ gcc-3.4.1/libtool.m4 2004-08-12 15:54:43.000000000 -0500 +@@ -689,6 +689,11 @@ + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'] +diff -urN gcc-3.4.1-dist/ltconfig gcc-3.4.1/ltconfig +--- gcc-3.4.1-dist/ltconfig 2004-03-05 15:05:41.000000000 -0600 ++++ gcc-3.4.1/ltconfig 2004-08-12 15:55:48.000000000 -0500 +@@ -602,6 +602,7 @@ + + # Transform linux* to *-*-linux-gnu*, to support old configure scripts. + case $host_os in ++linux-uclibc*) ;; + linux-gnu*) ;; + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` + esac +@@ -1262,6 +1263,24 @@ + dynamic_linker='GNU/Linux ld.so' + ;; + ++linux-uclibc*) ++ version_type=linux ++ need_lib_prefix=no ++ need_version=no ++ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ++ soname_spec='${libname}${release}.so$major' ++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' ++ shlibpath_var=LD_LIBRARY_PATH ++ shlibpath_overrides_runpath=no ++ # This implies no fast_install, which is unacceptable. ++ # Some rework will be needed to allow for fast_install ++ # before this can be enabled. ++ # Note: copied from linux-gnu, and may not be appropriate. ++ hardcode_into_libs=yes ++ # Assume using the uClibc dynamic linker. ++ dynamic_linker="uClibc ld.so" ++ ;; ++ + netbsd*) + need_lib_prefix=no + need_version=no diff --git a/openembedded/packages/gcc/gcc-3.4.3/gcc-3.4.1-uclibc-200-locale.patch b/openembedded/packages/gcc/gcc-3.4.3/gcc-3.4.1-uclibc-200-locale.patch new file mode 100644 index 0000000000..3fc4900b06 --- /dev/null +++ b/openembedded/packages/gcc/gcc-3.4.3/gcc-3.4.1-uclibc-200-locale.patch @@ -0,0 +1,3246 @@ +diff -urN gcc-3.4.2-dist/libstdc++-v3/acinclude.m4 gcc-3.4.2/libstdc++-v3/acinclude.m4 +--- gcc-3.4.2-dist/libstdc++-v3/acinclude.m4 2004-07-15 12:42:45.000000000 -0500 ++++ gcc-3.4.2/libstdc++-v3/acinclude.m4 2004-09-10 10:47:40.000000000 -0500 +@@ -996,7 +996,7 @@ + AC_MSG_CHECKING([for C locale to use]) + GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@], + [use MODEL for target locale package], +- [permit generic|gnu|ieee_1003.1-2001|yes|no|auto]) ++ [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto]) + + # If they didn't use this option switch, or if they specified --enable + # with no specific model, we'll have to look for one. If they +@@ -1012,6 +1012,9 @@ + # Default to "generic". + if test $enable_clocale_flag = auto; then + case x${target_os} in ++ x*-uclibc*) ++ enable_clocale_flag=uclibc ++ ;; + xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu) + AC_EGREP_CPP([_GLIBCXX_ok], [ + #include +@@ -1138,6 +1141,41 @@ + CTIME_CC=config/locale/generic/time_members.cc + CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h + ;; ++ uclibc) ++ AC_MSG_RESULT(uclibc) ++ ++ # Declare intention to use gettext, and add support for specific ++ # languages. ++ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT ++ ALL_LINGUAS="de fr" ++ ++ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. ++ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no) ++ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then ++ USE_NLS=yes ++ fi ++ # Export the build objects. ++ for ling in $ALL_LINGUAS; do \ ++ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ ++ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ ++ done ++ AC_SUBST(glibcxx_MOFILES) ++ AC_SUBST(glibcxx_POFILES) ++ ++ CLOCALE_H=config/locale/uclibc/c_locale.h ++ CLOCALE_CC=config/locale/uclibc/c_locale.cc ++ CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h ++ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc ++ CCOLLATE_CC=config/locale/uclibc/collate_members.cc ++ CCTYPE_CC=config/locale/uclibc/ctype_members.cc ++ CMESSAGES_H=config/locale/uclibc/messages_members.h ++ CMESSAGES_CC=config/locale/uclibc/messages_members.cc ++ CMONEY_CC=config/locale/uclibc/monetary_members.cc ++ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc ++ CTIME_H=config/locale/uclibc/time_members.h ++ CTIME_CC=config/locale/uclibc/time_members.cc ++ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h ++ ;; + esac + + # This is where the testsuite looks for locale catalogs, using the +diff -urN gcc-3.4.2-dist/libstdc++-v3/aclocal.m4 gcc-3.4.2/libstdc++-v3/aclocal.m4 +--- gcc-3.4.2-dist/libstdc++-v3/aclocal.m4 2004-08-13 15:44:03.000000000 -0500 ++++ gcc-3.4.2/libstdc++-v3/aclocal.m4 2004-09-10 10:47:40.000000000 -0500 +@@ -1025,6 +1025,9 @@ + # Default to "generic". + if test $enable_clocale_flag = auto; then + case x${target_os} in ++ x*-uclibc*) ++ enable_clocale_flag=uclibc ++ ;; + xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu) + AC_EGREP_CPP([_GLIBCXX_ok], [ + #include +@@ -1151,6 +1154,41 @@ + CTIME_CC=config/locale/generic/time_members.cc + CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h + ;; ++ uclibc) ++ AC_MSG_RESULT(uclibc) ++ ++ # Declare intention to use gettext, and add support for specific ++ # languages. ++ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT ++ ALL_LINGUAS="de fr" ++ ++ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. ++ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no) ++ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then ++ USE_NLS=yes ++ fi ++ # Export the build objects. ++ for ling in $ALL_LINGUAS; do \ ++ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ ++ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ ++ done ++ AC_SUBST(glibcxx_MOFILES) ++ AC_SUBST(glibcxx_POFILES) ++ ++ CLOCALE_H=config/locale/uclibc/c_locale.h ++ CLOCALE_CC=config/locale/uclibc/c_locale.cc ++ CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h ++ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc ++ CCOLLATE_CC=config/locale/uclibc/collate_members.cc ++ CCTYPE_CC=config/locale/uclibc/ctype_members.cc ++ CMESSAGES_H=config/locale/uclibc/messages_members.h ++ CMESSAGES_CC=config/locale/uclibc/messages_members.cc ++ CMONEY_CC=config/locale/uclibc/monetary_members.cc ++ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc ++ CTIME_H=config/locale/uclibc/time_members.h ++ CTIME_CC=config/locale/uclibc/time_members.cc ++ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h ++ ;; + esac + + # This is where the testsuite looks for locale catalogs, using the +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,59 @@ ++// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*- ++ ++// Copyright (C) 2002, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// Written by Jakub Jelinek ++ ++#include ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning clean this up ++#endif ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ ++extern "C" __typeof(iswctype_l) __iswctype_l; ++extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l; ++extern "C" __typeof(strcoll_l) __strcoll_l; ++extern "C" __typeof(strftime_l) __strftime_l; ++extern "C" __typeof(strtod_l) __strtod_l; ++extern "C" __typeof(strtof_l) __strtof_l; ++extern "C" __typeof(strtold_l) __strtold_l; ++extern "C" __typeof(strxfrm_l) __strxfrm_l; ++extern "C" __typeof(towlower_l) __towlower_l; ++extern "C" __typeof(towupper_l) __towupper_l; ++extern "C" __typeof(wcscoll_l) __wcscoll_l; ++extern "C" __typeof(wcsftime_l) __wcsftime_l; ++extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l; ++extern "C" __typeof(wctype_l) __wctype_l; ++extern "C" __typeof(newlocale) __newlocale; ++extern "C" __typeof(freelocale) __freelocale; ++extern "C" __typeof(duplocale) __duplocale; ++extern "C" __typeof(uselocale) __uselocale; ++ ++#endif // GLIBC 2.3 and later +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c_locale.cc +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c_locale.cc 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,160 @@ ++// Wrapper for underlying C-language localization -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.8 Standard locale categories. ++// ++ ++// Written by Benjamin Kosnik ++ ++#include // For errno ++#include ++#include ++#include ++#include ++ ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __strtol_l(S, E, B, L) strtol((S), (E), (B)) ++#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B)) ++#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B)) ++#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B)) ++#define __strtof_l(S, E, L) strtof((S), (E)) ++#define __strtod_l(S, E, L) strtod((S), (E)) ++#define __strtold_l(S, E, L) strtold((S), (E)) ++#warning should dummy __newlocale check for C|POSIX ? ++#define __newlocale(a, b, c) NULL ++#define __freelocale(a) ((void)0) ++#define __duplocale(a) __c_locale() ++#endif ++ ++namespace std ++{ ++ template<> ++ void ++ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, ++ const __c_locale& __cloc) ++ { ++ if (!(__err & ios_base::failbit)) ++ { ++ char* __sanity; ++ errno = 0; ++ float __f = __strtof_l(__s, &__sanity, __cloc); ++ if (__sanity != __s && errno != ERANGE) ++ __v = __f; ++ else ++ __err |= ios_base::failbit; ++ } ++ } ++ ++ template<> ++ void ++ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, ++ const __c_locale& __cloc) ++ { ++ if (!(__err & ios_base::failbit)) ++ { ++ char* __sanity; ++ errno = 0; ++ double __d = __strtod_l(__s, &__sanity, __cloc); ++ if (__sanity != __s && errno != ERANGE) ++ __v = __d; ++ else ++ __err |= ios_base::failbit; ++ } ++ } ++ ++ template<> ++ void ++ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err, ++ const __c_locale& __cloc) ++ { ++ if (!(__err & ios_base::failbit)) ++ { ++ char* __sanity; ++ errno = 0; ++ long double __ld = __strtold_l(__s, &__sanity, __cloc); ++ if (__sanity != __s && errno != ERANGE) ++ __v = __ld; ++ else ++ __err |= ios_base::failbit; ++ } ++ } ++ ++ void ++ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, ++ __c_locale __old) ++ { ++ __cloc = __newlocale(1 << LC_ALL, __s, __old); ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ if (!__cloc) ++ { ++ // This named locale is not supported by the underlying OS. ++ __throw_runtime_error(__N("locale::facet::_S_create_c_locale " ++ "name not valid")); ++ } ++#endif ++ } ++ ++ void ++ locale::facet::_S_destroy_c_locale(__c_locale& __cloc) ++ { ++ if (_S_get_c_locale() != __cloc) ++ __freelocale(__cloc); ++ } ++ ++ __c_locale ++ locale::facet::_S_clone_c_locale(__c_locale& __cloc) ++ { return __duplocale(__cloc); } ++} // namespace std ++ ++namespace __gnu_cxx ++{ ++ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] = ++ { ++ "LC_CTYPE", ++ "LC_NUMERIC", ++ "LC_TIME", ++ "LC_COLLATE", ++ "LC_MONETARY", ++ "LC_MESSAGES", ++#if _GLIBCXX_NUM_CATEGORIES != 0 ++ "LC_PAPER", ++ "LC_NAME", ++ "LC_ADDRESS", ++ "LC_TELEPHONE", ++ "LC_MEASUREMENT", ++ "LC_IDENTIFICATION" ++#endif ++ }; ++} ++ ++namespace std ++{ ++ const char* const* const locale::_S_categories = __gnu_cxx::category_names; ++} // namespace std +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c_locale.h +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c_locale.h 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c_locale.h 2004-09-10 10:48:08.000000000 -0500 +@@ -0,0 +1,115 @@ ++// Wrapper for underlying C-language localization -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.8 Standard locale categories. ++// ++ ++// Written by Benjamin Kosnik ++ ++#ifndef _C_LOCALE_H ++#define _C_LOCALE_H 1 ++ ++#pragma GCC system_header ++ ++#include // get std::strlen ++#include // get std::snprintf or std::sprintf ++#include ++#include // For codecvt ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix this ++#endif ++#ifdef __UCLIBC_HAS_LOCALE__ ++#include // For codecvt using iconv, iconv_t ++#endif ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ ++#include // For messages ++#endif ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning what is _GLIBCXX_C_LOCALE_GNU for ++#endif ++#define _GLIBCXX_C_LOCALE_GNU 1 ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix categories ++#endif ++// #define _GLIBCXX_NUM_CATEGORIES 6 ++#define _GLIBCXX_NUM_CATEGORIES 0 ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++namespace __gnu_cxx ++{ ++ extern "C" __typeof(uselocale) __uselocale; ++} ++#endif ++ ++namespace std ++{ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ typedef __locale_t __c_locale; ++#else ++ typedef int* __c_locale; ++#endif ++ ++ // Convert numeric value of type _Tv to string and return length of ++ // string. If snprintf is available use it, otherwise fall back to ++ // the unsafe sprintf which, in general, can be dangerous and should ++ // be avoided. ++ template ++ int ++ __convert_from_v(char* __out, const int __size, const char* __fmt, ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ _Tv __v, const __c_locale& __cloc, int __prec) ++ { ++ __c_locale __old = __gnu_cxx::__uselocale(__cloc); ++#else ++ _Tv __v, const __c_locale&, int __prec) ++ { ++# ifdef __UCLIBC_HAS_LOCALE__ ++ char* __old = std::setlocale(LC_ALL, NULL); ++ char* __sav = new char[std::strlen(__old) + 1]; ++ std::strcpy(__sav, __old); ++ std::setlocale(LC_ALL, "C"); ++# endif ++#endif ++ ++ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __gnu_cxx::__uselocale(__old); ++#elif defined __UCLIBC_HAS_LOCALE__ ++ std::setlocale(LC_ALL, __sav); ++ delete [] __sav; ++#endif ++ return __ret; ++ } ++} ++ ++#endif +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/codecvt_members.cc +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,306 @@ ++// std::codecvt implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2002, 2003 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.1.5 - Template class codecvt ++// ++ ++// Written by Benjamin Kosnik ++ ++#include ++#include ++ ++namespace std ++{ ++ // Specializations. ++#ifdef _GLIBCXX_USE_WCHAR_T ++ codecvt_base::result ++ codecvt:: ++ do_out(state_type& __state, const intern_type* __from, ++ const intern_type* __from_end, const intern_type*& __from_next, ++ extern_type* __to, extern_type* __to_end, ++ extern_type*& __to_next) const ++ { ++ result __ret = ok; ++ state_type __tmp_state(__state); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ ++ // wcsnrtombs is *very* fast but stops if encounters NUL characters: ++ // in case we fall back to wcrtomb and then continue, in a loop. ++ // NB: wcsnrtombs is a GNU extension ++ for (__from_next = __from, __to_next = __to; ++ __from_next < __from_end && __to_next < __to_end ++ && __ret == ok;) ++ { ++ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0', ++ __from_end - __from_next); ++ if (!__from_chunk_end) ++ __from_chunk_end = __from_end; ++ ++ __from = __from_next; ++ const size_t __conv = wcsnrtombs(__to_next, &__from_next, ++ __from_chunk_end - __from_next, ++ __to_end - __to_next, &__state); ++ if (__conv == static_cast(-1)) ++ { ++ // In case of error, in order to stop at the exact place we ++ // have to start again from the beginning with a series of ++ // wcrtomb. ++ for (; __from < __from_next; ++__from) ++ __to_next += wcrtomb(__to_next, *__from, &__tmp_state); ++ __state = __tmp_state; ++ __ret = error; ++ } ++ else if (__from_next && __from_next < __from_chunk_end) ++ { ++ __to_next += __conv; ++ __ret = partial; ++ } ++ else ++ { ++ __from_next = __from_chunk_end; ++ __to_next += __conv; ++ } ++ ++ if (__from_next < __from_end && __ret == ok) ++ { ++ extern_type __buf[MB_LEN_MAX]; ++ __tmp_state = __state; ++ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state); ++ if (__conv > static_cast(__to_end - __to_next)) ++ __ret = partial; ++ else ++ { ++ memcpy(__to_next, __buf, __conv); ++ __state = __tmp_state; ++ __to_next += __conv; ++ ++__from_next; ++ } ++ } ++ } ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ ++ return __ret; ++ } ++ ++ codecvt_base::result ++ codecvt:: ++ do_in(state_type& __state, const extern_type* __from, ++ const extern_type* __from_end, const extern_type*& __from_next, ++ intern_type* __to, intern_type* __to_end, ++ intern_type*& __to_next) const ++ { ++ result __ret = ok; ++ state_type __tmp_state(__state); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ ++ // mbsnrtowcs is *very* fast but stops if encounters NUL characters: ++ // in case we store a L'\0' and then continue, in a loop. ++ // NB: mbsnrtowcs is a GNU extension ++ for (__from_next = __from, __to_next = __to; ++ __from_next < __from_end && __to_next < __to_end ++ && __ret == ok;) ++ { ++ const extern_type* __from_chunk_end; ++ __from_chunk_end = static_cast(memchr(__from_next, '\0', ++ __from_end ++ - __from_next)); ++ if (!__from_chunk_end) ++ __from_chunk_end = __from_end; ++ ++ __from = __from_next; ++ size_t __conv = mbsnrtowcs(__to_next, &__from_next, ++ __from_chunk_end - __from_next, ++ __to_end - __to_next, &__state); ++ if (__conv == static_cast(-1)) ++ { ++ // In case of error, in order to stop at the exact place we ++ // have to start again from the beginning with a series of ++ // mbrtowc. ++ for (;; ++__to_next, __from += __conv) ++ { ++ __conv = mbrtowc(__to_next, __from, __from_end - __from, ++ &__tmp_state); ++ if (__conv == static_cast(-1) ++ || __conv == static_cast(-2)) ++ break; ++ } ++ __from_next = __from; ++ __state = __tmp_state; ++ __ret = error; ++ } ++ else if (__from_next && __from_next < __from_chunk_end) ++ { ++ // It is unclear what to return in this case (see DR 382). ++ __to_next += __conv; ++ __ret = partial; ++ } ++ else ++ { ++ __from_next = __from_chunk_end; ++ __to_next += __conv; ++ } ++ ++ if (__from_next < __from_end && __ret == ok) ++ { ++ if (__to_next < __to_end) ++ { ++ // XXX Probably wrong for stateful encodings ++ __tmp_state = __state; ++ ++__from_next; ++ *__to_next++ = L'\0'; ++ } ++ else ++ __ret = partial; ++ } ++ } ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ ++ return __ret; ++ } ++ ++ int ++ codecvt:: ++ do_encoding() const throw() ++ { ++ // XXX This implementation assumes that the encoding is ++ // stateless and is either single-byte or variable-width. ++ int __ret = 0; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ if (MB_CUR_MAX == 1) ++ __ret = 1; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ return __ret; ++ } ++ ++ int ++ codecvt:: ++ do_max_length() const throw() ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ // XXX Probably wrong for stateful encodings. ++ int __ret = MB_CUR_MAX; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ return __ret; ++ } ++ ++ int ++ codecvt:: ++ do_length(state_type& __state, const extern_type* __from, ++ const extern_type* __end, size_t __max) const ++ { ++ int __ret = 0; ++ state_type __tmp_state(__state); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ ++ // mbsnrtowcs is *very* fast but stops if encounters NUL characters: ++ // in case we advance past it and then continue, in a loop. ++ // NB: mbsnrtowcs is a GNU extension ++ ++ // A dummy internal buffer is needed in order for mbsnrtocws to consider ++ // its fourth parameter (it wouldn't with NULL as first parameter). ++ wchar_t* __to = static_cast(__builtin_alloca(sizeof(wchar_t) ++ * __max)); ++ while (__from < __end && __max) ++ { ++ const extern_type* __from_chunk_end; ++ __from_chunk_end = static_cast(memchr(__from, '\0', ++ __end ++ - __from)); ++ if (!__from_chunk_end) ++ __from_chunk_end = __end; ++ ++ const extern_type* __tmp_from = __from; ++ size_t __conv = mbsnrtowcs(__to, &__from, ++ __from_chunk_end - __from, ++ __max, &__state); ++ if (__conv == static_cast(-1)) ++ { ++ // In case of error, in order to stop at the exact place we ++ // have to start again from the beginning with a series of ++ // mbrtowc. ++ for (__from = __tmp_from;; __from += __conv) ++ { ++ __conv = mbrtowc(NULL, __from, __end - __from, ++ &__tmp_state); ++ if (__conv == static_cast(-1) ++ || __conv == static_cast(-2)) ++ break; ++ } ++ __state = __tmp_state; ++ __ret += __from - __tmp_from; ++ break; ++ } ++ if (!__from) ++ __from = __from_chunk_end; ++ ++ __ret += __from - __tmp_from; ++ __max -= __conv; ++ ++ if (__from < __end && __max) ++ { ++ // XXX Probably wrong for stateful encodings ++ __tmp_state = __state; ++ ++__from; ++ ++__ret; ++ --__max; ++ } ++ } ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ ++ return __ret; ++ } ++#endif ++} +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/collate_members.cc +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/collate_members.cc 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,80 @@ ++// std::collate implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.4.1.2 collate virtual functions ++// ++ ++// Written by Benjamin Kosnik ++ ++#include ++#include ++ ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) ++#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) ++#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) ++#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) ++#endif ++ ++namespace std ++{ ++ // These are basically extensions to char_traits, and perhaps should ++ // be put there instead of here. ++ template<> ++ int ++ collate::_M_compare(const char* __one, const char* __two) const ++ { ++ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate); ++ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); ++ } ++ ++ template<> ++ size_t ++ collate::_M_transform(char* __to, const char* __from, ++ size_t __n) const ++ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ int ++ collate::_M_compare(const wchar_t* __one, ++ const wchar_t* __two) const ++ { ++ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate); ++ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); ++ } ++ ++ template<> ++ size_t ++ collate::_M_transform(wchar_t* __to, const wchar_t* __from, ++ size_t __n) const ++ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); } ++#endif ++} +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,300 @@ ++// std::ctype implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions. ++// ++ ++// Written by Benjamin Kosnik ++ ++#define _LIBC ++#include ++#undef _LIBC ++#include ++ ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __wctype_l(S, L) wctype((S)) ++#define __towupper_l(C, L) towupper((C)) ++#define __towlower_l(C, L) towlower((C)) ++#define __iswctype_l(C, M, L) iswctype((C), (M)) ++#endif ++ ++namespace std ++{ ++ // NB: The other ctype specializations are in src/locale.cc and ++ // various /config/os/* files. ++ template<> ++ ctype_byname::ctype_byname(const char* __s, size_t __refs) ++ : ctype(0, false, __refs) ++ { ++ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) ++ { ++ this->_S_destroy_c_locale(this->_M_c_locale_ctype); ++ this->_S_create_c_locale(this->_M_c_locale_ctype, __s); ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper; ++ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower; ++ this->_M_table = this->_M_c_locale_ctype->__ctype_b; ++#endif ++ } ++ } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ ctype::__wmask_type ++ ctype::_M_convert_to_wmask(const mask __m) const ++ { ++ __wmask_type __ret; ++ switch (__m) ++ { ++ case space: ++ __ret = __wctype_l("space", _M_c_locale_ctype); ++ break; ++ case print: ++ __ret = __wctype_l("print", _M_c_locale_ctype); ++ break; ++ case cntrl: ++ __ret = __wctype_l("cntrl", _M_c_locale_ctype); ++ break; ++ case upper: ++ __ret = __wctype_l("upper", _M_c_locale_ctype); ++ break; ++ case lower: ++ __ret = __wctype_l("lower", _M_c_locale_ctype); ++ break; ++ case alpha: ++ __ret = __wctype_l("alpha", _M_c_locale_ctype); ++ break; ++ case digit: ++ __ret = __wctype_l("digit", _M_c_locale_ctype); ++ break; ++ case punct: ++ __ret = __wctype_l("punct", _M_c_locale_ctype); ++ break; ++ case xdigit: ++ __ret = __wctype_l("xdigit", _M_c_locale_ctype); ++ break; ++ case alnum: ++ __ret = __wctype_l("alnum", _M_c_locale_ctype); ++ break; ++ case graph: ++ __ret = __wctype_l("graph", _M_c_locale_ctype); ++ break; ++ default: ++ __ret = 0; ++ } ++ return __ret; ++ } ++ ++ wchar_t ++ ctype::do_toupper(wchar_t __c) const ++ { return __towupper_l(__c, _M_c_locale_ctype); } ++ ++ const wchar_t* ++ ctype::do_toupper(wchar_t* __lo, const wchar_t* __hi) const ++ { ++ while (__lo < __hi) ++ { ++ *__lo = __towupper_l(*__lo, _M_c_locale_ctype); ++ ++__lo; ++ } ++ return __hi; ++ } ++ ++ wchar_t ++ ctype::do_tolower(wchar_t __c) const ++ { return __towlower_l(__c, _M_c_locale_ctype); } ++ ++ const wchar_t* ++ ctype::do_tolower(wchar_t* __lo, const wchar_t* __hi) const ++ { ++ while (__lo < __hi) ++ { ++ *__lo = __towlower_l(*__lo, _M_c_locale_ctype); ++ ++__lo; ++ } ++ return __hi; ++ } ++ ++ bool ++ ctype:: ++ do_is(mask __m, wchar_t __c) const ++ { ++ // Highest bitmask in ctype_base == 10, but extra in "C" ++ // library for blank. ++ bool __ret = false; ++ const size_t __bitmasksize = 11; ++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) ++ if (__m & _M_bit[__bitcur] ++ && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) ++ { ++ __ret = true; ++ break; ++ } ++ return __ret; ++ } ++ ++ const wchar_t* ++ ctype:: ++ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const ++ { ++ for (; __lo < __hi; ++__vec, ++__lo) ++ { ++ // Highest bitmask in ctype_base == 10, but extra in "C" ++ // library for blank. ++ const size_t __bitmasksize = 11; ++ mask __m = 0; ++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) ++ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype)) ++ __m |= _M_bit[__bitcur]; ++ *__vec = __m; ++ } ++ return __hi; ++ } ++ ++ const wchar_t* ++ ctype:: ++ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const ++ { ++ while (__lo < __hi && !this->do_is(__m, *__lo)) ++ ++__lo; ++ return __lo; ++ } ++ ++ const wchar_t* ++ ctype:: ++ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const ++ { ++ while (__lo < __hi && this->do_is(__m, *__lo) != 0) ++ ++__lo; ++ return __lo; ++ } ++ ++ wchar_t ++ ctype:: ++ do_widen(char __c) const ++ { return _M_widen[static_cast(__c)]; } ++ ++ const char* ++ ctype:: ++ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const ++ { ++ while (__lo < __hi) ++ { ++ *__dest = _M_widen[static_cast(*__lo)]; ++ ++__lo; ++ ++__dest; ++ } ++ return __hi; ++ } ++ ++ char ++ ctype:: ++ do_narrow(wchar_t __wc, char __dfault) const ++ { ++ if (__wc >= 0 && __wc < 128 && _M_narrow_ok) ++ return _M_narrow[__wc]; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_ctype); ++#endif ++ const int __c = wctob(__wc); ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ return (__c == EOF ? __dfault : static_cast(__c)); ++ } ++ ++ const wchar_t* ++ ctype:: ++ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, ++ char* __dest) const ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_ctype); ++#endif ++ if (_M_narrow_ok) ++ while (__lo < __hi) ++ { ++ if (*__lo >= 0 && *__lo < 128) ++ *__dest = _M_narrow[*__lo]; ++ else ++ { ++ const int __c = wctob(*__lo); ++ *__dest = (__c == EOF ? __dfault : static_cast(__c)); ++ } ++ ++__lo; ++ ++__dest; ++ } ++ else ++ while (__lo < __hi) ++ { ++ const int __c = wctob(*__lo); ++ *__dest = (__c == EOF ? __dfault : static_cast(__c)); ++ ++__lo; ++ ++__dest; ++ } ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ return __hi; ++ } ++ ++ void ++ ctype::_M_initialize_ctype() ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_ctype); ++#endif ++ wint_t __i; ++ for (__i = 0; __i < 128; ++__i) ++ { ++ const int __c = wctob(__i); ++ if (__c == EOF) ++ break; ++ else ++ _M_narrow[__i] = static_cast(__c); ++ } ++ if (__i == 128) ++ _M_narrow_ok = true; ++ else ++ _M_narrow_ok = false; ++ for (size_t __j = 0; ++ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j) ++ _M_widen[__j] = btowc(__j); ++ ++ for (size_t __k = 0; __k <= 11; ++__k) ++ { ++ _M_bit[__k] = static_cast(_ISbit(__k)); ++ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]); ++ } ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ } ++#endif // _GLIBCXX_USE_WCHAR_T ++} +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/messages_members.cc +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/messages_members.cc 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,100 @@ ++// std::messages implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.7.1.2 messages virtual functions ++// ++ ++// Written by Benjamin Kosnik ++ ++#include ++#include ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix gettext stuff ++#endif ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ ++extern "C" char *__dcgettext(const char *domainname, ++ const char *msgid, int category); ++#undef gettext ++#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES) ++#else ++#undef gettext ++#define gettext(msgid) (msgid) ++#endif ++ ++namespace std ++{ ++ // Specializations. ++ template<> ++ string ++ messages::do_get(catalog, int, int, const string& __dfault) const ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_messages); ++ const char* __msg = const_cast(gettext(__dfault.c_str())); ++ __uselocale(__old); ++ return string(__msg); ++#elif defined __UCLIBC_HAS_LOCALE__ ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, _M_name_messages); ++ const char* __msg = gettext(__dfault.c_str()); ++ setlocale(LC_ALL, __old); ++ free(__old); ++ return string(__msg); ++#else ++ const char* __msg = gettext(__dfault.c_str()); ++ return string(__msg); ++#endif ++ } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ wstring ++ messages::do_get(catalog, int, int, const wstring& __dfault) const ++ { ++# ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_messages); ++ char* __msg = gettext(_M_convert_to_char(__dfault)); ++ __uselocale(__old); ++ return _M_convert_from_char(__msg); ++# elif defined __UCLIBC_HAS_LOCALE__ ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, _M_name_messages); ++ char* __msg = gettext(_M_convert_to_char(__dfault)); ++ setlocale(LC_ALL, __old); ++ free(__old); ++ return _M_convert_from_char(__msg); ++# else ++ char* __msg = gettext(_M_convert_to_char(__dfault)); ++ return _M_convert_from_char(__msg); ++# endif ++ } ++#endif ++} +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-3.4.2/libstdc++-v3/config/locale/uclibc/messages_members.h +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/messages_members.h 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,118 @@ ++// std::messages implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.7.1.2 messages functions ++// ++ ++// Written by Benjamin Kosnik ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix prototypes for *textdomain funcs ++#endif ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ ++extern "C" char *__textdomain(const char *domainname); ++extern "C" char *__bindtextdomain(const char *domainname, ++ const char *dirname); ++#else ++#undef __textdomain ++#undef __bindtextdomain ++#define __textdomain(D) ((void)0) ++#define __bindtextdomain(D,P) ((void)0) ++#endif ++ ++ // Non-virtual member functions. ++ template ++ messages<_CharT>::messages(size_t __refs) ++ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), ++ _M_name_messages(_S_get_c_name()) ++ { } ++ ++ template ++ messages<_CharT>::messages(__c_locale __cloc, const char* __s, ++ size_t __refs) ++ : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)), ++ _M_name_messages(__s) ++ { ++ char* __tmp = new char[std::strlen(__s) + 1]; ++ std::strcpy(__tmp, __s); ++ _M_name_messages = __tmp; ++ } ++ ++ template ++ typename messages<_CharT>::catalog ++ messages<_CharT>::open(const basic_string& __s, const locale& __loc, ++ const char* __dir) const ++ { ++ __bindtextdomain(__s.c_str(), __dir); ++ return this->do_open(__s, __loc); ++ } ++ ++ // Virtual member functions. ++ template ++ messages<_CharT>::~messages() ++ { ++ if (_M_name_messages != _S_get_c_name()) ++ delete [] _M_name_messages; ++ _S_destroy_c_locale(_M_c_locale_messages); ++ } ++ ++ template ++ typename messages<_CharT>::catalog ++ messages<_CharT>::do_open(const basic_string& __s, ++ const locale&) const ++ { ++ // No error checking is done, assume the catalog exists and can ++ // be used. ++ __textdomain(__s.c_str()); ++ return 0; ++ } ++ ++ template ++ void ++ messages<_CharT>::do_close(catalog) const ++ { } ++ ++ // messages_byname ++ template ++ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) ++ : messages<_CharT>(__refs) ++ { ++ if (this->_M_name_messages != locale::facet::_S_get_c_name()) ++ delete [] this->_M_name_messages; ++ char* __tmp = new char[std::strlen(__s) + 1]; ++ std::strcpy(__tmp, __s); ++ this->_M_name_messages = __tmp; ++ ++ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) ++ { ++ this->_S_destroy_c_locale(this->_M_c_locale_messages); ++ this->_S_create_c_locale(this->_M_c_locale_messages, __s); ++ } ++ } +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,698 @@ ++// std::moneypunct implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions ++// ++ ++// Written by Benjamin Kosnik ++ ++#define _LIBC ++#include ++#undef _LIBC ++#include ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning optimize this for uclibc ++#warning tailor for stub locale support ++#endif ++ ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __nl_langinfo_l(N, L) nl_langinfo((N)) ++#endif ++ ++namespace std ++{ ++ // Construct and return valid pattern consisting of some combination of: ++ // space none symbol sign value ++ money_base::pattern ++ money_base::_S_construct_pattern(char __precedes, char __space, char __posn) ++ { ++ pattern __ret; ++ ++ // This insanely complicated routine attempts to construct a valid ++ // pattern for use with monyepunct. A couple of invariants: ++ ++ // if (__precedes) symbol -> value ++ // else value -> symbol ++ ++ // if (__space) space ++ // else none ++ ++ // none == never first ++ // space never first or last ++ ++ // Any elegant implementations of this are welcome. ++ switch (__posn) ++ { ++ case 0: ++ case 1: ++ // 1 The sign precedes the value and symbol. ++ __ret.field[0] = sign; ++ if (__space) ++ { ++ // Pattern starts with sign. ++ if (__precedes) ++ { ++ __ret.field[1] = symbol; ++ __ret.field[3] = value; ++ } ++ else ++ { ++ __ret.field[1] = value; ++ __ret.field[3] = symbol; ++ } ++ __ret.field[2] = space; ++ } ++ else ++ { ++ // Pattern starts with sign and ends with none. ++ if (__precedes) ++ { ++ __ret.field[1] = symbol; ++ __ret.field[2] = value; ++ } ++ else ++ { ++ __ret.field[1] = value; ++ __ret.field[2] = symbol; ++ } ++ __ret.field[3] = none; ++ } ++ break; ++ case 2: ++ // 2 The sign follows the value and symbol. ++ if (__space) ++ { ++ // Pattern either ends with sign. ++ if (__precedes) ++ { ++ __ret.field[0] = symbol; ++ __ret.field[2] = value; ++ } ++ else ++ { ++ __ret.field[0] = value; ++ __ret.field[2] = symbol; ++ } ++ __ret.field[1] = space; ++ __ret.field[3] = sign; ++ } ++ else ++ { ++ // Pattern ends with sign then none. ++ if (__precedes) ++ { ++ __ret.field[0] = symbol; ++ __ret.field[1] = value; ++ } ++ else ++ { ++ __ret.field[0] = value; ++ __ret.field[1] = symbol; ++ } ++ __ret.field[2] = sign; ++ __ret.field[3] = none; ++ } ++ break; ++ case 3: ++ // 3 The sign immediately precedes the symbol. ++ if (__precedes) ++ { ++ __ret.field[0] = sign; ++ __ret.field[1] = symbol; ++ if (__space) ++ { ++ __ret.field[2] = space; ++ __ret.field[3] = value; ++ } ++ else ++ { ++ __ret.field[2] = value; ++ __ret.field[3] = none; ++ } ++ } ++ else ++ { ++ __ret.field[0] = value; ++ if (__space) ++ { ++ __ret.field[1] = space; ++ __ret.field[2] = sign; ++ __ret.field[3] = symbol; ++ } ++ else ++ { ++ __ret.field[1] = sign; ++ __ret.field[2] = symbol; ++ __ret.field[3] = none; ++ } ++ } ++ break; ++ case 4: ++ // 4 The sign immediately follows the symbol. ++ if (__precedes) ++ { ++ __ret.field[0] = symbol; ++ __ret.field[1] = sign; ++ if (__space) ++ { ++ __ret.field[2] = space; ++ __ret.field[3] = value; ++ } ++ else ++ { ++ __ret.field[2] = value; ++ __ret.field[3] = none; ++ } ++ } ++ else ++ { ++ __ret.field[0] = value; ++ if (__space) ++ { ++ __ret.field[1] = space; ++ __ret.field[2] = symbol; ++ __ret.field[3] = sign; ++ } ++ else ++ { ++ __ret.field[1] = symbol; ++ __ret.field[2] = sign; ++ __ret.field[3] = none; ++ } ++ } ++ break; ++ default: ++ ; ++ } ++ return __ret; ++ } ++ ++ template<> ++ void ++ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, ++ const char*) ++ { ++ if (!_M_data) ++ _M_data = new __moneypunct_cache; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_decimal_point = '.'; ++ _M_data->_M_thousands_sep = ','; ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_curr_symbol = ""; ++ _M_data->_M_curr_symbol_size = 0; ++ _M_data->_M_positive_sign = ""; ++ _M_data->_M_positive_sign_size = 0; ++ _M_data->_M_negative_sign = ""; ++ _M_data->_M_negative_sign_size = 0; ++ _M_data->_M_frac_digits = 0; ++ _M_data->_M_pos_format = money_base::_S_default_pattern; ++ _M_data->_M_neg_format = money_base::_S_default_pattern; ++ ++ for (size_t __i = 0; __i < money_base::_S_end; ++__i) ++ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; ++ } ++ else ++ { ++ // Named locale. ++ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, ++ __cloc)); ++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, ++ __cloc)); ++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); ++ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); ++ ++ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); ++ if (!__nposn) ++ _M_data->_M_negative_sign = "()"; ++ else ++ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, ++ __cloc); ++ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); ++ ++ // _Intl == true ++ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); ++ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); ++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, ++ __cloc)); ++ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); ++ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); ++ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ __pposn); ++ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); ++ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ __nposn); ++ } ++ } ++ ++ template<> ++ void ++ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, ++ const char*) ++ { ++ if (!_M_data) ++ _M_data = new __moneypunct_cache; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_decimal_point = '.'; ++ _M_data->_M_thousands_sep = ','; ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_curr_symbol = ""; ++ _M_data->_M_curr_symbol_size = 0; ++ _M_data->_M_positive_sign = ""; ++ _M_data->_M_positive_sign_size = 0; ++ _M_data->_M_negative_sign = ""; ++ _M_data->_M_negative_sign_size = 0; ++ _M_data->_M_frac_digits = 0; ++ _M_data->_M_pos_format = money_base::_S_default_pattern; ++ _M_data->_M_neg_format = money_base::_S_default_pattern; ++ ++ for (size_t __i = 0; __i < money_base::_S_end; ++__i) ++ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; ++ } ++ else ++ { ++ // Named locale. ++ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, ++ __cloc)); ++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, ++ __cloc)); ++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); ++ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); ++ ++ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); ++ if (!__nposn) ++ _M_data->_M_negative_sign = "()"; ++ else ++ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, ++ __cloc); ++ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); ++ ++ // _Intl == false ++ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); ++ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); ++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); ++ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); ++ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); ++ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ __pposn); ++ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); ++ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ __nposn); ++ } ++ } ++ ++ template<> ++ moneypunct::~moneypunct() ++ { delete _M_data; } ++ ++ template<> ++ moneypunct::~moneypunct() ++ { delete _M_data; } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ void ++ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ const char*) ++#else ++ const char* __name) ++#endif ++ { ++ if (!_M_data) ++ _M_data = new __moneypunct_cache; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_decimal_point = L'.'; ++ _M_data->_M_thousands_sep = L','; ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_curr_symbol = L""; ++ _M_data->_M_curr_symbol_size = 0; ++ _M_data->_M_positive_sign = L""; ++ _M_data->_M_positive_sign_size = 0; ++ _M_data->_M_negative_sign = L""; ++ _M_data->_M_negative_sign_size = 0; ++ _M_data->_M_frac_digits = 0; ++ _M_data->_M_pos_format = money_base::_S_default_pattern; ++ _M_data->_M_neg_format = money_base::_S_default_pattern; ++ ++ // Use ctype::widen code without the facet... ++ unsigned char uc; ++ for (size_t __i = 0; __i < money_base::_S_end; ++__i) ++ { ++ uc = static_cast(money_base::_S_atoms[__i]); ++ _M_data->_M_atoms[__i] = btowc(uc); ++ } ++ } ++ else ++ { ++ // Named locale. ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(__cloc); ++#else ++ // Switch to named locale so that mbsrtowcs will work. ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, __name); ++#endif ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix this... should be monetary ++#endif ++#ifdef __UCLIBC__ ++# ifdef __UCLIBC_HAS_XLOCALE__ ++ _M_data->_M_decimal_point = __cloc->decimal_point_wc; ++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; ++# else ++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; ++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; ++# endif ++#else ++ union __s_and_w { const char *__s; unsigned int __w; } __u; ++ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); ++ _M_data->_M_decimal_point = static_cast(__u.__w); ++ ++ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); ++ _M_data->_M_thousands_sep = static_cast(__u.__w); ++#endif ++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ ++ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); ++ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); ++ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); ++ ++ wchar_t* __wcs_ps = 0; ++ wchar_t* __wcs_ns = 0; ++ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); ++ try ++ { ++ mbstate_t __state; ++ size_t __len = strlen(__cpossign); ++ if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ __wcs_ps = new wchar_t[__len]; ++ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); ++ _M_data->_M_positive_sign = __wcs_ps; ++ } ++ else ++ _M_data->_M_positive_sign = L""; ++ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); ++ ++ __len = strlen(__cnegsign); ++ if (!__nposn) ++ _M_data->_M_negative_sign = L"()"; ++ else if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ __wcs_ns = new wchar_t[__len]; ++ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); ++ _M_data->_M_negative_sign = __wcs_ns; ++ } ++ else ++ _M_data->_M_negative_sign = L""; ++ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); ++ ++ // _Intl == true. ++ __len = strlen(__ccurr); ++ if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ wchar_t* __wcs = new wchar_t[__len]; ++ mbsrtowcs(__wcs, &__ccurr, __len, &__state); ++ _M_data->_M_curr_symbol = __wcs; ++ } ++ else ++ _M_data->_M_curr_symbol = L""; ++ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); ++ } ++ catch (...) ++ { ++ delete _M_data; ++ _M_data = 0; ++ delete __wcs_ps; ++ delete __wcs_ns; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#else ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ __throw_exception_again; ++ } ++ ++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, ++ __cloc)); ++ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); ++ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); ++ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ __pposn); ++ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); ++ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ __nposn); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#else ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ } ++ } ++ ++ template<> ++ void ++ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ const char*) ++#else ++ const char* __name) ++#endif ++ { ++ if (!_M_data) ++ _M_data = new __moneypunct_cache; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_decimal_point = L'.'; ++ _M_data->_M_thousands_sep = L','; ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_curr_symbol = L""; ++ _M_data->_M_curr_symbol_size = 0; ++ _M_data->_M_positive_sign = L""; ++ _M_data->_M_positive_sign_size = 0; ++ _M_data->_M_negative_sign = L""; ++ _M_data->_M_negative_sign_size = 0; ++ _M_data->_M_frac_digits = 0; ++ _M_data->_M_pos_format = money_base::_S_default_pattern; ++ _M_data->_M_neg_format = money_base::_S_default_pattern; ++ ++ // Use ctype::widen code without the facet... ++ unsigned char uc; ++ for (size_t __i = 0; __i < money_base::_S_end; ++__i) ++ { ++ uc = static_cast(money_base::_S_atoms[__i]); ++ _M_data->_M_atoms[__i] = btowc(uc); ++ } ++ } ++ else ++ { ++ // Named locale. ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(__cloc); ++#else ++ // Switch to named locale so that mbsrtowcs will work. ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, __name); ++#endif ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix this... should be monetary ++#endif ++#ifdef __UCLIBC__ ++# ifdef __UCLIBC_HAS_XLOCALE__ ++ _M_data->_M_decimal_point = __cloc->decimal_point_wc; ++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; ++# else ++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; ++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; ++# endif ++#else ++ union __s_and_w { const char *__s; unsigned int __w; } __u; ++ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); ++ _M_data->_M_decimal_point = static_cast(__u.__w); ++ ++ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); ++ _M_data->_M_thousands_sep = static_cast(__u.__w); ++#endif ++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ ++ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); ++ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); ++ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); ++ ++ wchar_t* __wcs_ps = 0; ++ wchar_t* __wcs_ns = 0; ++ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); ++ try ++ { ++ mbstate_t __state; ++ size_t __len; ++ __len = strlen(__cpossign); ++ if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ __wcs_ps = new wchar_t[__len]; ++ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); ++ _M_data->_M_positive_sign = __wcs_ps; ++ } ++ else ++ _M_data->_M_positive_sign = L""; ++ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); ++ ++ __len = strlen(__cnegsign); ++ if (!__nposn) ++ _M_data->_M_negative_sign = L"()"; ++ else if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ __wcs_ns = new wchar_t[__len]; ++ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); ++ _M_data->_M_negative_sign = __wcs_ns; ++ } ++ else ++ _M_data->_M_negative_sign = L""; ++ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); ++ ++ // _Intl == true. ++ __len = strlen(__ccurr); ++ if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ wchar_t* __wcs = new wchar_t[__len]; ++ mbsrtowcs(__wcs, &__ccurr, __len, &__state); ++ _M_data->_M_curr_symbol = __wcs; ++ } ++ else ++ _M_data->_M_curr_symbol = L""; ++ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); ++ } ++ catch (...) ++ { ++ delete _M_data; ++ _M_data = 0; ++ delete __wcs_ps; ++ delete __wcs_ns; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#else ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ __throw_exception_again; ++ } ++ ++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); ++ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); ++ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); ++ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ __pposn); ++ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); ++ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ __nposn); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#else ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ } ++ } ++ ++ template<> ++ moneypunct::~moneypunct() ++ { ++ if (_M_data->_M_positive_sign_size) ++ delete [] _M_data->_M_positive_sign; ++ if (_M_data->_M_negative_sign_size ++ && wcscmp(_M_data->_M_negative_sign, L"()") != 0) ++ delete [] _M_data->_M_negative_sign; ++ if (_M_data->_M_curr_symbol_size) ++ delete [] _M_data->_M_curr_symbol; ++ delete _M_data; ++ } ++ ++ template<> ++ moneypunct::~moneypunct() ++ { ++ if (_M_data->_M_positive_sign_size) ++ delete [] _M_data->_M_positive_sign; ++ if (_M_data->_M_negative_sign_size ++ && wcscmp(_M_data->_M_negative_sign, L"()") != 0) ++ delete [] _M_data->_M_negative_sign; ++ if (_M_data->_M_curr_symbol_size) ++ delete [] _M_data->_M_curr_symbol; ++ delete _M_data; ++ } ++#endif ++} +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,183 @@ ++// std::numpunct implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions ++// ++ ++// Written by Benjamin Kosnik ++ ++#define _LIBC ++#include ++#undef _LIBC ++#include ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning tailor for stub locale support ++#endif ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __nl_langinfo_l(N, L) nl_langinfo((N)) ++#endif ++ ++namespace std ++{ ++ template<> ++ void ++ numpunct::_M_initialize_numpunct(__c_locale __cloc) ++ { ++ if (!_M_data) ++ _M_data = new __numpunct_cache; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_use_grouping = false; ++ ++ _M_data->_M_decimal_point = '.'; ++ _M_data->_M_thousands_sep = ','; ++ ++ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) ++ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i]; ++ ++ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) ++ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j]; ++ } ++ else ++ { ++ // Named locale. ++ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT, ++ __cloc)); ++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP, ++ __cloc)); ++ ++ // Check for NULL, which implies no grouping. ++ if (_M_data->_M_thousands_sep == '\0') ++ _M_data->_M_grouping = ""; ++ else ++ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ } ++ ++ // NB: There is no way to extact this info from posix locales. ++ // _M_truename = __nl_langinfo_l(YESSTR, __cloc); ++ _M_data->_M_truename = "true"; ++ _M_data->_M_truename_size = strlen(_M_data->_M_truename); ++ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); ++ _M_data->_M_falsename = "false"; ++ _M_data->_M_falsename_size = strlen(_M_data->_M_falsename); ++ } ++ ++ template<> ++ numpunct::~numpunct() ++ { delete _M_data; } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ void ++ numpunct::_M_initialize_numpunct(__c_locale __cloc) ++ { ++ if (!_M_data) ++ _M_data = new __numpunct_cache; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_use_grouping = false; ++ ++ _M_data->_M_decimal_point = L'.'; ++ _M_data->_M_thousands_sep = L','; ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_S_get_c_locale()); ++#endif ++ // Use ctype::widen code without the facet... ++ unsigned char uc; ++ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) ++ { ++ uc = static_cast(__num_base::_S_atoms_out[__i]); ++ _M_data->_M_atoms_out[__i] = btowc(uc); ++ } ++ ++ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) ++ { ++ uc = static_cast(__num_base::_S_atoms_in[__j]); ++ _M_data->_M_atoms_in[__j] = btowc(uc); ++ } ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ } ++ else ++ { ++ // Named locale. ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix this ++#endif ++#ifdef __UCLIBC__ ++# ifdef __UCLIBC_HAS_XLOCALE__ ++ _M_data->_M_decimal_point = __cloc->decimal_point_wc; ++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; ++# else ++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; ++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; ++# endif ++#else ++ union __s_and_w { const char *__s; unsigned int __w; } __u; ++ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc); ++ _M_data->_M_decimal_point = static_cast(__u.__w); ++ ++ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc); ++ _M_data->_M_thousands_sep = static_cast(__u.__w); ++#endif ++ ++ if (_M_data->_M_thousands_sep == L'\0') ++ _M_data->_M_grouping = ""; ++ else ++ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ } ++ ++ // NB: There is no way to extact this info from posix locales. ++ // _M_truename = __nl_langinfo_l(YESSTR, __cloc); ++ _M_data->_M_truename = L"true"; ++ _M_data->_M_truename_size = wcslen(_M_data->_M_truename); ++ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); ++ _M_data->_M_falsename = L"false"; ++ _M_data->_M_falsename_size = wcslen(_M_data->_M_falsename); ++ } ++ ++ template<> ++ numpunct::~numpunct() ++ { delete _M_data; } ++ #endif ++} +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/time_members.cc +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/time_members.cc 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/time_members.cc 2004-09-10 10:48:00.000000000 -0500 +@@ -0,0 +1,356 @@ ++// std::time_get, std::time_put implementation, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions ++// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions ++// ++ ++// Written by Benjamin Kosnik ++ ++#include ++#include ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning tailor for stub locale support ++#endif ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __nl_langinfo_l(N, L) nl_langinfo((N)) ++#endif ++ ++namespace std ++{ ++ template<> ++ void ++ __timepunct:: ++ _M_put(char* __s, size_t __maxlen, const char* __format, ++ const tm* __tm) const ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm, ++ _M_c_locale_timepunct); ++#else ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, _M_name_timepunct); ++ const size_t __len = strftime(__s, __maxlen, __format, __tm); ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ // Make sure __s is null terminated. ++ if (__len == 0) ++ __s[0] = '\0'; ++ } ++ ++ template<> ++ void ++ __timepunct::_M_initialize_timepunct(__c_locale __cloc) ++ { ++ if (!_M_data) ++ _M_data = new __timepunct_cache; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_c_locale_timepunct = _S_get_c_locale(); ++ ++ _M_data->_M_date_format = "%m/%d/%y"; ++ _M_data->_M_date_era_format = "%m/%d/%y"; ++ _M_data->_M_time_format = "%H:%M:%S"; ++ _M_data->_M_time_era_format = "%H:%M:%S"; ++ _M_data->_M_date_time_format = ""; ++ _M_data->_M_date_time_era_format = ""; ++ _M_data->_M_am = "AM"; ++ _M_data->_M_pm = "PM"; ++ _M_data->_M_am_pm_format = ""; ++ ++ // Day names, starting with "C"'s Sunday. ++ _M_data->_M_day1 = "Sunday"; ++ _M_data->_M_day2 = "Monday"; ++ _M_data->_M_day3 = "Tuesday"; ++ _M_data->_M_day4 = "Wednesday"; ++ _M_data->_M_day5 = "Thursday"; ++ _M_data->_M_day6 = "Friday"; ++ _M_data->_M_day7 = "Saturday"; ++ ++ // Abbreviated day names, starting with "C"'s Sun. ++ _M_data->_M_aday1 = "Sun"; ++ _M_data->_M_aday2 = "Mon"; ++ _M_data->_M_aday3 = "Tue"; ++ _M_data->_M_aday4 = "Wed"; ++ _M_data->_M_aday5 = "Thu"; ++ _M_data->_M_aday6 = "Fri"; ++ _M_data->_M_aday7 = "Sat"; ++ ++ // Month names, starting with "C"'s January. ++ _M_data->_M_month01 = "January"; ++ _M_data->_M_month02 = "February"; ++ _M_data->_M_month03 = "March"; ++ _M_data->_M_month04 = "April"; ++ _M_data->_M_month05 = "May"; ++ _M_data->_M_month06 = "June"; ++ _M_data->_M_month07 = "July"; ++ _M_data->_M_month08 = "August"; ++ _M_data->_M_month09 = "September"; ++ _M_data->_M_month10 = "October"; ++ _M_data->_M_month11 = "November"; ++ _M_data->_M_month12 = "December"; ++ ++ // Abbreviated month names, starting with "C"'s Jan. ++ _M_data->_M_amonth01 = "Jan"; ++ _M_data->_M_amonth02 = "Feb"; ++ _M_data->_M_amonth03 = "Mar"; ++ _M_data->_M_amonth04 = "Apr"; ++ _M_data->_M_amonth05 = "May"; ++ _M_data->_M_amonth06 = "Jun"; ++ _M_data->_M_amonth07 = "Jul"; ++ _M_data->_M_amonth08 = "Aug"; ++ _M_data->_M_amonth09 = "Sep"; ++ _M_data->_M_amonth10 = "Oct"; ++ _M_data->_M_amonth11 = "Nov"; ++ _M_data->_M_amonth12 = "Dec"; ++ } ++ else ++ { ++ _M_c_locale_timepunct = _S_clone_c_locale(__cloc); ++ ++ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc); ++ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc); ++ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc); ++ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc); ++ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc); ++ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT, __cloc); ++ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc); ++ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc); ++ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc); ++ ++ // Day names, starting with "C"'s Sunday. ++ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc); ++ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc); ++ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc); ++ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc); ++ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc); ++ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc); ++ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc); ++ ++ // Abbreviated day names, starting with "C"'s Sun. ++ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc); ++ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc); ++ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc); ++ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc); ++ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc); ++ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc); ++ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc); ++ ++ // Month names, starting with "C"'s January. ++ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc); ++ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc); ++ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc); ++ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc); ++ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc); ++ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc); ++ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc); ++ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc); ++ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc); ++ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc); ++ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc); ++ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc); ++ ++ // Abbreviated month names, starting with "C"'s Jan. ++ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc); ++ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc); ++ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc); ++ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc); ++ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc); ++ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc); ++ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc); ++ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc); ++ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc); ++ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc); ++ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc); ++ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc); ++ } ++ } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ void ++ __timepunct:: ++ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, ++ const tm* __tm) const ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct); ++ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm, ++ _M_c_locale_timepunct); ++#else ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, _M_name_timepunct); ++ const size_t __len = wcsftime(__s, __maxlen, __format, __tm); ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ // Make sure __s is null terminated. ++ if (__len == 0) ++ __s[0] = L'\0'; ++ } ++ ++ template<> ++ void ++ __timepunct::_M_initialize_timepunct(__c_locale __cloc) ++ { ++ if (!_M_data) ++ _M_data = new __timepunct_cache; ++ ++#warning wide time stuff ++// if (!__cloc) ++ { ++ // "C" locale ++ _M_c_locale_timepunct = _S_get_c_locale(); ++ ++ _M_data->_M_date_format = L"%m/%d/%y"; ++ _M_data->_M_date_era_format = L"%m/%d/%y"; ++ _M_data->_M_time_format = L"%H:%M:%S"; ++ _M_data->_M_time_era_format = L"%H:%M:%S"; ++ _M_data->_M_date_time_format = L""; ++ _M_data->_M_date_time_era_format = L""; ++ _M_data->_M_am = L"AM"; ++ _M_data->_M_pm = L"PM"; ++ _M_data->_M_am_pm_format = L""; ++ ++ // Day names, starting with "C"'s Sunday. ++ _M_data->_M_day1 = L"Sunday"; ++ _M_data->_M_day2 = L"Monday"; ++ _M_data->_M_day3 = L"Tuesday"; ++ _M_data->_M_day4 = L"Wednesday"; ++ _M_data->_M_day5 = L"Thursday"; ++ _M_data->_M_day6 = L"Friday"; ++ _M_data->_M_day7 = L"Saturday"; ++ ++ // Abbreviated day names, starting with "C"'s Sun. ++ _M_data->_M_aday1 = L"Sun"; ++ _M_data->_M_aday2 = L"Mon"; ++ _M_data->_M_aday3 = L"Tue"; ++ _M_data->_M_aday4 = L"Wed"; ++ _M_data->_M_aday5 = L"Thu"; ++ _M_data->_M_aday6 = L"Fri"; ++ _M_data->_M_aday7 = L"Sat"; ++ ++ // Month names, starting with "C"'s January. ++ _M_data->_M_month01 = L"January"; ++ _M_data->_M_month02 = L"February"; ++ _M_data->_M_month03 = L"March"; ++ _M_data->_M_month04 = L"April"; ++ _M_data->_M_month05 = L"May"; ++ _M_data->_M_month06 = L"June"; ++ _M_data->_M_month07 = L"July"; ++ _M_data->_M_month08 = L"August"; ++ _M_data->_M_month09 = L"September"; ++ _M_data->_M_month10 = L"October"; ++ _M_data->_M_month11 = L"November"; ++ _M_data->_M_month12 = L"December"; ++ ++ // Abbreviated month names, starting with "C"'s Jan. ++ _M_data->_M_amonth01 = L"Jan"; ++ _M_data->_M_amonth02 = L"Feb"; ++ _M_data->_M_amonth03 = L"Mar"; ++ _M_data->_M_amonth04 = L"Apr"; ++ _M_data->_M_amonth05 = L"May"; ++ _M_data->_M_amonth06 = L"Jun"; ++ _M_data->_M_amonth07 = L"Jul"; ++ _M_data->_M_amonth08 = L"Aug"; ++ _M_data->_M_amonth09 = L"Sep"; ++ _M_data->_M_amonth10 = L"Oct"; ++ _M_data->_M_amonth11 = L"Nov"; ++ _M_data->_M_amonth12 = L"Dec"; ++ } ++#if 0 ++ else ++ { ++ _M_c_locale_timepunct = _S_clone_c_locale(__cloc); ++ ++ _M_data->_M_date_format = reinterpret_cast(__nl_langinfo_l(_NL_WD_FMT, __cloc)); ++ _M_data->_M_date_era_format = reinterpret_cast(__nl_langinfo_l(_NL_WERA_D_FMT, __cloc)); ++ _M_data->_M_time_format = reinterpret_cast(__nl_langinfo_l(_NL_WT_FMT, __cloc)); ++ _M_data->_M_time_era_format = reinterpret_cast(__nl_langinfo_l(_NL_WERA_T_FMT, __cloc)); ++ _M_data->_M_date_time_format = reinterpret_cast(__nl_langinfo_l(_NL_WD_T_FMT, __cloc)); ++ _M_data->_M_date_time_era_format = reinterpret_cast(__nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc)); ++ _M_data->_M_am = reinterpret_cast(__nl_langinfo_l(_NL_WAM_STR, __cloc)); ++ _M_data->_M_pm = reinterpret_cast(__nl_langinfo_l(_NL_WPM_STR, __cloc)); ++ _M_data->_M_am_pm_format = reinterpret_cast(__nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc)); ++ ++ // Day names, starting with "C"'s Sunday. ++ _M_data->_M_day1 = reinterpret_cast(__nl_langinfo_l(_NL_WDAY_1, __cloc)); ++ _M_data->_M_day2 = reinterpret_cast(__nl_langinfo_l(_NL_WDAY_2, __cloc)); ++ _M_data->_M_day3 = reinterpret_cast(__nl_langinfo_l(_NL_WDAY_3, __cloc)); ++ _M_data->_M_day4 = reinterpret_cast(__nl_langinfo_l(_NL_WDAY_4, __cloc)); ++ _M_data->_M_day5 = reinterpret_cast(__nl_langinfo_l(_NL_WDAY_5, __cloc)); ++ _M_data->_M_day6 = reinterpret_cast(__nl_langinfo_l(_NL_WDAY_6, __cloc)); ++ _M_data->_M_day7 = reinterpret_cast(__nl_langinfo_l(_NL_WDAY_7, __cloc)); ++ ++ // Abbreviated day names, starting with "C"'s Sun. ++ _M_data->_M_aday1 = reinterpret_cast(__nl_langinfo_l(_NL_WABDAY_1, __cloc)); ++ _M_data->_M_aday2 = reinterpret_cast(__nl_langinfo_l(_NL_WABDAY_2, __cloc)); ++ _M_data->_M_aday3 = reinterpret_cast(__nl_langinfo_l(_NL_WABDAY_3, __cloc)); ++ _M_data->_M_aday4 = reinterpret_cast(__nl_langinfo_l(_NL_WABDAY_4, __cloc)); ++ _M_data->_M_aday5 = reinterpret_cast(__nl_langinfo_l(_NL_WABDAY_5, __cloc)); ++ _M_data->_M_aday6 = reinterpret_cast(__nl_langinfo_l(_NL_WABDAY_6, __cloc)); ++ _M_data->_M_aday7 = reinterpret_cast(__nl_langinfo_l(_NL_WABDAY_7, __cloc)); ++ ++ // Month names, starting with "C"'s January. ++ _M_data->_M_month01 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_1, __cloc)); ++ _M_data->_M_month02 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_2, __cloc)); ++ _M_data->_M_month03 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_3, __cloc)); ++ _M_data->_M_month04 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_4, __cloc)); ++ _M_data->_M_month05 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_5, __cloc)); ++ _M_data->_M_month06 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_6, __cloc)); ++ _M_data->_M_month07 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_7, __cloc)); ++ _M_data->_M_month08 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_8, __cloc)); ++ _M_data->_M_month09 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_9, __cloc)); ++ _M_data->_M_month10 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_10, __cloc)); ++ _M_data->_M_month11 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_11, __cloc)); ++ _M_data->_M_month12 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_12, __cloc)); ++ ++ // Abbreviated month names, starting with "C"'s Jan. ++ _M_data->_M_amonth01 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_1, __cloc)); ++ _M_data->_M_amonth02 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_2, __cloc)); ++ _M_data->_M_amonth03 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_3, __cloc)); ++ _M_data->_M_amonth04 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_4, __cloc)); ++ _M_data->_M_amonth05 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_5, __cloc)); ++ _M_data->_M_amonth06 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_6, __cloc)); ++ _M_data->_M_amonth07 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_7, __cloc)); ++ _M_data->_M_amonth08 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_8, __cloc)); ++ _M_data->_M_amonth09 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_9, __cloc)); ++ _M_data->_M_amonth10 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_10, __cloc)); ++ _M_data->_M_amonth11 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_11, __cloc)); ++ _M_data->_M_amonth12 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_12, __cloc)); ++ } ++#endif // 0 ++ } ++#endif ++} +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/time_members.h gcc-3.4.2/libstdc++-v3/config/locale/uclibc/time_members.h +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/time_members.h 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/time_members.h 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,68 @@ ++// std::time_get, std::time_put implementation, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.2.5.1.2 - time_get functions ++// ISO C++ 14882: 22.2.5.3.2 - time_put functions ++// ++ ++// Written by Benjamin Kosnik ++ ++ template ++ __timepunct<_CharT>::__timepunct(size_t __refs) ++ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), ++ _M_name_timepunct(_S_get_c_name()) ++ { _M_initialize_timepunct(); } ++ ++ template ++ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) ++ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), ++ _M_name_timepunct(_S_get_c_name()) ++ { _M_initialize_timepunct(); } ++ ++ template ++ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, ++ size_t __refs) ++ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), ++ _M_name_timepunct(__s) ++ { ++ char* __tmp = new char[std::strlen(__s) + 1]; ++ std::strcpy(__tmp, __s); ++ _M_name_timepunct = __tmp; ++ _M_initialize_timepunct(__cloc); ++ } ++ ++ template ++ __timepunct<_CharT>::~__timepunct() ++ { ++ if (_M_name_timepunct != _S_get_c_name()) ++ delete [] _M_name_timepunct; ++ delete _M_data; ++ _S_destroy_c_locale(_M_c_locale_timepunct); ++ } +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_base.h gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_base.h +--- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_base.h 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_base.h 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,58 @@ ++// Locale support -*- C++ -*- ++ ++// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003 ++// Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.1 Locales ++// ++ ++// Information as gleaned from /usr/include/ctype.h ++ ++ struct ctype_base ++ { ++ // Note: In uClibc, the following two types depend on configuration. ++ ++ // Non-standard typedefs. ++ typedef const __ctype_touplow_t* __to_type; ++ ++ // NB: Offsets into ctype::_M_table force a particular size ++ // on the mask type. Because of this, we don't use an enum. ++ typedef __ctype_mask_t mask; ++ static const mask upper = _ISupper; ++ static const mask lower = _ISlower; ++ static const mask alpha = _ISalpha; ++ static const mask digit = _ISdigit; ++ static const mask xdigit = _ISxdigit; ++ static const mask space = _ISspace; ++ static const mask print = _ISprint; ++ static const mask graph = _ISalpha | _ISdigit | _ISpunct; ++ static const mask cntrl = _IScntrl; ++ static const mask punct = _ISpunct; ++ static const mask alnum = _ISalpha | _ISdigit; ++ }; +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_inline.h +--- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_inline.h 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,69 @@ ++// Locale support -*- C++ -*- ++ ++// Copyright (C) 2000, 2002 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.1 Locales ++// ++ ++// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) ++// functions go in ctype.cc ++ ++ bool ++ ctype:: ++ is(mask __m, char __c) const ++ { return _M_table[static_cast(__c)] & __m; } ++ ++ const char* ++ ctype:: ++ is(const char* __low, const char* __high, mask* __vec) const ++ { ++ while (__low < __high) ++ *__vec++ = _M_table[static_cast(*__low++)]; ++ return __high; ++ } ++ ++ const char* ++ ctype:: ++ scan_is(mask __m, const char* __low, const char* __high) const ++ { ++ while (__low < __high ++ && !(_M_table[static_cast(*__low)] & __m)) ++ ++__low; ++ return __low; ++ } ++ ++ const char* ++ ctype:: ++ scan_not(mask __m, const char* __low, const char* __high) const ++ { ++ while (__low < __high ++ && (_M_table[static_cast(*__low)] & __m) != 0) ++ ++__low; ++ return __low; ++ } +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_noninline.h +--- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_noninline.h 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,92 @@ ++// Locale support -*- C++ -*- ++ ++// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004 ++// Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++// ++// ISO C++ 14882: 22.1 Locales ++// ++ ++// Information as gleaned from /usr/include/ctype.h ++ ++ const ctype_base::mask* ++ ctype::classic_table() throw() ++ { return __C_ctype_b; } ++ ++ ctype::ctype(__c_locale, const mask* __table, bool __del, ++ size_t __refs) ++ : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), ++ _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0) ++ { ++ _M_toupper = __C_ctype_toupper; ++ _M_tolower = __C_ctype_tolower; ++ _M_table = __table ? __table : __C_ctype_b; ++ memset(_M_widen, 0, sizeof(_M_widen)); ++ memset(_M_narrow, 0, sizeof(_M_narrow)); ++ } ++ ++ ctype::ctype(const mask* __table, bool __del, size_t __refs) ++ : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), ++ _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0) ++ { ++ _M_toupper = __C_ctype_toupper; ++ _M_tolower = __C_ctype_tolower; ++ _M_table = __table ? __table : __C_ctype_b; ++ memset(_M_widen, 0, sizeof(_M_widen)); ++ memset(_M_narrow, 0, sizeof(_M_narrow)); ++ } ++ ++ char ++ ctype::do_toupper(char __c) const ++ { return _M_toupper[static_cast(__c)]; } ++ ++ const char* ++ ctype::do_toupper(char* __low, const char* __high) const ++ { ++ while (__low < __high) ++ { ++ *__low = _M_toupper[static_cast(*__low)]; ++ ++__low; ++ } ++ return __high; ++ } ++ ++ char ++ ctype::do_tolower(char __c) const ++ { return _M_tolower[static_cast(__c)]; } ++ ++ const char* ++ ctype::do_tolower(char* __low, const char* __high) const ++ { ++ while (__low < __high) ++ { ++ *__low = _M_tolower[static_cast(*__low)]; ++ ++__low; ++ } ++ return __high; ++ } +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/os_defines.h gcc-3.4.2/libstdc++-v3/config/os/uclibc/os_defines.h +--- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/os_defines.h 1969-12-31 18:00:00.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/os_defines.h 2004-09-10 10:47:40.000000000 -0500 +@@ -0,0 +1,44 @@ ++// Specific definitions for GNU/Linux -*- C++ -*- ++ ++// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 2, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING. If not, write to the Free ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// USA. ++ ++// As a special exception, you may use this file as part of a free software ++// library without restriction. Specifically, if other files instantiate ++// templates or use macros or inline functions from this file, or you compile ++// this file and link it with other files to produce an executable, this ++// file does not by itself cause the resulting executable to be covered by ++// the GNU General Public License. This exception does not however ++// invalidate any other reasons why the executable file might be covered by ++// the GNU General Public License. ++ ++#ifndef _GLIBCXX_OS_DEFINES ++#define _GLIBCXX_OS_DEFINES 1 ++ ++// System-specific #define, typedefs, corrections, etc, go here. This ++// file will come before all others. ++ ++// This keeps isanum, et al from being propagated as macros. ++#define __NO_CTYPE 1 ++ ++#include ++ ++// We must not see the optimized string functions GNU libc defines. ++#define __NO_STRING_INLINES ++ ++#endif +diff -urN gcc-3.4.2-dist/libstdc++-v3/configure gcc-3.4.2/libstdc++-v3/configure +--- gcc-3.4.2-dist/libstdc++-v3/configure 2004-08-13 15:44:04.000000000 -0500 ++++ gcc-3.4.2/libstdc++-v3/configure 2004-09-10 10:47:40.000000000 -0500 +@@ -3878,6 +3878,11 @@ + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' +@@ -5545,6 +5550,9 @@ + # Default to "generic". + if test $enable_clocale_flag = auto; then + case x${target_os} in ++ xlinux-uclibc*) ++ enable_clocale_flag=uclibc ++ ;; + xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu) + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" +@@ -5759,6 +5767,77 @@ + CTIME_CC=config/locale/generic/time_members.cc + CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h + ;; ++ uclibc) ++ echo "$as_me:$LINENO: result: uclibc" >&5 ++echo "${ECHO_T}uclibc" >&6 ++ ++ # Declare intention to use gettext, and add support for specific ++ # languages. ++ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT ++ ALL_LINGUAS="de fr" ++ ++ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. ++ # Extract the first word of "msgfmt", so it can be a program name with args. ++set dummy msgfmt; ac_word=$2 ++echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_check_msgfmt+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$check_msgfmt"; then ++ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_check_msgfmt="yes" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++ ++ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no" ++fi ++fi ++check_msgfmt=$ac_cv_prog_check_msgfmt ++if test -n "$check_msgfmt"; then ++ echo "$as_me:$LINENO: result: $check_msgfmt" >&5 ++echo "${ECHO_T}$check_msgfmt" >&6 ++else ++ echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6 ++fi ++ ++ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then ++ USE_NLS=yes ++ fi ++ # Export the build objects. ++ for ling in $ALL_LINGUAS; do \ ++ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ ++ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ ++ done ++ ++ ++ ++ CLOCALE_H=config/locale/uclibc/c_locale.h ++ CLOCALE_CC=config/locale/uclibc/c_locale.cc ++ CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h ++ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc ++ CCOLLATE_CC=config/locale/uclibc/collate_members.cc ++ CCTYPE_CC=config/locale/uclibc/ctype_members.cc ++ CMESSAGES_H=config/locale/uclibc/messages_members.h ++ CMESSAGES_CC=config/locale/uclibc/messages_members.cc ++ CMONEY_CC=config/locale/uclibc/monetary_members.cc ++ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc ++ CTIME_H=config/locale/uclibc/time_members.h ++ CTIME_CC=config/locale/uclibc/time_members.cc ++ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h ++ ;; + esac + + # This is where the testsuite looks for locale catalogs, using the +diff -urN gcc-3.4.2-dist/libstdc++-v3/configure.host gcc-3.4.2/libstdc++-v3/configure.host +--- gcc-3.4.2-dist/libstdc++-v3/configure.host 2004-08-27 14:52:30.000000000 -0500 ++++ gcc-3.4.2/libstdc++-v3/configure.host 2004-09-10 10:47:40.000000000 -0500 +@@ -217,6 +217,12 @@ + ;; + esac + ++# Override for uClibc since linux-uclibc gets mishandled above. ++case "${host_os}" in ++ *-uclibc*) ++ os_include_dir="os/uclibc" ++ ;; ++esac + + # Set any OS-dependent and CPU-dependent bits. + # THIS TABLE IS SORTED. KEEP IT THAT WAY. +diff -urN gcc-3.4.2-dist/libstdc++-v3/crossconfig.m4 gcc-3.4.2/libstdc++-v3/crossconfig.m4 +--- gcc-3.4.2-dist/libstdc++-v3/crossconfig.m4 2004-07-06 20:23:49.000000000 -0500 ++++ gcc-3.4.2/libstdc++-v3/crossconfig.m4 2004-09-10 10:47:40.000000000 -0500 +@@ -138,6 +138,99 @@ + ;; + esac + ;; ++ *-uclibc*) ++# Temporary hack until we implement the float versions of the libm funcs ++ AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \ ++ machine/endian.h machine/param.h sys/machine.h sys/types.h \ ++ fp.h float.h endian.h inttypes.h locale.h float.h stdint.h]) ++ SECTION_FLAGS='-ffunction-sections -fdata-sections' ++ AC_SUBST(SECTION_FLAGS) ++ GLIBCXX_CHECK_LINKER_FEATURES ++ GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ++ GLIBCXX_CHECK_WCHAR_T_SUPPORT ++ ++ # For LFS. ++ AC_DEFINE(HAVE_INT64_T) ++ case "$target" in ++ *-uclinux*) ++ # Don't enable LFS with uClinux ++ ;; ++ *) ++ AC_DEFINE(_GLIBCXX_USE_LFS) ++ esac ++ ++ # For showmanyc_helper(). ++ AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h) ++ GLIBCXX_CHECK_POLL ++ GLIBCXX_CHECK_S_ISREG_OR_S_IFREG ++ ++ # For xsputn_2(). ++ AC_CHECK_HEADERS(sys/uio.h) ++ GLIBCXX_CHECK_WRITEV ++ ++# AC_DEFINE(HAVE_ACOSF) ++# AC_DEFINE(HAVE_ASINF) ++# AC_DEFINE(HAVE_ATANF) ++# AC_DEFINE(HAVE_ATAN2F) ++ AC_DEFINE(HAVE_CEILF) ++ AC_DEFINE(HAVE_COPYSIGN) ++# AC_DEFINE(HAVE_COPYSIGNF) ++# AC_DEFINE(HAVE_COSF) ++# AC_DEFINE(HAVE_COSHF) ++# AC_DEFINE(HAVE_EXPF) ++# AC_DEFINE(HAVE_FABSF) ++ AC_DEFINE(HAVE_FINITE) ++ AC_DEFINE(HAVE_FINITEF) ++ AC_DEFINE(HAVE_FLOORF) ++# AC_DEFINE(HAVE_FMODF) ++# AC_DEFINE(HAVE_FREXPF) ++ AC_DEFINE(HAVE_HYPOT) ++# AC_DEFINE(HAVE_HYPOTF) ++ AC_DEFINE(HAVE_ISINF) ++ AC_DEFINE(HAVE_ISINFF) ++ AC_DEFINE(HAVE_ISNAN) ++ AC_DEFINE(HAVE_ISNANF) ++# AC_DEFINE(HAVE_LOGF) ++# AC_DEFINE(HAVE_LOG10F) ++# AC_DEFINE(HAVE_MODFF) ++# AC_DEFINE(HAVE_SINF) ++# AC_DEFINE(HAVE_SINHF) ++# AC_DEFINE(HAVE_SINCOS) ++# AC_DEFINE(HAVE_SINCOSF) ++ AC_DEFINE(HAVE_SQRTF) ++# AC_DEFINE(HAVE_TANF) ++# AC_DEFINE(HAVE_TANHF) ++ if test x"long_double_math_on_this_cpu" = x"yes"; then ++ AC_MSG_ERROR([long_double_math_on_this_cpu is yes!]) ++# AC_DEFINE(HAVE_ACOSL) ++# AC_DEFINE(HAVE_ASINL) ++# AC_DEFINE(HAVE_ATANL) ++# AC_DEFINE(HAVE_ATAN2L) ++# AC_DEFINE(HAVE_CEILL) ++# AC_DEFINE(HAVE_COPYSIGNL) ++# AC_DEFINE(HAVE_COSL) ++# AC_DEFINE(HAVE_COSHL) ++# AC_DEFINE(HAVE_EXPL) ++# AC_DEFINE(HAVE_FABSL) ++# AC_DEFINE(HAVE_FINITEL) ++# AC_DEFINE(HAVE_FLOORL) ++# AC_DEFINE(HAVE_FMODL) ++# AC_DEFINE(HAVE_FREXPL) ++# AC_DEFINE(HAVE_HYPOTL) ++# AC_DEFINE(HAVE_ISINFL) ++# AC_DEFINE(HAVE_ISNANL) ++# AC_DEFINE(HAVE_LOGL) ++# AC_DEFINE(HAVE_LOG10L) ++# AC_DEFINE(HAVE_MODFL) ++# AC_DEFINE(HAVE_POWL) ++# AC_DEFINE(HAVE_SINL) ++# AC_DEFINE(HAVE_SINHL) ++# AC_DEFINE(HAVE_SINCOSL) ++# AC_DEFINE(HAVE_SQRTL) ++# AC_DEFINE(HAVE_TANL) ++# AC_DEFINE(HAVE_TANHL) ++ fi ++ ;; + *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu) + AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \ + machine/endian.h machine/param.h sys/machine.h sys/types.h \ +@@ -152,7 +245,7 @@ + AC_DEFINE(HAVE_INT64_T) + case "$target" in + *-uclinux*) +- # Don't enable LFS with uClibc ++ # Don't enable LFS with uClinux + ;; + *) + AC_DEFINE(_GLIBCXX_USE_LFS) +diff -urN gcc-3.4.2-dist/libstdc++-v3/include/c_compatibility/wchar.h gcc-3.4.2/libstdc++-v3/include/c_compatibility/wchar.h +--- gcc-3.4.2-dist/libstdc++-v3/include/c_compatibility/wchar.h 2003-12-08 21:51:45.000000000 -0600 ++++ gcc-3.4.2/libstdc++-v3/include/c_compatibility/wchar.h 2004-09-10 10:47:40.000000000 -0500 +@@ -101,7 +101,9 @@ + using std::wmemcpy; + using std::wmemmove; + using std::wmemset; ++#if _GLIBCXX_HAVE_WCSFTIME + using std::wcsftime; ++#endif + + #if _GLIBCXX_USE_C99 + using std::wcstold; +diff -urN gcc-3.4.2-dist/libstdc++-v3/include/c_std/std_cwchar.h gcc-3.4.2/libstdc++-v3/include/c_std/std_cwchar.h +--- gcc-3.4.2-dist/libstdc++-v3/include/c_std/std_cwchar.h 2004-07-20 03:52:12.000000000 -0500 ++++ gcc-3.4.2/libstdc++-v3/include/c_std/std_cwchar.h 2004-09-10 10:47:40.000000000 -0500 +@@ -179,7 +179,9 @@ + using ::wcscoll; + using ::wcscpy; + using ::wcscspn; ++#if _GLIBCXX_HAVE_WCSFTIME + using ::wcsftime; ++#endif + using ::wcslen; + using ::wcsncat; + using ::wcsncmp; diff --git a/openembedded/packages/gcc/gcc-3.4.3/gcc-uclibc-3.4.0-120-softfloat.patch b/openembedded/packages/gcc/gcc-3.4.3/gcc-uclibc-3.4.0-120-softfloat.patch new file mode 100644 index 0000000000..f2431896cf --- /dev/null +++ b/openembedded/packages/gcc/gcc-3.4.3/gcc-uclibc-3.4.0-120-softfloat.patch @@ -0,0 +1,14 @@ +--- gcc-3.3.2-old/configure.in 2003-08-09 01:57:21.000000000 -0500 ++++ gcc-3.3.2/configure.in 2004-01-15 12:46:29.000000000 -0600 +@@ -1418,6 +1418,11 @@ + fi + + FLAGS_FOR_TARGET= ++case " $targargs " in ++ *" --nfp "* | *" --without-float "*) ++ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -msoft-float' ++ ;; ++esac + case " $target_configdirs " in + *" newlib "*) + case " $targargs " in diff --git a/openembedded/packages/gcc/gcc-3.4.3/gcc34-arm-ldm-peephole.patch b/openembedded/packages/gcc/gcc-3.4.3/gcc34-arm-ldm-peephole.patch new file mode 100644 index 0000000000..fb317e1537 --- /dev/null +++ b/openembedded/packages/gcc/gcc-3.4.3/gcc34-arm-ldm-peephole.patch @@ -0,0 +1,79 @@ +--- gcc-3.4.0/gcc/config/arm/arm.md.arm-ldm-peephole 2004-01-13 08:24:37.000000000 -0500 ++++ gcc-3.4.0/gcc/config/arm/arm.md 2004-04-24 18:18:04.000000000 -0400 +@@ -8810,13 +8810,16 @@ + (set_attr "length" "4,8,8")] + ) + ++; Try to convert LDR+LDR+arith into [add+]LDM+arith ++; On XScale, LDM is always slower than two LDRs, so only do this if ++; optimising for size. + (define_insn "*arith_adjacentmem" + [(set (match_operand:SI 0 "s_register_operand" "=r") + (match_operator:SI 1 "shiftable_operator" + [(match_operand:SI 2 "memory_operand" "m") + (match_operand:SI 3 "memory_operand" "m")])) + (clobber (match_scratch:SI 4 "=r"))] +- "TARGET_ARM && adjacent_mem_locations (operands[2], operands[3])" ++ "TARGET_ARM && (!arm_tune_xscale || optimize_size) && adjacent_mem_locations (operands[2], operands[3])" + "* + { + rtx ldm[3]; +@@ -8851,6 +8854,8 @@ + } + if (val1 && val2) + { ++ /* This would be a loss on a Harvard core, but adjacent_mem_locations() ++ will prevent it from happening. */ + rtx ops[3]; + ldm[0] = ops[0] = operands[4]; + ops[1] = XEXP (XEXP (operands[2], 0), 0); +--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm-peephole 2004-04-24 18:16:25.000000000 -0400 ++++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:18:04.000000000 -0400 +@@ -4593,8 +4593,11 @@ + arith_adjacentmem pattern to output an overlong sequence. */ + if (!const_ok_for_op (PLUS, val0) || !const_ok_for_op (PLUS, val1)) + return 0; +- +- return (reg0 == reg1) && ((val1 - val0) == 4 || (val0 - val1) == 4); ++ ++ /* For Harvard cores, only accept pairs where one offset is zero. ++ See comment in load_multiple_sequence. */ ++ return (reg0 == reg1) && ((val1 - val0) == 4 || (val0 - val1) == 4) ++ && (!arm_ld_sched || val0 == 0 || val1 == 0); + } + return 0; + } +@@ -4838,6 +4841,11 @@ + *load_offset = unsorted_offsets[order[0]]; + } + ++ /* For XScale a two-word LDM is a performance loss, so only do this if ++ size is more important. See comments in arm_gen_load_multiple. */ ++ if (nops == 2 && arm_tune_xscale && !optimize_size) ++ return 0; ++ + if (unsorted_offsets[order[0]] == 0) + return 1; /* ldmia */ + +@@ -5064,6 +5072,11 @@ + *load_offset = unsorted_offsets[order[0]]; + } + ++ /* For XScale a two-word LDM is a performance loss, so only do this if ++ size is more important. See comments in arm_gen_load_multiple. */ ++ if (nops == 2 && arm_tune_xscale && !optimize_size) ++ return 0; ++ + if (unsorted_offsets[order[0]] == 0) + return 1; /* stmia */ + +--- gcc-3.4.0/gcc/genpeep.c.arm-ldm-peephole 2003-07-05 01:27:22.000000000 -0400 ++++ gcc-3.4.0/gcc/genpeep.c 2004-04-24 18:18:04.000000000 -0400 +@@ -381,6 +381,7 @@ + printf ("#include \"recog.h\"\n"); + printf ("#include \"except.h\"\n\n"); + printf ("#include \"function.h\"\n\n"); ++ printf ("#include \"flags.h\"\n\n"); + + printf ("#ifdef HAVE_peephole\n"); + printf ("extern rtx peep_operand[];\n\n"); diff --git a/openembedded/packages/gcc/gcc-3.4.3/gcc34-arm-ldm.patch b/openembedded/packages/gcc/gcc-3.4.3/gcc34-arm-ldm.patch new file mode 100644 index 0000000000..142052fdf0 --- /dev/null +++ b/openembedded/packages/gcc/gcc-3.4.3/gcc34-arm-ldm.patch @@ -0,0 +1,119 @@ +--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm 2004-02-27 09:51:05.000000000 -0500 ++++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:16:25.000000000 -0400 +@@ -8520,6 +8520,26 @@ + return_used_this_function = 0; + } + ++/* Return the number (counting from 0) of ++ the least significant set bit in MASK. */ ++ ++#ifdef __GNUC__ ++inline ++#endif ++static int ++number_of_first_bit_set (mask) ++ int mask; ++{ ++ int bit; ++ ++ for (bit = 0; ++ (mask & (1 << bit)) == 0; ++ ++bit) ++ continue; ++ ++ return bit; ++} ++ + const char * + arm_output_epilogue (rtx sibling) + { +@@ -8753,27 +8773,47 @@ + saved_regs_mask |= (1 << PC_REGNUM); + } + +- /* Load the registers off the stack. If we only have one register +- to load use the LDR instruction - it is faster. */ +- if (saved_regs_mask == (1 << LR_REGNUM)) +- { +- /* The exception handler ignores the LR, so we do +- not really need to load it off the stack. */ +- if (eh_ofs) +- asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM); +- else +- asm_fprintf (f, "\tldr\t%r, [%r], #4\n", LR_REGNUM, SP_REGNUM); +- } +- else if (saved_regs_mask) ++ if (saved_regs_mask) + { +- if (saved_regs_mask & (1 << SP_REGNUM)) +- /* Note - write back to the stack register is not enabled +- (ie "ldmfd sp!..."). We know that the stack pointer is +- in the list of registers and if we add writeback the +- instruction becomes UNPREDICTABLE. */ +- print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask); ++ /* Load the registers off the stack. If we only have one register ++ to load use the LDR instruction - it is faster. */ ++ if (bit_count (saved_regs_mask) == 1) ++ { ++ int reg = number_of_first_bit_set (saved_regs_mask); ++ ++ switch (reg) ++ { ++ case SP_REGNUM: ++ /* Mustn't use base writeback when loading SP. */ ++ asm_fprintf (f, "\tldr\t%r, [%r]\n", SP_REGNUM, SP_REGNUM); ++ break; ++ ++ case LR_REGNUM: ++ if (eh_ofs) ++ { ++ /* The exception handler ignores the LR, so we do ++ not really need to load it off the stack. */ ++ asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM); ++ break; ++ } ++ /* else fall through */ ++ ++ default: ++ asm_fprintf (f, "\tldr\t%r, [%r], #4\n", reg, SP_REGNUM); ++ break; ++ } ++ } + else +- print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask); ++ { ++ if (saved_regs_mask & (1 << SP_REGNUM)) ++ /* Note - write back to the stack register is not enabled ++ (ie "ldmfd sp!..."). We know that the stack pointer is ++ in the list of registers and if we add writeback the ++ instruction becomes UNPREDICTABLE. */ ++ print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask); ++ else ++ print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask); ++ } + } + + if (current_function_pretend_args_size) +@@ -11401,22 +11441,6 @@ + } + } + +-/* Return the number (counting from 0) of +- the least significant set bit in MASK. */ +- +-inline static int +-number_of_first_bit_set (int mask) +-{ +- int bit; +- +- for (bit = 0; +- (mask & (1 << bit)) == 0; +- ++bit) +- continue; +- +- return bit; +-} +- + /* Generate code to return from a thumb function. + If 'reg_containing_return_addr' is -1, then the return address is + actually on the stack, at the stack pointer. */ diff --git a/openembedded/packages/gcc/gcc-3.4.3/gcc34-arm-tune.patch b/openembedded/packages/gcc/gcc-3.4.3/gcc34-arm-tune.patch new file mode 100644 index 0000000000..cdb20bef9b --- /dev/null +++ b/openembedded/packages/gcc/gcc-3.4.3/gcc34-arm-tune.patch @@ -0,0 +1,9 @@ +--- gcc-3.4.0/gcc/config/arm/linux-elf.h.arm-tune 2004-01-31 01:18:11.000000000 -0500 ++++ gcc-3.4.0/gcc/config/arm/linux-elf.h 2004-04-24 18:19:10.000000000 -0400 +@@ -126,3 +126,6 @@ + + #define LINK_GCC_C_SEQUENCE_SPEC \ + "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" ++ ++/* Tune for XScale. */ ++#define TARGET_TUNE_DEFAULT TARGET_CPU_xscale diff --git a/openembedded/packages/gcc/gcc-3.4.3/gcc34-reverse-compare.patch b/openembedded/packages/gcc/gcc-3.4.3/gcc34-reverse-compare.patch new file mode 100644 index 0000000000..c3c40dd183 --- /dev/null +++ b/openembedded/packages/gcc/gcc-3.4.3/gcc34-reverse-compare.patch @@ -0,0 +1,32 @@ +--- gcc-3.4.0/gcc/flow.c.reverse-compare 2004-02-27 22:39:19.000000000 -0500 ++++ gcc-3.4.0/gcc/flow.c 2004-04-24 16:36:00.000000000 -0400 +@@ -1843,6 +1843,7 @@ + regset_head diff_head; + regset diff = INITIALIZE_REG_SET (diff_head); + basic_block bb_true, bb_false; ++ enum rtx_code reversed_code; + int i; + + /* Identify the successor blocks. */ +@@ -1889,8 +1890,11 @@ + if (GET_CODE (reg) == REG + && XEXP (cond_true, 1) == const0_rtx) + { +- rtx cond_false +- = gen_rtx_fmt_ee (reverse_condition (GET_CODE (cond_true)), ++ rtx cond_false; ++ reversed_code = reverse_condition (GET_CODE (cond_true)); ++ if (reversed_code == UNKNOWN) ++ goto skip; ++ cond_false = gen_rtx_fmt_ee (reversed_code, + GET_MODE (cond_true), XEXP (cond_true, 0), + XEXP (cond_true, 1)); + if (GET_CODE (XEXP (set_src, 1)) == PC) +@@ -1925,6 +1929,7 @@ + } + } + ++ skip: + FREE_REG_SET (diff); + } + #endif diff --git a/openembedded/packages/gcc/gcc-3.4.3/sdk-libstdc++-includes.patch b/openembedded/packages/gcc/gcc-3.4.3/sdk-libstdc++-includes.patch new file mode 100644 index 0000000000..4377c2143b --- /dev/null +++ b/openembedded/packages/gcc/gcc-3.4.3/sdk-libstdc++-includes.patch @@ -0,0 +1,22 @@ +--- gcc-3.4.1/libstdc++-v3/libmath/Makefile.am~ 2003-08-27 22:29:42.000000000 +0100 ++++ gcc-3.4.1/libstdc++-v3/libmath/Makefile.am 2004-07-22 16:41:45.152130128 +0100 +@@ -32,7 +32,7 @@ + + libmath_la_SOURCES = stubs.c + +-AM_CPPFLAGS = $(CANADIAN_INCLUDES) ++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include + + # Only compiling "C" sources in this directory. + LIBTOOL = @LIBTOOL@ --tag CC +--- gcc-3.4.1/libstdc++-v3/fragment.am.old 2004-07-22 18:24:58.024083656 +0100 ++++ gcc-3.4.1/libstdc++-v3/fragment.am 2004-07-22 18:24:59.019932264 +0100 +@@ -18,7 +18,7 @@ + $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once + + # -I/-D flags to pass when compiling. +-AM_CPPFLAGS = $(GLIBCXX_INCLUDES) ++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include + + + diff --git a/openembedded/packages/gcc/gcc-cross-initial_3.4.3.bb b/openembedded/packages/gcc/gcc-cross-initial_3.4.3.bb new file mode 100644 index 0000000000..0d64e32c1c --- /dev/null +++ b/openembedded/packages/gcc/gcc-cross-initial_3.4.3.bb @@ -0,0 +1,27 @@ +include gcc-cross_${PV}.bb + +DEPENDS = "virtual/${TARGET_PREFIX}binutils ${@['virtual/${TARGET_PREFIX}libc-initial',''][bb.data.getVar('TARGET_ARCH', d, 1) in ['arm', 'armeb', 'mips', 'mipsel']]}" +PROVIDES = "virtual/${TARGET_PREFIX}gcc-initial" +PACKAGES = "" + +# This is intended to be a -very- basic config +EXTRA_OECONF = "--with-local-prefix=${CROSS_DIR}/${TARGET_SYS} \ + --with-newlib \ + --disable-shared \ + --disable-threads \ + --disable-multilib \ + --disable-__cxa_atexit \ + --enable-languages=c \ + --enable-target-optspace \ + --program-prefix=${TARGET_PREFIX} \ + ${@get_gcc_fpu_setting(bb, d)}" + +do_stage_prepend () { + mkdir -p ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV} + ln -sf libgcc.a ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/libgcc_eh.a +} + +# Override the method from gcc-cross so we don't try to install libgcc +do_install () { + oe_runmake 'DESTDIR=${D}' install +} diff --git a/openembedded/packages/gcc/gcc-cross_3.4.3.bb b/openembedded/packages/gcc/gcc-cross_3.4.3.bb new file mode 100644 index 0000000000..a5d1bda170 --- /dev/null +++ b/openembedded/packages/gcc/gcc-cross_3.4.3.bb @@ -0,0 +1,16 @@ +include gcc_${PV}.bb +# path mangling, needed by the cross packaging +include gcc-paths-cross.inc +inherit cross +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}" +# NOTE: split PR. If the main .oe changes something that affects its *build* +# remember to increment this one too. +PR = "r10" + +DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc" +PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" + +# cross build +include gcc3-build-cross.inc +# cross packaging +include gcc-package-cross.inc diff --git a/openembedded/packages/gcc/gcc-package-cross.inc b/openembedded/packages/gcc/gcc-package-cross.inc new file mode 100644 index 0000000000..56299b5157 --- /dev/null +++ b/openembedded/packages/gcc/gcc-package-cross.inc @@ -0,0 +1,77 @@ +# Packages emitted by our gcc-cross builds. +# +INHIBIT_PACKAGE_STRIP ?= "" +HAS_G2C ?= "yes" +HAS_GFORTRAN ?= "no" +OLD_INHIBIT_PACKAGE_STRIP := "${INHIBIT_PACKAGE_STRIP}" +INHIBIT_PACKAGE_STRIP = "1" + +PACKAGES = "libgcc libstdc++ libg2c libg2c-dev libgfortran libgfortran-dev" + +PACKAGE_ARCH_libg2c = "${TARGET_ARCH}" +PACKAGE_ARCH_libg2c-dev = "${TARGET_ARCH}" +PACKAGE_ARCH_libgfortran = "${TARGET_ARCH}" +PACKAGE_ARCH_libgfortran-dev = "${TARGET_ARCH}" + +# Called from within gcc-cross, so libdir is set wrong +FILES_libg2c = "${target_libdir}/libg2c.so.*" +FILES_libg2c-dev = "${target_libdir}/libg2c.so \ + ${target_libdir}/libg2c.a \ + ${target_libdir}/libfrtbegin.a" + +FILES_libgfortran = "${target_libdir}/libgfortran.so.*" +FILES_libgfortran-dev = "${target_libdir}/libgfortran.a \ + ${target_libdir}/libgfortran.so \ + ${target_libdir}/libgfortranbegin.a" + +PACKAGE_ARCH_libgcc = "${TARGET_ARCH}" +FILES_libgcc = "${target_base_libdir}/libgcc_s.so.1" + +PACKAGE_ARCH_libstdc++ = "${TARGET_ARCH}" +PACKAGE_ARCH_libstdc++-dev = "${TARGET_ARCH}" +FILES_libstdc++ = "${target_libdir}/libstdc++.so.*" +FILES_libstdc++-dev = "${target_includedir}/c++/${PV} \ + ${target_libdir}/libstdc++.so \ + ${target_libdir}/libstdc++.la \ + ${target_libdir}/libstdc++.a \ + ${target_libdir}/libsupc++.la \ + ${target_libdir}/libsupc++.a" + +python do_package() { + if bb.data.getVar('DEBIAN_NAMES', d, 1): + bb.data.setVar('PKG_libgcc', 'libgcc1', d) + bb.build.exec_func('package_do_package', d) +} + +do_install () { + oe_runmake 'DESTDIR=${D}' install + + # Move libgcc_s into /lib + mkdir -p ${D}${target_base_libdir} + if [ -f ${D}${target_base_libdir}/libgcc_s.so.? ]; then + # Already in the right location + : + elif [ -f ${D}${prefix}/lib/libgcc_s.so.? ]; then + mv -f ${D}${prefix}/lib/libgcc_s.so.* ${D}${target_base_libdir} + else + mv -f ${D}${prefix}/*/lib/libgcc_s.so.* ${D}${target_base_libdir} + fi + + # Move libstdc++ and libg2c into libdir (resetting our prefix to /usr + mkdir -p ${D}${target_libdir} + mv -f ${D}${prefix}/*/lib/libstdc++.so.* ${D}${target_libdir} + if [ "${HAS_G2C}" = "yes" ]; then + mv -f ${D}${prefix}/*/lib/libg2c.so.* ${D}${target_libdir} + fi + if [ "${HAS_GFORTRAN}" = "yes" ]; then + mv -f ${D}${prefix}/*/lib/libgfortran*.so.* ${D}${target_libdir} + fi + + # Manually run the target stripper since we won't get it run by + # the packaging. + if [ "x${OLD_INHIBIT_PACKAGE_STRIP}" != "x1" ]; then + ${TARGET_PREFIX}strip ${D}${target_libdir}/libstdc++.so.* + ${TARGET_PREFIX}strip ${D}${target_libdir}/libg2c.so.* + ${TARGET_PREFIX}strip ${D}${base_libdir}/libgcc_s.so.* + fi +} diff --git a/openembedded/packages/gcc/gcc-package.inc b/openembedded/packages/gcc/gcc-package.inc new file mode 100644 index 0000000000..b31a209b34 --- /dev/null +++ b/openembedded/packages/gcc/gcc-package.inc @@ -0,0 +1,110 @@ +gcclibdir ?= "${libdir}/gcc" +BINV ?= "${PV}" + +# libgcc libstdc++ libg2c are listed in our FILES_*, but are actually +# packaged in the respective cross packages. +PACKAGES = "${PN} ${PN}-symlinks \ + g++ g++-symlinks \ + cpp cpp-symlinks \ + g77 g77-symlinks \ + gcov gcov-symlinks \ + libstdc++-dev libg2c-dev \ + ${PN}-doc" + +FILES_${PN} = "${bindir}/${TARGET_PREFIX}gcc \ + ${bindir}/${TARGET_PREFIX}gccbug \ + ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1 \ + ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2 \ + ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \ + ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \ + ${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \ + ${gcclibdir}/${TARGET_SYS}/${BINV}/include" +FILES_${PN}-symlinks = "${bindir}/cc \ + ${bindir}/gcc \ + ${bindir}/gccbug" + +FILES_g77 = "${bindir}/${TARGET_PREFIX}g77 \ + ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f771" +FILES_g77-symlinks = "${bindir}/g77 \ + ${bindir}/f77" + +FILES_cpp = "${bindir}/${TARGET_PREFIX}cpp \ + ${base_libdir}/cpp" +FILES_cpp-symlinks = "${bindir}/cpp" + +FILES_gcov = "${bindir}/${TARGET_PREFIX}gcov" +FILES_gcov-symlinks = "${bindir}/gcov" + +PACKAGE_ARCH_libg2c-dev = "${TARGET_ARCH}" +# Called from within gcc-cross, so libdir is set wrong +FILES_libg2c-dev = "${libdir}/libg2c.so \ + ${libdir}/libg2c.a \ + ${libdir}/libfrtbegin.a" + +FILES_g++ = "${bindir}/${TARGET_PREFIX}g++ \ + ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus" +FILES_g++-symlinks = "${bindir}/c++ \ + ${bindir}/g++" + +PACKAGE_ARCH_libstdc++-dev = "${TARGET_ARCH}" +FILES_libstdc++-dev = "${includedir}/c++/${BINV} \ + ${libdir}/libstdc++.so \ + ${libdir}/libstdc++.la \ + ${libdir}/libstdc++.a \ + ${libdir}/libsupc++.la \ + ${libdir}/libsupc++.a" + +FILES_${PN}-doc = "${infodir} \ + ${mandir} \ + ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README" + + +do_install () { + autotools_do_install + + # Cleanup some of the ${libdir}{,exec}/gcc stuff ... + rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools + rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools + + # Hack around specs file assumptions + sed -i -e '/^*cross_compile:$/ { n; s/1/0/; }' ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/specs + + # Move libgcc_s into /lib + mkdir -p ${D}${base_libdir} + mv ${D}${libdir}/libgcc_s.so.* ${D}${base_libdir} + rm ${D}${libdir}/libgcc_s.so + ln -sf `echo ${libdir}/gcc/${TARGET_SYS}/${BINV} \ + | tr -s / \ + | sed -e 's,^/,,' -e 's,[^/]*,..,g'`/lib/libgcc_s.so.1 \ + ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/libgcc_s.so + + # We don't need libtool libraries + rm ${D}${libdir}/libg2c.la + + # Cleanup manpages.. + rm -r ${D}${mandir}/man7 + + # We use libiberty from binutils + rm ${D}${libdir}/libiberty.a + + cd ${D}${bindir} + + # We care about g++ not c++ + rm *c++ + + # We don't care about the gcc- ones for this + rm *gcc-?.?* + + # These sometimes show up, they are strange, we remove them + rm -f ${TARGET_ARCH}-*${TARGET_ARCH}-* + + # Symlinks so we can use these trivially on the target + ln -sf ${TARGET_SYS}-g77 g77 + ln -sf ${TARGET_SYS}-g++ g++ + ln -sf ${TARGET_SYS}-gcc gcc + ln -sf g77 f77 + ln -sf g++ c++ + ln -sf gcc cc + ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${base_libdir}/cpp + ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${bindir}/cpp +} diff --git a/openembedded/packages/gcc/gcc-paths-cross.inc b/openembedded/packages/gcc/gcc-paths-cross.inc new file mode 100644 index 0000000000..3c08b1805d --- /dev/null +++ b/openembedded/packages/gcc/gcc-paths-cross.inc @@ -0,0 +1,7 @@ +# Note that we use := here, and require that this +# is included at the correct point (before inheriting +# cross) to ensure that libdir and includedir are +# target paths, not CROSS_DIR paths. +target_libdir := "${libdir}" +target_includedir := "${includedir}" +target_base_libdir := "${base_libdir}" diff --git a/openembedded/packages/gcc/gcc3-build-cross.inc b/openembedded/packages/gcc/gcc3-build-cross.inc new file mode 100644 index 0000000000..a41ae11d64 --- /dev/null +++ b/openembedded/packages/gcc/gcc3-build-cross.inc @@ -0,0 +1,43 @@ +USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}' + +EXTRA_OECONF_PATHS = "--with-local-prefix=${CROSS_DIR}/${TARGET_SYS} \ + --with-gxx-include-dir=${CROSS_DIR}/${TARGET_SYS}/include/c++" + +do_configure_prepend () { + rm -f ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/libgcc_eh.a +} + +do_compile_prepend () { + export CC="${BUILD_CC}" + export AR_FOR_TARGET="${TARGET_SYS}-ar" + export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib" + export LD_FOR_TARGET="${TARGET_SYS}-ld" + export NM_FOR_TARGET="${TARGET_SYS}-nm" + export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}" +} + +do_stage_append () { + for d in info man share/doc share/locale ; do + rm -rf ${CROSS_DIR}/$d + done + + # These aren't useful on the cross toolchain + rm -f ${CROSS_DIR}/bin/*gcov + rm -f ${CROSS_DIR}/bin/*gccbug + + # Fix a few include links so cross builds are happier + if [ ! -e ${STAGING_INCDIR}/c++ ]; then + mkdir -p ${STAGING_INCDIR} + ln -sf ${CROSS_DIR}/${TARGET_SYS}/include/c++ \ + ${STAGING_INCDIR}/ + fi + + # We use libiberty from binutils + rm -f ${CROSS_DIR}/lib/libiberty.a + + # We probably don't need these + rmdir ${CROSS_DIR}/include || : + + # We don't really need to keep this around + rm -rf ${CROSS_DIR}/share +} diff --git a/openembedded/packages/gcc/gcc3-build.inc b/openembedded/packages/gcc/gcc3-build.inc new file mode 100644 index 0000000000..a09c6cf1f5 --- /dev/null +++ b/openembedded/packages/gcc/gcc3-build.inc @@ -0,0 +1,91 @@ +MIRRORS_prepend () { +${GNU_MIRROR}/gcc/releases/ ftp://gcc.gnu.org/pub/gcc/releases/ +${GNU_MIRROR}/gcc/ http://mirrors.rcn.net/pub/sourceware/gcc/releases/ +${GNU_MIRROR}/gcc/releases/ http://gcc.get-software.com/releases/ +${GNU_MIRROR}/gcc/ http://gcc.get-software.com/releases/ +} + +gcclibdir ?= "${libdir}/gcc" +S = "${WORKDIR}/gcc-${PV}" +B = "${S}/build.${HOST_SYS}.${TARGET_SYS}" +BINV ?= "${PV}" + +# gcj doesn't work on arm +JAVA = ",java" +JAVA_arm = "" +JAVA_armeb = "" +JAVA_mipsel = "" +# gcc4-build sets this to f95 +FORTRAN ?= "f77" +LANGUAGES ?= "c,c++,${FORTRAN}${JAVA}" + +EXTRA_OECONF = "${@['--enable-clocale=generic', ''][bb.data.getVar('USE_NLS', d, 1) != 'no']} \ + --with-gnu-ld \ + --enable-shared \ + --enable-target-optspace \ + --enable-languages=${LANGUAGES} \ + --enable-threads=posix \ + --enable-multilib \ + --enable-c99 \ + --enable-long-long \ + --enable-symvers=gnu \ + --enable-libstdcxx-pch \ + --program-prefix=${TARGET_PREFIX} \ + ${EXTRA_OECONF_PATHS} \ + ${EXTRA_OECONF_DEP}" + +EXTRA_OECONF_PATHS = " \ + --with-local-prefix=${prefix}/local \ + --with-gxx-include-dir=${includedir}/c++/${BINV}" + +EXTRA_OECONF_DEP = "" +EXTRA_OECONF_uclibc = "--disable-__cxa_atexit" +EXTRA_OECONF_glibc = "--enable-__cxa_atexit" +EXTRA_OECONF += "${@get_gcc_fpu_setting(bb, d)}" +CPPFLAGS = "" + +# Used by configure to define additional values for FLAGS_FOR_TARGET - +# passed to all the compilers. +ARCH_FLAGS_FOR_TARGET = "" +ARCH_FLAGS_FOR_TARGET_nslu2 = "${TARGET_CC_ARCH}" +EXTRA_OEMAKE += "ARCH_FLAGS_FOR_TARGET='${ARCH_FLAGS_FOR_TARGET}'" + +def get_gcc_fpu_setting(bb, d): + if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]: + return "--with-float=soft" + return "" + +python __anonymous () { + import bb, re + if (re.match('linux-uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None): + bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_uclibc}', d) + elif (re.match('linux$', bb.data.getVar('TARGET_OS', d, 1)) != None): + bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_glibc}', d) +} + +do_configure () { + # Setup these vars for cross building only + # ... because foo_FOR_TARGET apparently gets misinterpreted inside the + # gcc build stuff when the build is producing a cross compiler - i.e. + # when the 'current' target is the 'host' system, and the host is not + # the target (because the build is actually making a cross compiler!) + if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then + export CC_FOR_TARGET="${CC}" + export GCC_FOR_TARGET="${CC}" + export CXX_FOR_TARGET="${CXX}" + export AS_FOR_TARGET="${HOST_PREFIX}as" + export LD_FOR_TARGET="${HOST_PREFIX}ld" + export NM_FOR_TARGET="${HOST_PREFIX}nm" + export AR_FOR_TARGET="${HOST_PREFIX}ar" + export RANLIB_FOR_TARGET="${HOST_PREFIX}ranlib" + fi + export CC_FOR_BUILD="${BUILD_CC}" + export CXX_FOR_BUILD="${BUILD_CXX}" + export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}" + export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}" + export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}" + export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}" + export ARCH_FLAGS_FOR_TARGET="${ARCH_FLAGS_FOR_TARGET}" + (cd ${S} && gnu-configize) || die "failure running gnu-configize" + oe_runconf +} diff --git a/openembedded/packages/gcc/gcc4-build.inc b/openembedded/packages/gcc/gcc4-build.inc new file mode 100644 index 0000000000..8b80f4820a --- /dev/null +++ b/openembedded/packages/gcc/gcc4-build.inc @@ -0,0 +1,6 @@ +FORTRAN = "f95" +HAS_GFORTRAN = "yes" +HAS_G2C = "no" + +include gcc3-build.inc + diff --git a/openembedded/packages/gcc/gcc_3.4.3.bb b/openembedded/packages/gcc/gcc_3.4.3.bb new file mode 100644 index 0000000000..c92746be58 --- /dev/null +++ b/openembedded/packages/gcc/gcc_3.4.3.bb @@ -0,0 +1,27 @@ +PR = "r11" +DESCRIPTION = "The GNU cc and gcc C compilers." +HOMEPAGE = "http://www.gnu.org/software/gcc/" +SECTION = "devel" +LICENSE = "GPL" +MAINTAINER = "Gerald Britton " + +inherit autotools gettext + +include gcc-package.inc + +SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \ + file://gcc34-reverse-compare.patch;patch=1 \ + file://gcc34-arm-ldm.patch;patch=1 \ + file://gcc34-arm-ldm-peephole.patch;patch=1 \ + file://gcc34-arm-tune.patch;patch=1 \ + file://gcc-3.4.1-uclibc-100-conf.patch;patch=1 \ + file://gcc-3.4.1-uclibc-200-locale.patch;patch=1 \ + file://gcc-3.4.0-arm-lib1asm.patch;patch=1 \ + file://gcc-3.4.0-arm-nolibfloat.patch;patch=1 \ + file://gcc-3.4.0-arm-bigendian.patch;patch=1 \ + file://gcc-3.4.0-arm-bigendian-uclibc.patch;patch=1 \ + file://GCC3.4.0VisibilityPatch.diff;patch=1 \ + file://15342.patch;patch=1 \ + file://always-fixincperm.patch;patch=1" + +include gcc3-build.inc diff --git a/openembedded/packages/gdbm/gdbm-1.8.3/makefile.patch b/openembedded/packages/gdbm/gdbm-1.8.3/makefile.patch new file mode 100644 index 0000000000..5350c53729 --- /dev/null +++ b/openembedded/packages/gdbm/gdbm-1.8.3/makefile.patch @@ -0,0 +1,59 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- gdbm-1.8.3/Makefile.in~makefile ++++ gdbm-1.8.3/Makefile.in +@@ -22,6 +22,7 @@ + TEXI2DVI = texi2dvi + + DEFS = ++DESTDIR = + + # Where the system [n]dbm routines are... + LIBS = @LIBS@ -lc +@@ -127,26 +128,26 @@ + progs: $(PROGS) + + install: libgdbm.la gdbm.h gdbm.info +- $(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \ +- $(INSTALL_ROOT)$(includedir) $(INSTALL_ROOT)$(man3dir) \ +- $(INSTALL_ROOT)$(infodir) +- $(LIBTOOL) $(INSTALL) -c libgdbm.la $(INSTALL_ROOT)$(libdir)/libgdbm.la +- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) gdbm.h \ +- $(INSTALL_ROOT)$(includedir)/gdbm.h +- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/gdbm.3 \ +- $(INSTALL_ROOT)$(man3dir)/gdbm.3 +- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/gdbm.info \ +- $(INSTALL_ROOT)$(infodir)/gdbm.info ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \ ++ $(DESTDIR)$(includedir) $(DESTDIR)$(man3dir) \ ++ $(DESTDIR)$(infodir) ++ $(LIBTOOL) $(INSTALL) -c libgdbm.la $(DESTDIR)$(libdir)/libgdbm.la ++ $(INSTALL_DATA) gdbm.h \ ++ $(DESTDIR)$(includedir)/gdbm.h ++ $(INSTALL_DATA) $(srcdir)/gdbm.3 \ ++ $(DESTDIR)$(man3dir)/gdbm.3 ++ $(INSTALL_DATA) $(srcdir)/gdbm.info \ ++ $(DESTDIR)$(infodir)/gdbm.info + + install-compat: +- $(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \ +- $(INSTALL_ROOT)$(includedir) ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \ ++ $(DESTDIR)$(includedir) + $(LIBTOOL) $(INSTALL) -c libgdbm_compat.la \ +- $(INSTALL_ROOT)$(libdir)/libgdbm_compat.la +- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/dbm.h \ +- $(INSTALL_ROOT)$(includedir)/dbm.h +- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/ndbm.h \ +- $(INSTALL_ROOT)$(includedir)/ndbm.h ++ $(DESTDIR)$(libdir)/libgdbm_compat.la ++ $(INSTALL_DATA) $(srcdir)/dbm.h \ ++ $(DESTDIR)$(includedir)/dbm.h ++ $(INSTALL_DATA) $(srcdir)/ndbm.h \ ++ $(DESTDIR)$(includedir)/ndbm.h + + #libgdbm.a: $(OBJS) gdbm.h + # rm -f libgdbm.a diff --git a/openembedded/packages/gdbm/gdbm-native-1.8.3/makefile.patch b/openembedded/packages/gdbm/gdbm-native-1.8.3/makefile.patch new file mode 100644 index 0000000000..5350c53729 --- /dev/null +++ b/openembedded/packages/gdbm/gdbm-native-1.8.3/makefile.patch @@ -0,0 +1,59 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- gdbm-1.8.3/Makefile.in~makefile ++++ gdbm-1.8.3/Makefile.in +@@ -22,6 +22,7 @@ + TEXI2DVI = texi2dvi + + DEFS = ++DESTDIR = + + # Where the system [n]dbm routines are... + LIBS = @LIBS@ -lc +@@ -127,26 +128,26 @@ + progs: $(PROGS) + + install: libgdbm.la gdbm.h gdbm.info +- $(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \ +- $(INSTALL_ROOT)$(includedir) $(INSTALL_ROOT)$(man3dir) \ +- $(INSTALL_ROOT)$(infodir) +- $(LIBTOOL) $(INSTALL) -c libgdbm.la $(INSTALL_ROOT)$(libdir)/libgdbm.la +- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) gdbm.h \ +- $(INSTALL_ROOT)$(includedir)/gdbm.h +- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/gdbm.3 \ +- $(INSTALL_ROOT)$(man3dir)/gdbm.3 +- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/gdbm.info \ +- $(INSTALL_ROOT)$(infodir)/gdbm.info ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \ ++ $(DESTDIR)$(includedir) $(DESTDIR)$(man3dir) \ ++ $(DESTDIR)$(infodir) ++ $(LIBTOOL) $(INSTALL) -c libgdbm.la $(DESTDIR)$(libdir)/libgdbm.la ++ $(INSTALL_DATA) gdbm.h \ ++ $(DESTDIR)$(includedir)/gdbm.h ++ $(INSTALL_DATA) $(srcdir)/gdbm.3 \ ++ $(DESTDIR)$(man3dir)/gdbm.3 ++ $(INSTALL_DATA) $(srcdir)/gdbm.info \ ++ $(DESTDIR)$(infodir)/gdbm.info + + install-compat: +- $(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \ +- $(INSTALL_ROOT)$(includedir) ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \ ++ $(DESTDIR)$(includedir) + $(LIBTOOL) $(INSTALL) -c libgdbm_compat.la \ +- $(INSTALL_ROOT)$(libdir)/libgdbm_compat.la +- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/dbm.h \ +- $(INSTALL_ROOT)$(includedir)/dbm.h +- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/ndbm.h \ +- $(INSTALL_ROOT)$(includedir)/ndbm.h ++ $(DESTDIR)$(libdir)/libgdbm_compat.la ++ $(INSTALL_DATA) $(srcdir)/dbm.h \ ++ $(DESTDIR)$(includedir)/dbm.h ++ $(INSTALL_DATA) $(srcdir)/ndbm.h \ ++ $(DESTDIR)$(includedir)/ndbm.h + + #libgdbm.a: $(OBJS) gdbm.h + # rm -f libgdbm.a diff --git a/openembedded/packages/gdbm/gdbm-native_1.8.3.bb b/openembedded/packages/gdbm/gdbm-native_1.8.3.bb new file mode 100644 index 0000000000..3c99b28857 --- /dev/null +++ b/openembedded/packages/gdbm/gdbm-native_1.8.3.bb @@ -0,0 +1,16 @@ +DESCRIPTION = "GNU dbm is a set of database routines that use extensible hashing." +HOMEPAGE = "http://www.gnu.org/software/gdbm/gdbm.html" +SECTION = "libs" +PRIORITY = "optional" +LICENSE = "GPL" + +SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \ + file://makefile.patch;patch=1" +S = "${WORKDIR}/gdbm-${PV}" + +inherit autotools native + +do_stage () { + oe_libinstall -so -a libgdbm ${STAGING_LIBDIR} + install -m 0644 ${S}/gdbm.h ${STAGING_INCDIR}/ +} diff --git a/openembedded/packages/gdbm/gdbm_1.8.3.bb b/openembedded/packages/gdbm/gdbm_1.8.3.bb new file mode 100644 index 0000000000..650a3079e7 --- /dev/null +++ b/openembedded/packages/gdbm/gdbm_1.8.3.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "GNU dbm is a set of database routines that use extensible hashing." +HOMEPAGE = "http://www.gnu.org/software/gdbm/gdbm.html" +SECTION = "libs" +PRIORITY = "optional" +LICENSE = "GPL" + +SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \ + file://makefile.patch;patch=1" + +inherit autotools + +do_stage () { + oe_libinstall -so -a libgdbm ${STAGING_LIBDIR} + install -m 0644 ${S}/gdbm.h ${STAGING_INCDIR}/ +} diff --git a/openembedded/packages/gettext/gettext-0.14.1/fixchicken.patch b/openembedded/packages/gettext/gettext-0.14.1/fixchicken.patch new file mode 100644 index 0000000000..4174f6d747 --- /dev/null +++ b/openembedded/packages/gettext/gettext-0.14.1/fixchicken.patch @@ -0,0 +1,26 @@ +Index: gettext-tools/m4/csharpcomp.m4 +=================================================================== +RCS file: /cvs/gettext/gettext/gettext-tools/m4/csharpcomp.m4,v +retrieving revision 1.4 +retrieving revision 1.6 +diff -u -r1.4 -r1.6 +--- a/gettext-tools/m4/csharpcomp.m4 30 Jan 2004 11:01:18 -0000 1.4 ++++ a/gettext-tools/m4/csharpcomp.m4 26 May 2004 12:15:23 -0000 1.6 +@@ -1,4 +1,4 @@ +-# csharpcomp.m4 serial 2 (gettext-0.14.1) ++# csharpcomp.m4 serial 4 (gettext-0.15) + dnl Copyright (C) 2003-2004 Free Software Foundation, Inc. + dnl This file is free software, distributed under the terms of the GNU + dnl General Public License. As a special exception to the GNU General +@@ -43,7 +43,8 @@ + ;; + sscli) + if test -n "$HAVE_CSC_IN_PATH" \ +- && csc -help >/dev/null 2>/dev/null; then ++ && csc -help >/dev/null 2>/dev/null \ ++ && { if csc -help 2>/dev/null | grep -i chicken > /dev/null; then false; else true; fi; }; then + HAVE_CSC=1 + ac_result="csc" + break + + diff --git a/openembedded/packages/gettext/gettext-0.14.1/gettext-vpath.patch b/openembedded/packages/gettext/gettext-0.14.1/gettext-vpath.patch new file mode 100644 index 0000000000..8251ac0e73 --- /dev/null +++ b/openembedded/packages/gettext/gettext-0.14.1/gettext-vpath.patch @@ -0,0 +1,11 @@ +--- gettext-0.14.1/gettext-runtime/intl/Makefile.in~ 2004-04-09 13:23:40.000000000 +0100 ++++ gettext-0.14.1/gettext-runtime/intl/Makefile.in 2004-04-09 13:22:05.000000000 +0100 +@@ -24,7 +24,7 @@ + srcdir = $(top_srcdir)/../gettext-runtime/intl + top_srcdir = /var/tmp/oe-tmp.pb/base/gettext-0.14.1-r0/gettext-0.14.1/gettext-tools + top_builddir = .. +-VPATH = $(srcdir) ++#VPATH = $(srcdir) + + prefix = /usr + exec_prefix = /usr diff --git a/openembedded/packages/gettext/gettext-native_0.14.1.bb b/openembedded/packages/gettext/gettext-native_0.14.1.bb new file mode 100644 index 0000000000..07c9361a19 --- /dev/null +++ b/openembedded/packages/gettext/gettext-native_0.14.1.bb @@ -0,0 +1,53 @@ +include gettext_${PV}.bb +S = "${WORKDIR}/gettext-${PV}" +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gettext-${PV}" +inherit native +PROVIDES = "" + +M4 = "\ +lib-ld.m4 \ +lib-link.m4 \ +lib-prefix.m4 \ +codeset.m4 \ +gettext.m4 \ +glibc21.m4 \ +iconv.m4 \ +intdiv0.m4 \ +intmax.m4 \ +inttypes.m4 \ +inttypes_h.m4 \ +inttypes-pri.m4 \ +isc-posix.m4 \ +lcmessage.m4 \ +longdouble.m4 \ +longlong.m4 \ +nls.m4 \ +po.m4 \ +printf-posix.m4 \ +progtest.m4 \ +signed.m4 \ +size_max.m4 \ +stdint_h.m4 \ +uintmax_t.m4 \ +ulonglong.m4 \ +wchar_t.m4 \ +wint_t.m4 \ +xsize.m4 \ +" + +do_stage_append() { + for i in ${M4}; do + src="gettext-runtime/m4/$i" + if [ ! -f $src ]; then + src="gettext-tools/m4/$i" + fi + if [ ! -f $src ]; then + src="autoconf-lib-link/m4/$i" + fi + if [ ! -f $src ]; then + echo "can't find $i" >&2 + exit 1 + fi + install -m 0644 $src ${STAGING_DATADIR}/aclocal/$i + done +} diff --git a/openembedded/packages/gettext/gettext_0.14.1.bb b/openembedded/packages/gettext/gettext_0.14.1.bb new file mode 100644 index 0000000000..9e2222aa0e --- /dev/null +++ b/openembedded/packages/gettext/gettext_0.14.1.bb @@ -0,0 +1,33 @@ +DESCRIPTION = "The GNU internationalization library." +HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html" +SECTION = "libs" +LICENSE = "GPL" +PR = "r3" +PROVIDES = "virtual/libintl" + +SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \ + file://gettext-vpath.patch;patch=1;pnum=1 \ + file://fixchicken.patch;patch=1;pnum=1" + +PARALLEL_MAKE = "" + +inherit autotools + +EXTRA_OECONF += "--without-lisp" +acpaths = '-I ${S}/autoconf-lib-link/m4/ \ + -I ${S}/gettext-runtime/m4 \ + -I ${S}/gettext-tools/m4' + +do_configure_prepend() { + rm -f ${S}/config/m4/libtool.m4 + install -m 0644 ${STAGING_DATADIR}/aclocal/libtool.m4 ${S}/config/m4/ +} + +do_stage () { + autotools_stage_includes + oe_libinstall -so -C gettext-tools/lib libgettextlib ${STAGING_LIBDIR}/ + oe_libinstall -so -C gettext-tools/src libgettextpo ${STAGING_LIBDIR}/ + oe_libinstall -so -C gettext-tools/src libgettextsrc ${STAGING_LIBDIR}/ + oe_libinstall -so -C gettext-tools/intl libintl ${STAGING_LIBDIR}/ + oe_libinstall -so -C gettext-runtime/lib libasprintf ${STAGING_LIBDIR}/ +} diff --git a/openembedded/packages/glib-2.0/files/glib-gettextize-dir.patch b/openembedded/packages/glib-2.0/files/glib-gettextize-dir.patch new file mode 100644 index 0000000000..989211c927 --- /dev/null +++ b/openembedded/packages/glib-2.0/files/glib-gettextize-dir.patch @@ -0,0 +1,11 @@ +--- glib-2.6.2/glib-gettextize.in.old 2005-02-15 02:43:17.000000000 +0000 ++++ glib-2.6.2/glib-gettextize.in 2005-02-15 02:43:18.000000000 +0000 +@@ -43,7 +43,7 @@ + + # Directory where the sources are stored. + prefix=@prefix@ +-gettext_dir=@prefix@/share/glib-2.0/gettext ++gettext_dir=@datadir@/glib-2.0/gettext + + while test $# -gt 0; do + case "$1" in diff --git a/openembedded/packages/glib-2.0/files/glibconfig-sysdefs.h b/openembedded/packages/glib-2.0/files/glibconfig-sysdefs.h new file mode 100644 index 0000000000..1329e7f21c --- /dev/null +++ b/openembedded/packages/glib-2.0/files/glibconfig-sysdefs.h @@ -0,0 +1,6 @@ +#define GLIB_SYSDEF_POLLIN =1 +#define GLIB_SYSDEF_POLLOUT =4 +#define GLIB_SYSDEF_POLLPRI =2 +#define GLIB_SYSDEF_POLLERR =8 +#define GLIB_SYSDEF_POLLHUP =16 +#define GLIB_SYSDEF_POLLNVAL =32 diff --git a/openembedded/packages/glib-2.0/files/glibinclude.patch b/openembedded/packages/glib-2.0/files/glibinclude.patch new file mode 100644 index 0000000000..5413e50e00 --- /dev/null +++ b/openembedded/packages/glib-2.0/files/glibinclude.patch @@ -0,0 +1,18 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- glib-2.0-2.4.6-r1/glib-2.4.6/glib/Makefile.am~glibinclude.patch ++++ glib-2.0-2.4.6-r1/glib-2.4.6/glib/Makefile.am +@@ -157,8 +157,8 @@ + gprintf.h + + install-data-local: install-ms-lib install-libtool-import-lib +- @if test -f $(glibincludedir)/glist.h ; then \ +- echo "*** Old headers found in $(glibincludedir). You should remove the" ; \ ++ @if test -f $(DESTDIR)$(glibincludedir)/glist.h ; then \ ++ echo "*** Old headers found in $(DESTDIR)$(glibincludedir). You should remove the" ; \ + echo "*** contents of this directory and type 'make install' again." ; \ + false ; \ + fi diff --git a/openembedded/packages/glib-2.0/files/gtk-doc.patch b/openembedded/packages/glib-2.0/files/gtk-doc.patch new file mode 100644 index 0000000000..4b9c234e21 --- /dev/null +++ b/openembedded/packages/glib-2.0/files/gtk-doc.patch @@ -0,0 +1,59 @@ +--- glib/acinclude.m4 2004-05-08 11:14:46.000000000 +0100 ++++ glib/acinclude.m4 2004-05-08 11:14:55.000000000 +0100 +@@ -446,3 +446,56 @@ + ]) + + ++dnl -*- mode: autoconf -*- ++ ++# serial 1 ++ ++dnl Usage: ++dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) ++AC_DEFUN([GTK_DOC_CHECK], ++[ ++ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first ++ AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first ++ dnl for overriding the documentation installation directory ++ AC_ARG_WITH(html-dir, ++ AC_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, ++ [with_html_dir='${datadir}/gtk-doc/html']) ++ HTML_DIR="$with_html_dir" ++ AC_SUBST(HTML_DIR) ++ ++ dnl enable/disable documentation building ++ AC_ARG_ENABLE(gtk-doc, ++ AC_HELP_STRING([--enable-gtk-doc], ++ [use gtk-doc to build documentation [default=no]]),, ++ enable_gtk_doc=no) ++ ++ have_gtk_doc=no ++ if test -z "$PKG_CONFIG"; then ++ AC_PATH_PROG(PKG_CONFIG, pkg-config, no) ++ fi ++ if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists gtk-doc; then ++ have_gtk_doc=yes ++ fi ++ ++ dnl do we want to do a version check? ++ifelse([$1],[],, ++ [gtk_doc_min_version=$1 ++ if test "$have_gtk_doc" = yes; then ++ AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version]) ++ if $PKG_CONFIG --atleast-version $gtk_doc_min_version gtk-doc; then ++ AC_MSG_RESULT(yes) ++ else ++ AC_MSG_RESULT(no) ++ have_gtk_doc=no ++ fi ++ fi ++]) ++ if test x$enable_gtk_doc = xyes; then ++ if test "$have_gtk_doc" != yes; then ++ enable_gtk_doc=no ++ fi ++ fi ++ ++ AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes) ++ AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL") ++]) diff --git a/openembedded/packages/glib-2.0/files/visibility.patch b/openembedded/packages/glib-2.0/files/visibility.patch new file mode 100644 index 0000000000..7cea8b037b --- /dev/null +++ b/openembedded/packages/glib-2.0/files/visibility.patch @@ -0,0 +1,6123 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- glib-2.4.6/glib/garray.h~visibility.patch ++++ glib-2.4.6/glib/garray.h +@@ -63,102 +63,102 @@ + #define g_array_insert_val(a,i,v) g_array_insert_vals (a, i, &(v), 1) + #define g_array_index(a,t,i) (((t*) (a)->data) [(i)]) + +-GArray* g_array_new (gboolean zero_terminated, ++GLIB_FUNC GArray* g_array_new (gboolean zero_terminated, + gboolean clear_, +- guint element_size); +-GArray* g_array_sized_new (gboolean zero_terminated, ++ guint element_size);; ++GLIB_FUNC GArray* g_array_sized_new (gboolean zero_terminated, + gboolean clear_, + guint element_size, +- guint reserved_size); +-gchar* g_array_free (GArray *array, +- gboolean free_segment); +-GArray* g_array_append_vals (GArray *array, ++ guint reserved_size);; ++GLIB_FUNC gchar* g_array_free (GArray *array, ++ gboolean free_segment);; ++GLIB_FUNC GArray* g_array_append_vals (GArray *array, + gconstpointer data, +- guint len); +-GArray* g_array_prepend_vals (GArray *array, ++ guint len);; ++GLIB_FUNC GArray* g_array_prepend_vals (GArray *array, + gconstpointer data, +- guint len); +-GArray* g_array_insert_vals (GArray *array, ++ guint len);; ++GLIB_FUNC GArray* g_array_insert_vals (GArray *array, + guint index_, + gconstpointer data, +- guint len); +-GArray* g_array_set_size (GArray *array, +- guint length); +-GArray* g_array_remove_index (GArray *array, +- guint index_); +-GArray* g_array_remove_index_fast (GArray *array, +- guint index_); +-GArray* g_array_remove_range (GArray *array, ++ guint len);; ++GLIB_FUNC GArray* g_array_set_size (GArray *array, ++ guint length);; ++GLIB_FUNC GArray* g_array_remove_index (GArray *array, ++ guint index_);; ++GLIB_FUNC GArray* g_array_remove_index_fast (GArray *array, ++ guint index_);; ++GLIB_FUNC GArray* g_array_remove_range (GArray *array, + guint index_, +- guint length); +-void g_array_sort (GArray *array, +- GCompareFunc compare_func); +-void g_array_sort_with_data (GArray *array, ++ guint length);; ++GLIB_FUNC void g_array_sort (GArray *array, ++ GCompareFunc compare_func);; ++GLIB_FUNC void g_array_sort_with_data (GArray *array, + GCompareDataFunc compare_func, +- gpointer user_data); ++ gpointer user_data);; + + /* Resizable pointer array. This interface is much less complicated + * than the above. Add appends a pointer. Remove fills any cleared + * spot and shortens the array. remove_fast will again distort order. + */ + #define g_ptr_array_index(array,index_) ((array)->pdata)[index_] +-GPtrArray* g_ptr_array_new (void); +-GPtrArray* g_ptr_array_sized_new (guint reserved_size); +-gpointer* g_ptr_array_free (GPtrArray *array, +- gboolean free_seg); +-void g_ptr_array_set_size (GPtrArray *array, +- gint length); +-gpointer g_ptr_array_remove_index (GPtrArray *array, +- guint index_); +-gpointer g_ptr_array_remove_index_fast (GPtrArray *array, +- guint index_); +-gboolean g_ptr_array_remove (GPtrArray *array, +- gpointer data); +-gboolean g_ptr_array_remove_fast (GPtrArray *array, +- gpointer data); +-void g_ptr_array_remove_range (GPtrArray *array, ++GLIB_FUNC GPtrArray* g_ptr_array_new (void); ++GLIB_FUNC GPtrArray* g_ptr_array_sized_new (guint reserved_size); ++GLIB_FUNC gpointer* g_ptr_array_free (GPtrArray *array, ++ gboolean free_seg);; ++GLIB_FUNC void g_ptr_array_set_size (GPtrArray *array, ++ gint length);; ++GLIB_FUNC gpointer g_ptr_array_remove_index (GPtrArray *array, ++ guint index_);; ++GLIB_FUNC gpointer g_ptr_array_remove_index_fast (GPtrArray *array, ++ guint index_);; ++GLIB_FUNC gboolean g_ptr_array_remove (GPtrArray *array, ++ gpointer data);; ++GLIB_FUNC gboolean g_ptr_array_remove_fast (GPtrArray *array, ++ gpointer data);; ++GLIB_FUNC void g_ptr_array_remove_range (GPtrArray *array, + guint index_, +- guint length); +-void g_ptr_array_add (GPtrArray *array, +- gpointer data); +-void g_ptr_array_sort (GPtrArray *array, +- GCompareFunc compare_func); +-void g_ptr_array_sort_with_data (GPtrArray *array, ++ guint length);; ++GLIB_FUNC void g_ptr_array_add (GPtrArray *array, ++ gpointer data);; ++GLIB_FUNC void g_ptr_array_sort (GPtrArray *array, ++ GCompareFunc compare_func);; ++GLIB_FUNC void g_ptr_array_sort_with_data (GPtrArray *array, + GCompareDataFunc compare_func, +- gpointer user_data); +-void g_ptr_array_foreach (GPtrArray *array, ++ gpointer user_data);; ++GLIB_FUNC void g_ptr_array_foreach (GPtrArray *array, + GFunc func, +- gpointer user_data); ++ gpointer user_data);; + + + /* Byte arrays, an array of guint8. Implemented as a GArray, + * but type-safe. + */ + +-GByteArray* g_byte_array_new (void); +-GByteArray* g_byte_array_sized_new (guint reserved_size); +-guint8* g_byte_array_free (GByteArray *array, +- gboolean free_segment); +-GByteArray* g_byte_array_append (GByteArray *array, ++GLIB_FUNC GByteArray* g_byte_array_new (void); ++GLIB_FUNC GByteArray* g_byte_array_sized_new (guint reserved_size); ++GLIB_FUNC guint8* g_byte_array_free (GByteArray *array, ++ gboolean free_segment);; ++GLIB_FUNC GByteArray* g_byte_array_append (GByteArray *array, + const guint8 *data, +- guint len); +-GByteArray* g_byte_array_prepend (GByteArray *array, ++ guint len);; ++GLIB_FUNC GByteArray* g_byte_array_prepend (GByteArray *array, + const guint8 *data, +- guint len); +-GByteArray* g_byte_array_set_size (GByteArray *array, +- guint length); +-GByteArray* g_byte_array_remove_index (GByteArray *array, +- guint index_); +-GByteArray* g_byte_array_remove_index_fast (GByteArray *array, +- guint index_); +-GByteArray* g_byte_array_remove_range (GByteArray *array, ++ guint len);; ++GLIB_FUNC GByteArray* g_byte_array_set_size (GByteArray *array, ++ guint length);; ++GLIB_FUNC GByteArray* g_byte_array_remove_index (GByteArray *array, ++ guint index_);; ++GLIB_FUNC GByteArray* g_byte_array_remove_index_fast (GByteArray *array, ++ guint index_);; ++GLIB_FUNC GByteArray* g_byte_array_remove_range (GByteArray *array, + guint index_, +- guint length); +-void g_byte_array_sort (GByteArray *array, +- GCompareFunc compare_func); +-void g_byte_array_sort_with_data (GByteArray *array, ++ guint length);; ++GLIB_FUNC void g_byte_array_sort (GByteArray *array, ++ GCompareFunc compare_func);; ++GLIB_FUNC void g_byte_array_sort_with_data (GByteArray *array, + GCompareDataFunc compare_func, +- gpointer user_data); ++ gpointer user_data);; + + + G_END_DECLS +--- glib-2.4.6/glib/gasyncqueue.h~visibility.patch ++++ glib-2.4.6/glib/gasyncqueue.h +@@ -37,45 +37,45 @@ + */ + + /* Get a new GAsyncQueue with the ref_count 1 */ +-GAsyncQueue* g_async_queue_new (void); ++GLIB_FUNC GAsyncQueue* g_async_queue_new (void); + + /* Lock and unlock a GAsyncQueue. All functions lock the queue for + * themselves, but in certain cirumstances you want to hold the lock longer, + * thus you lock the queue, call the *_unlocked functions and unlock it again. + */ +-void g_async_queue_lock (GAsyncQueue *queue); +-void g_async_queue_unlock (GAsyncQueue *queue); ++GLIB_FUNC void g_async_queue_lock (GAsyncQueue *queue); ++GLIB_FUNC void g_async_queue_unlock (GAsyncQueue *queue); + + /* Ref and unref the GAsyncQueue. */ +-void g_async_queue_ref (GAsyncQueue *queue); +-void g_async_queue_unref (GAsyncQueue *queue); ++GLIB_FUNC void g_async_queue_ref (GAsyncQueue *queue); ++GLIB_FUNC void g_async_queue_unref (GAsyncQueue *queue); + #ifndef G_DISABLE_DEPRECATED + /* You don't have to hold the lock for calling *_ref and *_unref anymore. */ +-void g_async_queue_ref_unlocked (GAsyncQueue *queue); +-void g_async_queue_unref_and_unlock (GAsyncQueue *queue); ++GLIB_FUNC void g_async_queue_ref_unlocked (GAsyncQueue *queue); ++GLIB_FUNC void g_async_queue_unref_and_unlock (GAsyncQueue *queue); + #endif /* !G_DISABLE_DEPRECATED */ + + /* Push data into the async queue. Must not be NULL. */ +-void g_async_queue_push (GAsyncQueue *queue, +- gpointer data); +-void g_async_queue_push_unlocked (GAsyncQueue *queue, +- gpointer data); ++GLIB_FUNC void g_async_queue_push (GAsyncQueue *queue, ++ gpointer data);; ++GLIB_FUNC void g_async_queue_push_unlocked (GAsyncQueue *queue, ++ gpointer data);; + + /* Pop data from the async queue. When no data is there, the thread is blocked + * until data arrives. */ +-gpointer g_async_queue_pop (GAsyncQueue *queue); +-gpointer g_async_queue_pop_unlocked (GAsyncQueue *queue); ++GLIB_FUNC gpointer g_async_queue_pop (GAsyncQueue *queue); ++GLIB_FUNC gpointer g_async_queue_pop_unlocked (GAsyncQueue *queue); + + /* Try to pop data. NULL is returned in case of empty queue. */ +-gpointer g_async_queue_try_pop (GAsyncQueue *queue); +-gpointer g_async_queue_try_pop_unlocked (GAsyncQueue *queue); ++GLIB_FUNC gpointer g_async_queue_try_pop (GAsyncQueue *queue); ++GLIB_FUNC gpointer g_async_queue_try_pop_unlocked (GAsyncQueue *queue); + + /* Wait for data until at maximum until end_time is reached. NULL is returned + * in case of empty queue. */ +-gpointer g_async_queue_timed_pop (GAsyncQueue *queue, +- GTimeVal *end_time); +-gpointer g_async_queue_timed_pop_unlocked (GAsyncQueue *queue, +- GTimeVal *end_time); ++GLIB_FUNC gpointer g_async_queue_timed_pop (GAsyncQueue *queue, ++ GTimeVal *end_time);; ++GLIB_FUNC gpointer g_async_queue_timed_pop_unlocked (GAsyncQueue *queue, ++ GTimeVal *end_time);; + + /* Return the length of the queue. Negative values mean that threads + * are waiting, positve values mean that there are entries in the +@@ -83,8 +83,8 @@ + * the number of waiting threads, g_async_queue_length == 0 could also + * mean 'n' entries in the queue and 'n' thread waiting. Such can + * happen due to locking of the queue or due to scheduling. */ +-gint g_async_queue_length (GAsyncQueue *queue); +-gint g_async_queue_length_unlocked (GAsyncQueue *queue); ++GLIB_FUNC gint g_async_queue_length (GAsyncQueue *queue); ++GLIB_FUNC gint g_async_queue_length_unlocked (GAsyncQueue *queue); + + G_END_DECLS + +--- glib-2.4.6/glib/gatomic.h~visibility.patch ++++ glib-2.4.6/glib/gatomic.h +@@ -34,20 +34,20 @@ + + G_BEGIN_DECLS + +-gint g_atomic_int_exchange_and_add (gint *atomic, +- gint val); +-void g_atomic_int_add (gint *atomic, +- gint val); +-gboolean g_atomic_int_compare_and_exchange (gint *atomic, ++GLIB_FUNC gint g_atomic_int_exchange_and_add (gint *atomic, ++ gint val);; ++GLIB_FUNC void g_atomic_int_add (gint *atomic, ++ gint val);; ++GLIB_FUNC gboolean g_atomic_int_compare_and_exchange (gint *atomic, + gint oldval, +- gint newval); +-gboolean g_atomic_pointer_compare_and_exchange (gpointer *atomic, ++ gint newval);; ++GLIB_FUNC gboolean g_atomic_pointer_compare_and_exchange (gpointer *atomic, + gpointer oldval, +- gpointer newval); ++ gpointer newval);; + + #ifdef G_ATOMIC_OP_MEMORY_BARRIER_NEEDED +-gint g_atomic_int_get (gint *atomic); +-gpointer g_atomic_pointer_get (gpointer *atomic); ++GLIB_FUNC gint g_atomic_int_get (gint *atomic); ++GLIB_FUNC gpointer g_atomic_pointer_get (gpointer *atomic); + #else /* !G_ATOMIC_OP_MEMORY_BARRIER_NEEDED */ + # define g_atomic_int_get(atomic) (*(atomic)) + # define g_atomic_pointer_get(atomic) (*(atomic)) +--- glib-2.4.6/glib/gbacktrace.h~visibility.patch ++++ glib-2.4.6/glib/gbacktrace.h +@@ -40,8 +40,8 @@ + * The prg_name arg is required by gdb to find the executable, if it is + * passed as NULL, g_on_error_query() will try g_get_prgname(). + */ +-void g_on_error_query (const gchar *prg_name); +-void g_on_error_stack_trace (const gchar *prg_name); ++GLIB_FUNC void g_on_error_query (const gchar *prg_name); ++GLIB_FUNC void g_on_error_stack_trace (const gchar *prg_name); + + /* Hacker macro to place breakpoints for selected machines. + * Actual use is strongly discouraged of course ;) +--- glib-2.4.6/glib/gcache.h~visibility.patch ++++ glib-2.4.6/glib/gcache.h +@@ -39,24 +39,24 @@ + + /* Caches + */ +-GCache* g_cache_new (GCacheNewFunc value_new_func, ++GLIB_FUNC GCache* g_cache_new (GCacheNewFunc value_new_func, + GCacheDestroyFunc value_destroy_func, + GCacheDupFunc key_dup_func, + GCacheDestroyFunc key_destroy_func, + GHashFunc hash_key_func, + GHashFunc hash_value_func, +- GEqualFunc key_equal_func); +-void g_cache_destroy (GCache *cache); +-gpointer g_cache_insert (GCache *cache, +- gpointer key); +-void g_cache_remove (GCache *cache, +- gconstpointer value); +-void g_cache_key_foreach (GCache *cache, ++ GEqualFunc key_equal_func);; ++GLIB_FUNC void g_cache_destroy (GCache *cache); ++GLIB_FUNC gpointer g_cache_insert (GCache *cache, ++ gpointer key);; ++GLIB_FUNC void g_cache_remove (GCache *cache, ++ gconstpointer value);; ++GLIB_FUNC void g_cache_key_foreach (GCache *cache, + GHFunc func, +- gpointer user_data); +-void g_cache_value_foreach (GCache *cache, ++ gpointer user_data);; ++GLIB_FUNC void g_cache_value_foreach (GCache *cache, + GHFunc func, +- gpointer user_data); ++ gpointer user_data);; + + G_END_DECLS + +--- glib-2.4.6/glib/gcompletion.h~visibility.patch ++++ glib-2.4.6/glib/gcompletion.h +@@ -52,21 +52,21 @@ + GCompletionStrncmpFunc strncmp_func; + }; + +-GCompletion* g_completion_new (GCompletionFunc func); +-void g_completion_add_items (GCompletion* cmp, +- GList* items); +-void g_completion_remove_items (GCompletion* cmp, +- GList* items); +-void g_completion_clear_items (GCompletion* cmp); +-GList* g_completion_complete (GCompletion* cmp, ++GLIB_FUNC GCompletion* g_completion_new (GCompletionFunc func); ++GLIB_FUNC void g_completion_add_items (GCompletion* cmp, ++ GList* items);; ++GLIB_FUNC void g_completion_remove_items (GCompletion* cmp, ++ GList* items);; ++GLIB_FUNC void g_completion_clear_items (GCompletion* cmp); ++GLIB_FUNC GList* g_completion_complete (GCompletion* cmp, + const gchar* prefix, +- gchar** new_prefix); +-GList* g_completion_complete_utf8 (GCompletion *cmp, ++ gchar** new_prefix);; ++GLIB_FUNC GList* g_completion_complete_utf8 (GCompletion *cmp, + const gchar* prefix, +- gchar** new_prefix); +-void g_completion_set_compare (GCompletion *cmp, +- GCompletionStrncmpFunc strncmp_func); +-void g_completion_free (GCompletion* cmp); ++ gchar** new_prefix);; ++GLIB_FUNC void g_completion_set_compare (GCompletion *cmp, ++ GCompletionStrncmpFunc strncmp_func);; ++GLIB_FUNC void g_completion_free (GCompletion* cmp); + + G_END_DECLS + +--- glib-2.4.6/glib/gconvert.h~visibility.patch ++++ glib-2.4.6/glib/gconvert.h +@@ -43,79 +43,79 @@ + } GConvertError; + + #define G_CONVERT_ERROR g_convert_error_quark() +-GQuark g_convert_error_quark (void); ++GLIB_FUNC GQuark g_convert_error_quark (void); + + /* Thin wrappers around iconv + */ + typedef struct _GIConv *GIConv; + +-GIConv g_iconv_open (const gchar *to_codeset, +- const gchar *from_codeset); +-size_t g_iconv (GIConv converter, ++GLIB_FUNC GIConv g_iconv_open (const gchar *to_codeset, ++ const gchar *from_codeset);; ++GLIB_FUNC size_t g_iconv (GIConv converter, + gchar **inbuf, + gsize *inbytes_left, + gchar **outbuf, +- gsize *outbytes_left); +-gint g_iconv_close (GIConv converter); ++ gsize *outbytes_left);; ++GLIB_FUNC gint g_iconv_close (GIConv converter); + + +-gchar* g_convert (const gchar *str, ++GLIB_FUNC gchar* g_convert (const gchar *str, + gssize len, + const gchar *to_codeset, + const gchar *from_codeset, + gsize *bytes_read, + gsize *bytes_written, +- GError **error); +-gchar* g_convert_with_iconv (const gchar *str, ++ GError **error);; ++GLIB_FUNC gchar* g_convert_with_iconv (const gchar *str, + gssize len, + GIConv converter, + gsize *bytes_read, + gsize *bytes_written, +- GError **error); +-gchar* g_convert_with_fallback (const gchar *str, ++ GError **error);; ++GLIB_FUNC gchar* g_convert_with_fallback (const gchar *str, + gssize len, + const gchar *to_codeset, + const gchar *from_codeset, + gchar *fallback, + gsize *bytes_read, + gsize *bytes_written, +- GError **error); ++ GError **error);; + + + /* Convert between libc's idea of strings and UTF-8. + */ +-gchar* g_locale_to_utf8 (const gchar *opsysstring, ++GLIB_FUNC gchar* g_locale_to_utf8 (const gchar *opsysstring, + gssize len, + gsize *bytes_read, + gsize *bytes_written, +- GError **error); +-gchar* g_locale_from_utf8 (const gchar *utf8string, ++ GError **error);; ++GLIB_FUNC gchar* g_locale_from_utf8 (const gchar *utf8string, + gssize len, + gsize *bytes_read, + gsize *bytes_written, +- GError **error); ++ GError **error);; + + /* Convert between the operating system (or C runtime) + * representation of file names and UTF-8. + */ +-gchar* g_filename_to_utf8 (const gchar *opsysstring, ++GLIB_FUNC gchar* g_filename_to_utf8 (const gchar *opsysstring, + gssize len, + gsize *bytes_read, + gsize *bytes_written, +- GError **error); +-gchar* g_filename_from_utf8 (const gchar *utf8string, ++ GError **error);; ++GLIB_FUNC gchar* g_filename_from_utf8 (const gchar *utf8string, + gssize len, + gsize *bytes_read, + gsize *bytes_written, +- GError **error); ++ GError **error);; + +-gchar *g_filename_from_uri (const gchar *uri, ++GLIB_FUNC gchar *g_filename_from_uri (const gchar *uri, + gchar **hostname, +- GError **error); ++ GError **error);; + +-gchar *g_filename_to_uri (const gchar *filename, ++GLIB_FUNC gchar *g_filename_to_uri (const gchar *filename, + const gchar *hostname, +- GError **error); ++ GError **error);; + + + G_END_DECLS +--- glib-2.4.6/glib/gdataset.h~visibility.patch ++++ glib-2.4.6/glib/gdataset.h +@@ -39,19 +39,19 @@ + + /* Keyed Data List + */ +-void g_datalist_init (GData **datalist); +-void g_datalist_clear (GData **datalist); +-gpointer g_datalist_id_get_data (GData **datalist, +- GQuark key_id); +-void g_datalist_id_set_data_full (GData **datalist, ++GLIB_FUNC void g_datalist_init (GData **datalist); ++GLIB_FUNC void g_datalist_clear (GData **datalist); ++GLIB_FUNC gpointer g_datalist_id_get_data (GData **datalist, ++ GQuark key_id);; ++GLIB_FUNC void g_datalist_id_set_data_full (GData **datalist, + GQuark key_id, + gpointer data, +- GDestroyNotify destroy_func); +-gpointer g_datalist_id_remove_no_notify (GData **datalist, +- GQuark key_id); +-void g_datalist_foreach (GData **datalist, ++ GDestroyNotify destroy_func);; ++GLIB_FUNC gpointer g_datalist_id_remove_no_notify (GData **datalist, ++ GQuark key_id);; ++GLIB_FUNC void g_datalist_foreach (GData **datalist, + GDataForeachFunc func, +- gpointer user_data); ++ gpointer user_data);; + #define g_datalist_id_set_data(dl, q, d) \ + g_datalist_id_set_data_full ((dl), (q), (d), NULL) + #define g_datalist_id_remove_data(dl, q) \ +@@ -70,18 +70,18 @@ + + /* Location Associated Keyed Data + */ +-void g_dataset_destroy (gconstpointer dataset_location); +-gpointer g_dataset_id_get_data (gconstpointer dataset_location, +- GQuark key_id); +-void g_dataset_id_set_data_full (gconstpointer dataset_location, ++GLIB_FUNC void g_dataset_destroy (gconstpointer dataset_location); ++GLIB_FUNC gpointer g_dataset_id_get_data (gconstpointer dataset_location, ++ GQuark key_id);; ++GLIB_FUNC void g_dataset_id_set_data_full (gconstpointer dataset_location, + GQuark key_id, + gpointer data, +- GDestroyNotify destroy_func); +-gpointer g_dataset_id_remove_no_notify (gconstpointer dataset_location, +- GQuark key_id); +-void g_dataset_foreach (gconstpointer dataset_location, ++ GDestroyNotify destroy_func);; ++GLIB_FUNC gpointer g_dataset_id_remove_no_notify (gconstpointer dataset_location, ++ GQuark key_id);; ++GLIB_FUNC void g_dataset_foreach (gconstpointer dataset_location, + GDataForeachFunc func, +- gpointer user_data); ++ gpointer user_data);; + #define g_dataset_id_set_data(l, k, d) \ + g_dataset_id_set_data_full ((l), (k), (d), NULL) + #define g_dataset_id_remove_data(l, k) \ +--- glib-2.4.6/glib/gdate.h~visibility.patch ++++ glib-2.4.6/glib/gdate.h +@@ -114,121 +114,121 @@ + * to get a usable object. You can also allocate a GDate statically, + * then call g_date_clear() to initialize. + */ +-GDate* g_date_new (void); +-GDate* g_date_new_dmy (GDateDay day, ++GLIB_FUNC GDate* g_date_new (void); ++GLIB_FUNC GDate* g_date_new_dmy (GDateDay day, + GDateMonth month, +- GDateYear year); +-GDate* g_date_new_julian (guint32 julian_day); +-void g_date_free (GDate *date); ++ GDateYear year);; ++GLIB_FUNC GDate* g_date_new_julian (guint32 julian_day); ++GLIB_FUNC void g_date_free (GDate *date); + + /* check g_date_valid() after doing an operation that might fail, like + * _parse. Almost all g_date operations are undefined on invalid + * dates (the exceptions are the mutators, since you need those to + * return to validity). + */ +-gboolean g_date_valid (const GDate *date); +-gboolean g_date_valid_day (GDateDay day) G_GNUC_CONST; +-gboolean g_date_valid_month (GDateMonth month) G_GNUC_CONST; +-gboolean g_date_valid_year (GDateYear year) G_GNUC_CONST; +-gboolean g_date_valid_weekday (GDateWeekday weekday) G_GNUC_CONST; +-gboolean g_date_valid_julian (guint32 julian_date) G_GNUC_CONST; +-gboolean g_date_valid_dmy (GDateDay day, ++GLIB_FUNC gboolean g_date_valid (const GDate *date); ++GLIB_FUNC gboolean g_date_valid_day (GDateDay day) G_GNUC_CONST;; ++GLIB_FUNC gboolean g_date_valid_month (GDateMonth month) G_GNUC_CONST;; ++GLIB_FUNC gboolean g_date_valid_year (GDateYear year) G_GNUC_CONST;; ++GLIB_FUNC gboolean g_date_valid_weekday (GDateWeekday weekday) G_GNUC_CONST;; ++GLIB_FUNC gboolean g_date_valid_julian (guint32 julian_date) G_GNUC_CONST;; ++GLIB_FUNC gboolean g_date_valid_dmy (GDateDay day, + GDateMonth month, +- GDateYear year) G_GNUC_CONST; ++ GDateYear year) G_GNUC_CONST;; + +-GDateWeekday g_date_get_weekday (const GDate *date); +-GDateMonth g_date_get_month (const GDate *date); +-GDateYear g_date_get_year (const GDate *date); +-GDateDay g_date_get_day (const GDate *date); +-guint32 g_date_get_julian (const GDate *date); +-guint g_date_get_day_of_year (const GDate *date); ++GLIB_FUNC GDateWeekday g_date_get_weekday (const GDate *date); ++GLIB_FUNC GDateMonth g_date_get_month (const GDate *date); ++GLIB_FUNC GDateYear g_date_get_year (const GDate *date); ++GLIB_FUNC GDateDay g_date_get_day (const GDate *date); ++GLIB_FUNC guint32 g_date_get_julian (const GDate *date); ++GLIB_FUNC guint g_date_get_day_of_year (const GDate *date); + /* First monday/sunday is the start of week 1; if we haven't reached + * that day, return 0. These are not ISO weeks of the year; that + * routine needs to be added. + * these functions return the number of weeks, starting on the + * corrsponding day + */ +-guint g_date_get_monday_week_of_year (const GDate *date); +-guint g_date_get_sunday_week_of_year (const GDate *date); ++GLIB_FUNC guint g_date_get_monday_week_of_year (const GDate *date); ++GLIB_FUNC guint g_date_get_sunday_week_of_year (const GDate *date); + + /* If you create a static date struct you need to clear it to get it + * in a sane state before use. You can clear a whole array at + * once with the ndates argument. + */ +-void g_date_clear (GDate *date, +- guint n_dates); ++GLIB_FUNC void g_date_clear (GDate *date, ++ guint n_dates);; + + /* The parse routine is meant for dates typed in by a user, so it + * permits many formats but tries to catch common typos. If your data + * needs to be strictly validated, it is not an appropriate function. + */ +-void g_date_set_parse (GDate *date, +- const gchar *str); +-void g_date_set_time (GDate *date, +- GTime time_); +-void g_date_set_month (GDate *date, +- GDateMonth month); +-void g_date_set_day (GDate *date, +- GDateDay day); +-void g_date_set_year (GDate *date, +- GDateYear year); +-void g_date_set_dmy (GDate *date, ++GLIB_FUNC void g_date_set_parse (GDate *date, ++ const gchar *str);; ++GLIB_FUNC void g_date_set_time (GDate *date, ++ GTime time_);; ++GLIB_FUNC void g_date_set_month (GDate *date, ++ GDateMonth month);; ++GLIB_FUNC void g_date_set_day (GDate *date, ++ GDateDay day);; ++GLIB_FUNC void g_date_set_year (GDate *date, ++ GDateYear year);; ++GLIB_FUNC void g_date_set_dmy (GDate *date, + GDateDay day, + GDateMonth month, +- GDateYear y); +-void g_date_set_julian (GDate *date, +- guint32 julian_date); +-gboolean g_date_is_first_of_month (const GDate *date); +-gboolean g_date_is_last_of_month (const GDate *date); ++ GDateYear y);; ++GLIB_FUNC void g_date_set_julian (GDate *date, ++ guint32 julian_date);; ++GLIB_FUNC gboolean g_date_is_first_of_month (const GDate *date); ++GLIB_FUNC gboolean g_date_is_last_of_month (const GDate *date); + + /* To go forward by some number of weeks just go forward weeks*7 days */ +-void g_date_add_days (GDate *date, +- guint n_days); +-void g_date_subtract_days (GDate *date, +- guint n_days); ++GLIB_FUNC void g_date_add_days (GDate *date, ++ guint n_days);; ++GLIB_FUNC void g_date_subtract_days (GDate *date, ++ guint n_days);; + + /* If you add/sub months while day > 28, the day might change */ +-void g_date_add_months (GDate *date, +- guint n_months); +-void g_date_subtract_months (GDate *date, +- guint n_months); ++GLIB_FUNC void g_date_add_months (GDate *date, ++ guint n_months);; ++GLIB_FUNC void g_date_subtract_months (GDate *date, ++ guint n_months);; + + /* If it's feb 29, changing years can move you to the 28th */ +-void g_date_add_years (GDate *date, +- guint n_years); +-void g_date_subtract_years (GDate *date, +- guint n_years); +-gboolean g_date_is_leap_year (GDateYear year) G_GNUC_CONST; +-guint8 g_date_get_days_in_month (GDateMonth month, +- GDateYear year) G_GNUC_CONST; +-guint8 g_date_get_monday_weeks_in_year (GDateYear year) G_GNUC_CONST; +-guint8 g_date_get_sunday_weeks_in_year (GDateYear year) G_GNUC_CONST; ++GLIB_FUNC void g_date_add_years (GDate *date, ++ guint n_years);; ++GLIB_FUNC void g_date_subtract_years (GDate *date, ++ guint n_years);; ++GLIB_FUNC gboolean g_date_is_leap_year (GDateYear year) G_GNUC_CONST;; ++GLIB_FUNC guint8 g_date_get_days_in_month (GDateMonth month, ++ GDateYear year) G_GNUC_CONST;; ++GLIB_FUNC guint8 g_date_get_monday_weeks_in_year (GDateYear year) G_GNUC_CONST;; ++GLIB_FUNC guint8 g_date_get_sunday_weeks_in_year (GDateYear year) G_GNUC_CONST;; + + /* Returns the number of days between the two dates. If date2 comes + before date1, a negative value is return. */ +-gint g_date_days_between (const GDate *date1, +- const GDate *date2); ++GLIB_FUNC gint g_date_days_between (const GDate *date1, ++ const GDate *date2);; + + /* qsort-friendly (with a cast...) */ +-gint g_date_compare (const GDate *lhs, +- const GDate *rhs); +-void g_date_to_struct_tm (const GDate *date, +- struct tm *tm); ++GLIB_FUNC gint g_date_compare (const GDate *lhs, ++ const GDate *rhs);; ++GLIB_FUNC void g_date_to_struct_tm (const GDate *date, ++ struct tm *tm);; + +-void g_date_clamp (GDate *date, ++GLIB_FUNC void g_date_clamp (GDate *date, + const GDate *min_date, +- const GDate *max_date); ++ const GDate *max_date);; + + /* Swap date1 and date2's values if date1 > date2. */ +-void g_date_order (GDate *date1, GDate *date2); ++GLIB_FUNC void g_date_order (GDate *date1, GDate *date2); + + /* Just like strftime() except you can only use date-related formats. + * Using a time format is undefined. + */ +-gsize g_date_strftime (gchar *s, ++GLIB_FUNC gsize g_date_strftime (gchar *s, + gsize slen, + const gchar *format, +- const GDate *date); ++ const GDate *date);; + + #ifndef G_DISABLE_DEPRECATED + +--- glib-2.4.6/glib/gdir.h~visibility.patch ++++ glib-2.4.6/glib/gdir.h +@@ -29,12 +29,12 @@ + + typedef struct _GDir GDir; + +-GDir * g_dir_open (const gchar *path, ++GLIB_FUNC GDir * g_dir_open (const gchar *path, + guint flags, +- GError **error); +-G_CONST_RETURN gchar *g_dir_read_name (GDir *dir); +-void g_dir_rewind (GDir *dir); +-void g_dir_close (GDir *dir); ++ GError **error);; ++GLIB_FUNC G_CONST_RETURN gchar *g_dir_read_name (GDir *dir); ++GLIB_FUNC void g_dir_rewind (GDir *dir); ++GLIB_FUNC void g_dir_close (GDir *dir); + + G_END_DECLS + +--- glib-2.4.6/glib/gerror.h~visibility.patch ++++ glib-2.4.6/glib/gerror.h +@@ -34,38 +34,38 @@ + gchar *message; + }; + +-GError* g_error_new (GQuark domain, ++GLIB_FUNC GError* g_error_new (GQuark domain, + gint code, + const gchar *format, +- ...) G_GNUC_PRINTF (3, 4); ++ ...) G_GNUC_PRINTF (3, 4);; + +-GError* g_error_new_literal (GQuark domain, ++GLIB_FUNC GError* g_error_new_literal (GQuark domain, + gint code, +- const gchar *message); ++ const gchar *message);; + +-void g_error_free (GError *error); +-GError* g_error_copy (const GError *error); ++GLIB_FUNC void g_error_free (GError *error); ++GLIB_FUNC GError* g_error_copy (const GError *error); + +-gboolean g_error_matches (const GError *error, ++GLIB_FUNC gboolean g_error_matches (const GError *error, + GQuark domain, +- gint code); ++ gint code);; + + /* if (err) *err = g_error_new(domain, code, format, ...), also has + * some sanity checks. + */ +-void g_set_error (GError **err, ++GLIB_FUNC void g_set_error (GError **err, + GQuark domain, + gint code, + const gchar *format, +- ...) G_GNUC_PRINTF (4, 5); ++ ...) G_GNUC_PRINTF (4, 5);; + + /* if (dest) *dest = src; also has some sanity checks. + */ +-void g_propagate_error (GError **dest, +- GError *src); ++GLIB_FUNC void g_propagate_error (GError **dest, ++ GError *src);; + + /* if (err && *err) { g_error_free(*err); *err = NULL; } */ +-void g_clear_error (GError **err); ++GLIB_FUNC void g_clear_error (GError **err); + + + G_END_DECLS +--- glib-2.4.6/glib/gfileutils.h~visibility.patch ++++ glib-2.4.6/glib/gfileutils.h +@@ -68,32 +68,32 @@ + G_FILE_TEST_EXISTS = 1 << 4 + } GFileTest; + +-GQuark g_file_error_quark (void); ++GLIB_FUNC GQuark g_file_error_quark (void); + /* So other code can generate a GFileError */ +-GFileError g_file_error_from_errno (gint err_no); ++GLIB_FUNC GFileError g_file_error_from_errno (gint err_no); + +-gboolean g_file_test (const gchar *filename, +- GFileTest test); +-gboolean g_file_get_contents (const gchar *filename, ++GLIB_FUNC gboolean g_file_test (const gchar *filename, ++ GFileTest test);; ++GLIB_FUNC gboolean g_file_get_contents (const gchar *filename, + gchar **contents, + gsize *length, +- GError **error); +-gchar *g_file_read_link (const gchar *filename, +- GError **error); ++ GError **error);; ++GLIB_FUNC gchar *g_file_read_link (const gchar *filename, ++ GError **error);; + + /* Wrapper / workalike for mkstemp() */ +-gint g_mkstemp (gchar *tmpl); ++GLIB_FUNC gint g_mkstemp (gchar *tmpl); + + /* Wrapper for g_mkstemp */ +-gint g_file_open_tmp (const gchar *tmpl, ++GLIB_FUNC gint g_file_open_tmp (const gchar *tmpl, + gchar **name_used, +- GError **error); ++ GError **error);; + +-gchar *g_build_path (const gchar *separator, ++GLIB_FUNC gchar *g_build_path (const gchar *separator, + const gchar *first_element, +- ...); +-gchar *g_build_filename (const gchar *first_element, +- ...); ++ ...);; ++GLIB_FUNC gchar *g_build_filename (const gchar *first_element, ++ ...);; + + G_END_DECLS + +--- glib-2.4.6/glib/ghash.h~visibility.patch ++++ glib-2.4.6/glib/ghash.h +@@ -39,42 +39,42 @@ + + /* Hash tables + */ +-GHashTable* g_hash_table_new (GHashFunc hash_func, +- GEqualFunc key_equal_func); +-GHashTable* g_hash_table_new_full (GHashFunc hash_func, ++GLIB_FUNC GHashTable* g_hash_table_new (GHashFunc hash_func, ++ GEqualFunc key_equal_func);; ++GLIB_FUNC GHashTable* g_hash_table_new_full (GHashFunc hash_func, + GEqualFunc key_equal_func, + GDestroyNotify key_destroy_func, +- GDestroyNotify value_destroy_func); +-void g_hash_table_destroy (GHashTable *hash_table); +-void g_hash_table_insert (GHashTable *hash_table, ++ GDestroyNotify value_destroy_func);; ++GLIB_FUNC void g_hash_table_destroy (GHashTable *hash_table); ++GLIB_FUNC void g_hash_table_insert (GHashTable *hash_table, + gpointer key, +- gpointer value); +-void g_hash_table_replace (GHashTable *hash_table, ++ gpointer value);; ++GLIB_FUNC void g_hash_table_replace (GHashTable *hash_table, + gpointer key, +- gpointer value); +-gboolean g_hash_table_remove (GHashTable *hash_table, +- gconstpointer key); +-gboolean g_hash_table_steal (GHashTable *hash_table, +- gconstpointer key); +-gpointer g_hash_table_lookup (GHashTable *hash_table, +- gconstpointer key); +-gboolean g_hash_table_lookup_extended (GHashTable *hash_table, ++ gpointer value);; ++GLIB_FUNC gboolean g_hash_table_remove (GHashTable *hash_table, ++ gconstpointer key);; ++GLIB_FUNC gboolean g_hash_table_steal (GHashTable *hash_table, ++ gconstpointer key);; ++GLIB_FUNC gpointer g_hash_table_lookup (GHashTable *hash_table, ++ gconstpointer key);; ++GLIB_FUNC gboolean g_hash_table_lookup_extended (GHashTable *hash_table, + gconstpointer lookup_key, + gpointer *orig_key, +- gpointer *value); +-void g_hash_table_foreach (GHashTable *hash_table, ++ gpointer *value);; ++GLIB_FUNC void g_hash_table_foreach (GHashTable *hash_table, + GHFunc func, +- gpointer user_data); +-gpointer g_hash_table_find (GHashTable *hash_table, ++ gpointer user_data);; ++GLIB_FUNC gpointer g_hash_table_find (GHashTable *hash_table, + GHRFunc predicate, +- gpointer user_data); +-guint g_hash_table_foreach_remove (GHashTable *hash_table, ++ gpointer user_data);; ++GLIB_FUNC guint g_hash_table_foreach_remove (GHashTable *hash_table, + GHRFunc func, +- gpointer user_data); +-guint g_hash_table_foreach_steal (GHashTable *hash_table, ++ gpointer user_data);; ++GLIB_FUNC guint g_hash_table_foreach_steal (GHashTable *hash_table, + GHRFunc func, +- gpointer user_data); +-guint g_hash_table_size (GHashTable *hash_table); ++ gpointer user_data);; ++GLIB_FUNC guint g_hash_table_size (GHashTable *hash_table); + + #ifndef G_DISABLE_DEPRECATED + +@@ -87,13 +87,13 @@ + + /* Hash Functions + */ +-gboolean g_str_equal (gconstpointer v, +- gconstpointer v2); +-guint g_str_hash (gconstpointer v); ++GLIB_FUNC gboolean g_str_equal (gconstpointer v, ++ gconstpointer v2);; ++GLIB_FUNC guint g_str_hash (gconstpointer v); + +-gboolean g_int_equal (gconstpointer v, +- gconstpointer v2); +-guint g_int_hash (gconstpointer v); ++GLIB_FUNC gboolean g_int_equal (gconstpointer v, ++ gconstpointer v2);; ++GLIB_FUNC guint g_int_hash (gconstpointer v); + + /* This "hash" function will just return the key's address as an + * unsigned integer. Useful for hashing on plain addresses or +@@ -101,8 +101,8 @@ + * Passing NULL into g_hash_table_new() as GHashFunc has the + * same effect as passing g_direct_hash(). + */ +-guint g_direct_hash (gconstpointer v) G_GNUC_CONST; +-gboolean g_direct_equal (gconstpointer v, ++GLIB_FUNC guint g_direct_hash (gconstpointer v) G_GNUC_CONST; ++GLIB_FUNC gboolean g_direct_equal (gconstpointer v, + gconstpointer v2) G_GNUC_CONST; + + G_END_DECLS +--- glib-2.4.6/glib/ghook.h~visibility.patch ++++ glib-2.4.6/glib/ghook.h +@@ -99,78 +99,78 @@ + + /* --- prototypes --- */ + /* callback maintenance functions */ +-void g_hook_list_init (GHookList *hook_list, +- guint hook_size); +-void g_hook_list_clear (GHookList *hook_list); +-GHook* g_hook_alloc (GHookList *hook_list); +-void g_hook_free (GHookList *hook_list, +- GHook *hook); +-void g_hook_ref (GHookList *hook_list, +- GHook *hook); +-void g_hook_unref (GHookList *hook_list, +- GHook *hook); +-gboolean g_hook_destroy (GHookList *hook_list, +- gulong hook_id); +-void g_hook_destroy_link (GHookList *hook_list, +- GHook *hook); +-void g_hook_prepend (GHookList *hook_list, +- GHook *hook); +-void g_hook_insert_before (GHookList *hook_list, ++GLIB_FUNC void g_hook_list_init (GHookList *hook_list, ++ guint hook_size);; ++GLIB_FUNC void g_hook_list_clear (GHookList *hook_list); ++GLIB_FUNC GHook* g_hook_alloc (GHookList *hook_list); ++GLIB_FUNC void g_hook_free (GHookList *hook_list, ++ GHook *hook);; ++GLIB_FUNC void g_hook_ref (GHookList *hook_list, ++ GHook *hook);; ++GLIB_FUNC void g_hook_unref (GHookList *hook_list, ++ GHook *hook);; ++GLIB_FUNC gboolean g_hook_destroy (GHookList *hook_list, ++ gulong hook_id);; ++GLIB_FUNC void g_hook_destroy_link (GHookList *hook_list, ++ GHook *hook);; ++GLIB_FUNC void g_hook_prepend (GHookList *hook_list, ++ GHook *hook);; ++GLIB_FUNC void g_hook_insert_before (GHookList *hook_list, + GHook *sibling, +- GHook *hook); +-void g_hook_insert_sorted (GHookList *hook_list, ++ GHook *hook);; ++GLIB_FUNC void g_hook_insert_sorted (GHookList *hook_list, + GHook *hook, +- GHookCompareFunc func); +-GHook* g_hook_get (GHookList *hook_list, +- gulong hook_id); +-GHook* g_hook_find (GHookList *hook_list, ++ GHookCompareFunc func);; ++GLIB_FUNC GHook* g_hook_get (GHookList *hook_list, ++ gulong hook_id);; ++GLIB_FUNC GHook* g_hook_find (GHookList *hook_list, + gboolean need_valids, + GHookFindFunc func, +- gpointer data); +-GHook* g_hook_find_data (GHookList *hook_list, ++ gpointer data);; ++GLIB_FUNC GHook* g_hook_find_data (GHookList *hook_list, + gboolean need_valids, +- gpointer data); +-GHook* g_hook_find_func (GHookList *hook_list, ++ gpointer data);; ++GLIB_FUNC GHook* g_hook_find_func (GHookList *hook_list, + gboolean need_valids, +- gpointer func); +-GHook* g_hook_find_func_data (GHookList *hook_list, ++ gpointer func);; ++GLIB_FUNC GHook* g_hook_find_func_data (GHookList *hook_list, + gboolean need_valids, + gpointer func, +- gpointer data); ++ gpointer data);; + /* return the first valid hook, and increment its reference count */ +-GHook* g_hook_first_valid (GHookList *hook_list, +- gboolean may_be_in_call); ++GLIB_FUNC GHook* g_hook_first_valid (GHookList *hook_list, ++ gboolean may_be_in_call);; + /* return the next valid hook with incremented reference count, and + * decrement the reference count of the original hook + */ +-GHook* g_hook_next_valid (GHookList *hook_list, ++GLIB_FUNC GHook* g_hook_next_valid (GHookList *hook_list, + GHook *hook, +- gboolean may_be_in_call); ++ gboolean may_be_in_call);; + /* GHookCompareFunc implementation to insert hooks sorted by their id */ +-gint g_hook_compare_ids (GHook *new_hook, +- GHook *sibling); ++GLIB_FUNC gint g_hook_compare_ids (GHook *new_hook, ++ GHook *sibling);; + /* convenience macros */ + #define g_hook_append( hook_list, hook ) \ + g_hook_insert_before ((hook_list), NULL, (hook)) + /* invoke all valid hooks with the (*GHookFunc) signature. + */ +-void g_hook_list_invoke (GHookList *hook_list, +- gboolean may_recurse); ++GLIB_FUNC void g_hook_list_invoke (GHookList *hook_list, ++ gboolean may_recurse);; + /* invoke all valid hooks with the (*GHookCheckFunc) signature, + * and destroy the hook if FALSE is returned. + */ +-void g_hook_list_invoke_check (GHookList *hook_list, +- gboolean may_recurse); ++GLIB_FUNC void g_hook_list_invoke_check (GHookList *hook_list, ++ gboolean may_recurse);; + /* invoke a marshaller on all valid hooks. + */ +-void g_hook_list_marshal (GHookList *hook_list, ++GLIB_FUNC void g_hook_list_marshal (GHookList *hook_list, + gboolean may_recurse, + GHookMarshaller marshaller, +- gpointer marshal_data); +-void g_hook_list_marshal_check (GHookList *hook_list, ++ gpointer marshal_data);; ++GLIB_FUNC void g_hook_list_marshal_check (GHookList *hook_list, + gboolean may_recurse, + GHookCheckMarshaller marshaller, +- gpointer marshal_data); ++ gpointer marshal_data);; + + G_END_DECLS + +--- glib-2.4.6/glib/giochannel.h~visibility.patch ++++ glib-2.4.6/glib/giochannel.h +@@ -162,112 +162,112 @@ + GIOFlags (*io_get_flags) (GIOChannel *channel); + }; + +-void g_io_channel_init (GIOChannel *channel); +-void g_io_channel_ref (GIOChannel *channel); +-void g_io_channel_unref (GIOChannel *channel); ++GLIB_FUNC void g_io_channel_init (GIOChannel *channel); ++GLIB_FUNC void g_io_channel_ref (GIOChannel *channel); ++GLIB_FUNC void g_io_channel_unref (GIOChannel *channel); + + #ifndef G_DISABLE_DEPRECATED +-GIOError g_io_channel_read (GIOChannel *channel, ++GLIB_FUNC GIOError g_io_channel_read (GIOChannel *channel, + gchar *buf, + gsize count, +- gsize *bytes_read); +-GIOError g_io_channel_write (GIOChannel *channel, ++ gsize *bytes_read);; ++GLIB_FUNC GIOError g_io_channel_write (GIOChannel *channel, + const gchar *buf, + gsize count, +- gsize *bytes_written); +-GIOError g_io_channel_seek (GIOChannel *channel, ++ gsize *bytes_written);; ++GLIB_FUNC GIOError g_io_channel_seek (GIOChannel *channel, + gint64 offset, +- GSeekType type); +-void g_io_channel_close (GIOChannel *channel); ++ GSeekType type);; ++GLIB_FUNC void g_io_channel_close (GIOChannel *channel); + #endif /* G_DISABLE_DEPRECATED */ + +-GIOStatus g_io_channel_shutdown (GIOChannel *channel, ++GLIB_FUNC GIOStatus g_io_channel_shutdown (GIOChannel *channel, + gboolean flush, +- GError **err); +-guint g_io_add_watch_full (GIOChannel *channel, ++ GError **err);; ++GLIB_FUNC guint g_io_add_watch_full (GIOChannel *channel, + gint priority, + GIOCondition condition, + GIOFunc func, + gpointer user_data, +- GDestroyNotify notify); +-GSource * g_io_create_watch (GIOChannel *channel, +- GIOCondition condition); +-guint g_io_add_watch (GIOChannel *channel, ++ GDestroyNotify notify);; ++GLIB_FUNC GSource * g_io_create_watch (GIOChannel *channel, ++ GIOCondition condition);; ++GLIB_FUNC guint g_io_add_watch (GIOChannel *channel, + GIOCondition condition, + GIOFunc func, +- gpointer user_data); ++ gpointer user_data);; + + /* character encoding conversion involved functions. + */ + +-void g_io_channel_set_buffer_size (GIOChannel *channel, +- gsize size); +-gsize g_io_channel_get_buffer_size (GIOChannel *channel); +-GIOCondition g_io_channel_get_buffer_condition (GIOChannel *channel); +-GIOStatus g_io_channel_set_flags (GIOChannel *channel, ++GLIB_FUNC void g_io_channel_set_buffer_size (GIOChannel *channel, ++ gsize size);; ++GLIB_FUNC gsize g_io_channel_get_buffer_size (GIOChannel *channel); ++GLIB_FUNC GIOCondition g_io_channel_get_buffer_condition (GIOChannel *channel); ++GLIB_FUNC GIOStatus g_io_channel_set_flags (GIOChannel *channel, + GIOFlags flags, +- GError **error); +-GIOFlags g_io_channel_get_flags (GIOChannel *channel); +-void g_io_channel_set_line_term (GIOChannel *channel, ++ GError **error);; ++GLIB_FUNC GIOFlags g_io_channel_get_flags (GIOChannel *channel); ++GLIB_FUNC void g_io_channel_set_line_term (GIOChannel *channel, + const gchar *line_term, +- gint length); +-G_CONST_RETURN gchar* g_io_channel_get_line_term (GIOChannel *channel, +- gint *length); +-void g_io_channel_set_buffered (GIOChannel *channel, +- gboolean buffered); +-gboolean g_io_channel_get_buffered (GIOChannel *channel); +-GIOStatus g_io_channel_set_encoding (GIOChannel *channel, ++ gint length);; ++GLIB_FUNC G_CONST_RETURN gchar* g_io_channel_get_line_term (GIOChannel *channel, ++ gint *length);; ++GLIB_FUNC void g_io_channel_set_buffered (GIOChannel *channel, ++ gboolean buffered);; ++GLIB_FUNC gboolean g_io_channel_get_buffered (GIOChannel *channel); ++GLIB_FUNC GIOStatus g_io_channel_set_encoding (GIOChannel *channel, + const gchar *encoding, +- GError **error); +-G_CONST_RETURN gchar* g_io_channel_get_encoding (GIOChannel *channel); +-void g_io_channel_set_close_on_unref (GIOChannel *channel, +- gboolean do_close); +-gboolean g_io_channel_get_close_on_unref (GIOChannel *channel); ++ GError **error);; ++GLIB_FUNC G_CONST_RETURN gchar* g_io_channel_get_encoding (GIOChannel *channel); ++GLIB_FUNC void g_io_channel_set_close_on_unref (GIOChannel *channel, ++ gboolean do_close);; ++GLIB_FUNC gboolean g_io_channel_get_close_on_unref (GIOChannel *channel); + + +-GIOStatus g_io_channel_flush (GIOChannel *channel, +- GError **error); +-GIOStatus g_io_channel_read_line (GIOChannel *channel, ++GLIB_FUNC GIOStatus g_io_channel_flush (GIOChannel *channel, ++ GError **error);; ++GLIB_FUNC GIOStatus g_io_channel_read_line (GIOChannel *channel, + gchar **str_return, + gsize *length, + gsize *terminator_pos, +- GError **error); +-GIOStatus g_io_channel_read_line_string (GIOChannel *channel, ++ GError **error);; ++GLIB_FUNC GIOStatus g_io_channel_read_line_string (GIOChannel *channel, + GString *buffer, + gsize *terminator_pos, +- GError **error); +-GIOStatus g_io_channel_read_to_end (GIOChannel *channel, ++ GError **error);; ++GLIB_FUNC GIOStatus g_io_channel_read_to_end (GIOChannel *channel, + gchar **str_return, + gsize *length, +- GError **error); +-GIOStatus g_io_channel_read_chars (GIOChannel *channel, ++ GError **error);; ++GLIB_FUNC GIOStatus g_io_channel_read_chars (GIOChannel *channel, + gchar *buf, + gsize count, + gsize *bytes_read, +- GError **error); +-GIOStatus g_io_channel_read_unichar (GIOChannel *channel, ++ GError **error);; ++GLIB_FUNC GIOStatus g_io_channel_read_unichar (GIOChannel *channel, + gunichar *thechar, +- GError **error); +-GIOStatus g_io_channel_write_chars (GIOChannel *channel, ++ GError **error);; ++GLIB_FUNC GIOStatus g_io_channel_write_chars (GIOChannel *channel, + const gchar *buf, + gssize count, + gsize *bytes_written, +- GError **error); +-GIOStatus g_io_channel_write_unichar (GIOChannel *channel, ++ GError **error);; ++GLIB_FUNC GIOStatus g_io_channel_write_unichar (GIOChannel *channel, + gunichar thechar, +- GError **error); +-GIOStatus g_io_channel_seek_position (GIOChannel *channel, ++ GError **error);; ++GLIB_FUNC GIOStatus g_io_channel_seek_position (GIOChannel *channel, + gint64 offset, + GSeekType type, +- GError **error); +-GIOChannel* g_io_channel_new_file (const gchar *filename, ++ GError **error);; ++GLIB_FUNC GIOChannel* g_io_channel_new_file (const gchar *filename, + const gchar *mode, +- GError **error); ++ GError **error);; + + /* Error handling */ + +-GQuark g_io_channel_error_quark (void); +-GIOChannelError g_io_channel_error_from_errno (gint en); ++GLIB_FUNC GQuark g_io_channel_error_quark (void); ++GLIB_FUNC GIOChannelError g_io_channel_error_from_errno (gint en); + + /* On Unix, IO channels created with this function for any file + * descriptor or socket. +@@ -287,8 +287,8 @@ + * corresponding concept is file HANDLE. There isn't as of yet a way to + * get GIOChannels for Win32 file HANDLEs. + */ +-GIOChannel* g_io_channel_unix_new (int fd); +-gint g_io_channel_unix_get_fd (GIOChannel *channel); ++GLIB_FUNC GIOChannel* g_io_channel_unix_new (int fd); ++GLIB_FUNC gint g_io_channel_unix_get_fd (GIOChannel *channel); + + + /* Hook for GClosure / GSource integration. Don't touch */ +@@ -308,19 +308,19 @@ + * from the underlying file descriptor. For SOCKETs, it is possible to call + * recv(). + */ +-void g_io_channel_win32_make_pollfd (GIOChannel *channel, ++GLIB_FUNC void g_io_channel_win32_make_pollfd (GIOChannel *channel, + GIOCondition condition, +- GPollFD *fd); ++ GPollFD *fd);; + + /* This can be used to wait a until at least one of the channels is readable. + * On Unix you would do a select() on the file descriptors of the channels. + */ +-gint g_io_channel_win32_poll (GPollFD *fds, ++GLIB_FUNC gint g_io_channel_win32_poll (GPollFD *fds, + gint n_fds, +- gint timeout_); ++ gint timeout_);; + + /* Create an IO channel for Windows messages for window handle hwnd. */ +-GIOChannel *g_io_channel_win32_new_messages (guint hwnd); ++GLIB_FUNC GIOChannel *g_io_channel_win32_new_messages (guint hwnd);; + + /* Create an IO channel for C runtime (emulated Unix-like) file + * descriptors. After calling g_io_add_watch() on a IO channel +@@ -331,17 +331,17 @@ + * the file descriptor should be done by this internal GLib + * thread. Your code should call only g_io_channel_read(). + */ +-GIOChannel* g_io_channel_win32_new_fd (gint fd); ++GLIB_FUNC GIOChannel* g_io_channel_win32_new_fd (gint fd); + + /* Get the C runtime file descriptor of a channel. */ +-gint g_io_channel_win32_get_fd (GIOChannel *channel); ++GLIB_FUNC gint g_io_channel_win32_get_fd (GIOChannel *channel); + + /* Create an IO channel for a winsock socket. The parameter should be + * a SOCKET. Contrary to IO channels for file descriptors (on *Win32), + * you can use normal recv() or recvfrom() on sockets even if GLib + * is polling them. + */ +-GIOChannel *g_io_channel_win32_new_socket (gint socket); ++GLIB_FUNC GIOChannel *g_io_channel_win32_new_socket (gint socket);; + + #endif + +--- glib-2.4.6/glib/glib.def~visibility.patch ++++ glib-2.4.6/glib/glib.def +@@ -1,4 +1,3 @@ +-EXPORTS + g_allocator_free + g_allocator_new + g_array_append_vals +@@ -47,9 +46,7 @@ + g_atomic_int_add + g_atomic_int_compare_and_exchange + g_atomic_int_exchange_and_add +-; g_atomic_int_get + g_atomic_pointer_compare_and_exchange +-; g_atomic_pointer_get + g_basename + g_bit_nth_lsf + g_bit_nth_msf +--- glib-2.4.6/glib/glist.h~visibility.patch ++++ glib-2.4.6/glib/glist.h +@@ -42,62 +42,62 @@ + + /* Doubly linked lists + */ +-void g_list_push_allocator (GAllocator *allocator); +-void g_list_pop_allocator (void); +-GList* g_list_alloc (void); +-void g_list_free (GList *list); +-void g_list_free_1 (GList *list); +-GList* g_list_append (GList *list, +- gpointer data); +-GList* g_list_prepend (GList *list, +- gpointer data); +-GList* g_list_insert (GList *list, ++GLIB_FUNC void g_list_push_allocator (GAllocator *allocator); ++GLIB_FUNC void g_list_pop_allocator (void); ++GLIB_FUNC GList* g_list_alloc (void); ++GLIB_FUNC void g_list_free (GList *list); ++GLIB_FUNC void g_list_free_1 (GList *list); ++GLIB_FUNC GList* g_list_append (GList *list, ++ gpointer data);; ++GLIB_FUNC GList* g_list_prepend (GList *list, ++ gpointer data);; ++GLIB_FUNC GList* g_list_insert (GList *list, + gpointer data, +- gint position); +-GList* g_list_insert_sorted (GList *list, ++ gint position);; ++GLIB_FUNC GList* g_list_insert_sorted (GList *list, + gpointer data, +- GCompareFunc func); +-GList* g_list_insert_before (GList *list, ++ GCompareFunc func);; ++GLIB_FUNC GList* g_list_insert_before (GList *list, + GList *sibling, +- gpointer data); +-GList* g_list_concat (GList *list1, +- GList *list2); +-GList* g_list_remove (GList *list, +- gconstpointer data); +-GList* g_list_remove_all (GList *list, +- gconstpointer data); +-GList* g_list_remove_link (GList *list, +- GList *llink); +-GList* g_list_delete_link (GList *list, +- GList *link_); +-GList* g_list_reverse (GList *list); +-GList* g_list_copy (GList *list); +-GList* g_list_nth (GList *list, +- guint n); +-GList* g_list_nth_prev (GList *list, +- guint n); +-GList* g_list_find (GList *list, +- gconstpointer data); +-GList* g_list_find_custom (GList *list, ++ gpointer data);; ++GLIB_FUNC GList* g_list_concat (GList *list1, ++ GList *list2);; ++GLIB_FUNC GList* g_list_remove (GList *list, ++ gconstpointer data);; ++GLIB_FUNC GList* g_list_remove_all (GList *list, ++ gconstpointer data);; ++GLIB_FUNC GList* g_list_remove_link (GList *list, ++ GList *llink);; ++GLIB_FUNC GList* g_list_delete_link (GList *list, ++ GList *link_);; ++GLIB_FUNC GList* g_list_reverse (GList *list); ++GLIB_FUNC GList* g_list_copy (GList *list); ++GLIB_FUNC GList* g_list_nth (GList *list, ++ guint n);; ++GLIB_FUNC GList* g_list_nth_prev (GList *list, ++ guint n);; ++GLIB_FUNC GList* g_list_find (GList *list, ++ gconstpointer data);; ++GLIB_FUNC GList* g_list_find_custom (GList *list, + gconstpointer data, +- GCompareFunc func); +-gint g_list_position (GList *list, +- GList *llink); +-gint g_list_index (GList *list, +- gconstpointer data); +-GList* g_list_last (GList *list); +-GList* g_list_first (GList *list); +-guint g_list_length (GList *list); +-void g_list_foreach (GList *list, ++ GCompareFunc func);; ++GLIB_FUNC gint g_list_position (GList *list, ++ GList *llink);; ++GLIB_FUNC gint g_list_index (GList *list, ++ gconstpointer data);; ++GLIB_FUNC GList* g_list_last (GList *list); ++GLIB_FUNC GList* g_list_first (GList *list); ++GLIB_FUNC guint g_list_length (GList *list); ++GLIB_FUNC void g_list_foreach (GList *list, + GFunc func, +- gpointer user_data); +-GList* g_list_sort (GList *list, +- GCompareFunc compare_func); +-GList* g_list_sort_with_data (GList *list, ++ gpointer user_data);; ++GLIB_FUNC GList* g_list_sort (GList *list, ++ GCompareFunc compare_func);; ++GLIB_FUNC GList* g_list_sort_with_data (GList *list, + GCompareDataFunc compare_func, +- gpointer user_data); +-gpointer g_list_nth_data (GList *list, +- guint n); ++ gpointer user_data);; ++GLIB_FUNC gpointer g_list_nth_data (GList *list, ++ guint n);; + + #define g_list_previous(list) ((list) ? (((GList *)(list))->prev) : NULL) + #define g_list_next(list) ((list) ? (((GList *)(list))->next) : NULL) +--- glib-2.4.6/glib/gmain.h~visibility.patch ++++ glib-2.4.6/glib/gmain.h +@@ -135,111 +135,111 @@ + + /* GMainContext: */ + +-GMainContext *g_main_context_new (void); +-void g_main_context_ref (GMainContext *context); +-void g_main_context_unref (GMainContext *context); +-GMainContext *g_main_context_default (void); ++GLIB_FUNC GMainContext *g_main_context_new (void);; ++GLIB_FUNC void g_main_context_ref (GMainContext *context); ++GLIB_FUNC void g_main_context_unref (GMainContext *context); ++GLIB_FUNC GMainContext *g_main_context_default (void);; + +-gboolean g_main_context_iteration (GMainContext *context, +- gboolean may_block); +-gboolean g_main_context_pending (GMainContext *context); ++GLIB_FUNC gboolean g_main_context_iteration (GMainContext *context, ++ gboolean may_block);; ++GLIB_FUNC gboolean g_main_context_pending (GMainContext *context); + + /* For implementation of legacy interfaces + */ +-GSource *g_main_context_find_source_by_id (GMainContext *context, +- guint source_id); +-GSource *g_main_context_find_source_by_user_data (GMainContext *context, +- gpointer user_data); +-GSource *g_main_context_find_source_by_funcs_user_data (GMainContext *context, ++GLIB_FUNC GSource *g_main_context_find_source_by_id (GMainContext *context, ++ guint source_id);; ++GLIB_FUNC GSource *g_main_context_find_source_by_user_data (GMainContext *context, ++ gpointer user_data);; ++GLIB_FUNC GSource *g_main_context_find_source_by_funcs_user_data (GMainContext *context, + GSourceFuncs *funcs, +- gpointer user_data); ++ gpointer user_data);; + + /* Low level functions for implementing custom main loops. + */ +-void g_main_context_wakeup (GMainContext *context); +-gboolean g_main_context_acquire (GMainContext *context); +-void g_main_context_release (GMainContext *context); +-gboolean g_main_context_wait (GMainContext *context, ++GLIB_FUNC void g_main_context_wakeup (GMainContext *context); ++GLIB_FUNC gboolean g_main_context_acquire (GMainContext *context); ++GLIB_FUNC void g_main_context_release (GMainContext *context); ++GLIB_FUNC gboolean g_main_context_wait (GMainContext *context, + GCond *cond, +- GMutex *mutex); ++ GMutex *mutex);; + +-gboolean g_main_context_prepare (GMainContext *context, +- gint *priority); +-gint g_main_context_query (GMainContext *context, ++GLIB_FUNC gboolean g_main_context_prepare (GMainContext *context, ++ gint *priority);; ++GLIB_FUNC gint g_main_context_query (GMainContext *context, + gint max_priority, + gint *timeout_, + GPollFD *fds, +- gint n_fds); +-gint g_main_context_check (GMainContext *context, ++ gint n_fds);; ++GLIB_FUNC gint g_main_context_check (GMainContext *context, + gint max_priority, + GPollFD *fds, +- gint n_fds); +-void g_main_context_dispatch (GMainContext *context); ++ gint n_fds);; ++GLIB_FUNC void g_main_context_dispatch (GMainContext *context); + +-void g_main_context_set_poll_func (GMainContext *context, +- GPollFunc func); +-GPollFunc g_main_context_get_poll_func (GMainContext *context); ++GLIB_FUNC void g_main_context_set_poll_func (GMainContext *context, ++ GPollFunc func);; ++GLIB_FUNC GPollFunc g_main_context_get_poll_func (GMainContext *context); + + /* Low level functions for use by source implementations + */ +-void g_main_context_add_poll (GMainContext *context, ++GLIB_FUNC void g_main_context_add_poll (GMainContext *context, + GPollFD *fd, +- gint priority); +-void g_main_context_remove_poll (GMainContext *context, +- GPollFD *fd); ++ gint priority);; ++GLIB_FUNC void g_main_context_remove_poll (GMainContext *context, ++ GPollFD *fd);; + +-int g_main_depth (void); ++GLIB_FUNC int g_main_depth (void); + + /* GMainLoop: */ + +-GMainLoop *g_main_loop_new (GMainContext *context, +- gboolean is_running); +-void g_main_loop_run (GMainLoop *loop); +-void g_main_loop_quit (GMainLoop *loop); +-GMainLoop *g_main_loop_ref (GMainLoop *loop); +-void g_main_loop_unref (GMainLoop *loop); +-gboolean g_main_loop_is_running (GMainLoop *loop); +-GMainContext *g_main_loop_get_context (GMainLoop *loop); ++GLIB_FUNC GMainLoop *g_main_loop_new (GMainContext *context, ++ gboolean is_running);; ++GLIB_FUNC void g_main_loop_run (GMainLoop *loop); ++GLIB_FUNC void g_main_loop_quit (GMainLoop *loop); ++GLIB_FUNC GMainLoop *g_main_loop_ref (GMainLoop *loop);; ++GLIB_FUNC void g_main_loop_unref (GMainLoop *loop); ++GLIB_FUNC gboolean g_main_loop_is_running (GMainLoop *loop); ++GLIB_FUNC GMainContext *g_main_loop_get_context (GMainLoop *loop);; + + /* GSource: */ + +-GSource *g_source_new (GSourceFuncs *source_funcs, +- guint struct_size); +-GSource *g_source_ref (GSource *source); +-void g_source_unref (GSource *source); ++GLIB_FUNC GSource *g_source_new (GSourceFuncs *source_funcs, ++ guint struct_size);; ++GLIB_FUNC GSource *g_source_ref (GSource *source);; ++GLIB_FUNC void g_source_unref (GSource *source); + +-guint g_source_attach (GSource *source, +- GMainContext *context); +-void g_source_destroy (GSource *source); ++GLIB_FUNC guint g_source_attach (GSource *source, ++ GMainContext *context);; ++GLIB_FUNC void g_source_destroy (GSource *source); + +-void g_source_set_priority (GSource *source, +- gint priority); +-gint g_source_get_priority (GSource *source); +-void g_source_set_can_recurse (GSource *source, +- gboolean can_recurse); +-gboolean g_source_get_can_recurse (GSource *source); +-guint g_source_get_id (GSource *source); ++GLIB_FUNC void g_source_set_priority (GSource *source, ++ gint priority);; ++GLIB_FUNC gint g_source_get_priority (GSource *source); ++GLIB_FUNC void g_source_set_can_recurse (GSource *source, ++ gboolean can_recurse);; ++GLIB_FUNC gboolean g_source_get_can_recurse (GSource *source); ++GLIB_FUNC guint g_source_get_id (GSource *source); + +-GMainContext *g_source_get_context (GSource *source); ++GLIB_FUNC GMainContext *g_source_get_context (GSource *source);; + +-void g_source_set_callback (GSource *source, ++GLIB_FUNC void g_source_set_callback (GSource *source, + GSourceFunc func, + gpointer data, +- GDestroyNotify notify); ++ GDestroyNotify notify);; + + + /* Used to implement g_source_connect_closure and internally*/ +-void g_source_set_callback_indirect (GSource *source, ++GLIB_FUNC void g_source_set_callback_indirect (GSource *source, + gpointer callback_data, +- GSourceCallbackFuncs *callback_funcs); ++ GSourceCallbackFuncs *callback_funcs);; + +-void g_source_add_poll (GSource *source, +- GPollFD *fd); +-void g_source_remove_poll (GSource *source, +- GPollFD *fd); ++GLIB_FUNC void g_source_add_poll (GSource *source, ++ GPollFD *fd);; ++GLIB_FUNC void g_source_remove_poll (GSource *source, ++ GPollFD *fd);; + +-void g_source_get_current_time (GSource *source, +- GTimeVal *timeval); ++GLIB_FUNC void g_source_get_current_time (GSource *source, ++ GTimeVal *timeval);; + + /* void g_source_connect_closure (GSource *source, + GClosure *closure); +@@ -247,13 +247,13 @@ + + /* Specific source types + */ +-GSource *g_idle_source_new (void); +-GSource *g_child_watch_source_new (GPid pid); +-GSource *g_timeout_source_new (guint interval); ++GLIB_FUNC GSource *g_idle_source_new (void);; ++GLIB_FUNC GSource *g_child_watch_source_new (GPid pid);; ++GLIB_FUNC GSource *g_timeout_source_new (guint interval);; + + /* Miscellaneous functions + */ +-void g_get_current_time (GTimeVal *result); ++GLIB_FUNC void g_get_current_time (GTimeVal *result); + + /* ============== Compat main loop stuff ================== */ + +@@ -278,35 +278,35 @@ + #endif /* G_DISABLE_DEPRECATED */ + + /* Source manipulation by ID */ +-gboolean g_source_remove (guint tag); +-gboolean g_source_remove_by_user_data (gpointer user_data); +-gboolean g_source_remove_by_funcs_user_data (GSourceFuncs *funcs, +- gpointer user_data); ++GLIB_FUNC gboolean g_source_remove (guint tag); ++GLIB_FUNC gboolean g_source_remove_by_user_data (gpointer user_data); ++GLIB_FUNC gboolean g_source_remove_by_funcs_user_data (GSourceFuncs *funcs, ++ gpointer user_data);; + + /* Idles, child watchers and timeouts */ +-guint g_timeout_add_full (gint priority, ++GLIB_FUNC guint g_timeout_add_full (gint priority, + guint interval, + GSourceFunc function, + gpointer data, +- GDestroyNotify notify); +-guint g_timeout_add (guint interval, ++ GDestroyNotify notify);; ++GLIB_FUNC guint g_timeout_add (guint interval, + GSourceFunc function, +- gpointer data); +-guint g_child_watch_add_full (gint priority, ++ gpointer data);; ++GLIB_FUNC guint g_child_watch_add_full (gint priority, + GPid pid, + GChildWatchFunc function, + gpointer data, +- GDestroyNotify notify); +-guint g_child_watch_add (GPid pid, ++ GDestroyNotify notify);; ++GLIB_FUNC guint g_child_watch_add (GPid pid, + GChildWatchFunc function, +- gpointer data); +-guint g_idle_add (GSourceFunc function, +- gpointer data); +-guint g_idle_add_full (gint priority, ++ gpointer data);; ++GLIB_FUNC guint g_idle_add (GSourceFunc function, ++ gpointer data);; ++GLIB_FUNC guint g_idle_add_full (gint priority, + GSourceFunc function, + gpointer data, +- GDestroyNotify notify); +-gboolean g_idle_remove_by_data (gpointer data); ++ GDestroyNotify notify);; ++GLIB_FUNC gboolean g_idle_remove_by_data (gpointer data); + + /* Hook for GClosure / GSource integration. Don't touch */ + GLIB_VAR GSourceFuncs g_timeout_funcs; +--- glib-2.4.6/glib/gmarkup.h~visibility.patch ++++ glib-2.4.6/glib/gmarkup.h +@@ -42,7 +42,7 @@ + + #define G_MARKUP_ERROR g_markup_error_quark () + +-GQuark g_markup_error_quark (void); ++GLIB_FUNC GQuark g_markup_error_quark (void); + + typedef enum + { +@@ -97,33 +97,33 @@ + gpointer user_data); + }; + +-GMarkupParseContext *g_markup_parse_context_new (const GMarkupParser *parser, ++GLIB_FUNC GMarkupParseContext *g_markup_parse_context_new (const GMarkupParser *parser, + GMarkupParseFlags flags, + gpointer user_data, +- GDestroyNotify user_data_dnotify); +-void g_markup_parse_context_free (GMarkupParseContext *context); +-gboolean g_markup_parse_context_parse (GMarkupParseContext *context, ++ GDestroyNotify user_data_dnotify);; ++GLIB_FUNC void g_markup_parse_context_free (GMarkupParseContext *context); ++GLIB_FUNC gboolean g_markup_parse_context_parse (GMarkupParseContext *context, + const gchar *text, + gssize text_len, +- GError **error); ++ GError **error);; + +-gboolean g_markup_parse_context_end_parse (GMarkupParseContext *context, +- GError **error); +-G_CONST_RETURN gchar *g_markup_parse_context_get_element (GMarkupParseContext *context); ++GLIB_FUNC gboolean g_markup_parse_context_end_parse (GMarkupParseContext *context, ++ GError **error);; ++GLIB_FUNC G_CONST_RETURN gchar *g_markup_parse_context_get_element (GMarkupParseContext *context); + + /* For user-constructed error messages, has no precise semantics */ +-void g_markup_parse_context_get_position (GMarkupParseContext *context, ++GLIB_FUNC void g_markup_parse_context_get_position (GMarkupParseContext *context, + gint *line_number, +- gint *char_number); ++ gint *char_number);; + + /* useful when saving */ +-gchar* g_markup_escape_text (const gchar *text, +- gssize length); ++GLIB_FUNC gchar* g_markup_escape_text (const gchar *text, ++ gssize length);; + +-gchar *g_markup_printf_escaped (const char *format, +- ...) G_GNUC_PRINTF (1, 2); +-gchar *g_markup_vprintf_escaped (const char *format, +- va_list args); ++GLIB_FUNC gchar *g_markup_printf_escaped (const char *format, ++ ...) G_GNUC_PRINTF (1, 2);; ++GLIB_FUNC gchar *g_markup_vprintf_escaped (const char *format, ++ va_list args);; + + G_END_DECLS + +--- glib-2.4.6/glib/gmem.h~visibility.patch ++++ glib-2.4.6/glib/gmem.h +@@ -45,14 +45,14 @@ + + /* Memory allocation functions + */ +-gpointer g_malloc (gulong n_bytes); +-gpointer g_malloc0 (gulong n_bytes); +-gpointer g_realloc (gpointer mem, +- gulong n_bytes); +-void g_free (gpointer mem); +-gpointer g_try_malloc (gulong n_bytes); +-gpointer g_try_realloc (gpointer mem, +- gulong n_bytes); ++GLIB_FUNC gpointer g_malloc (gulong n_bytes); ++GLIB_FUNC gpointer g_malloc0 (gulong n_bytes); ++GLIB_FUNC gpointer g_realloc (gpointer mem, ++ gulong n_bytes);; ++GLIB_FUNC void g_free (gpointer mem); ++GLIB_FUNC gpointer g_try_malloc (gulong n_bytes); ++GLIB_FUNC gpointer g_try_realloc (gpointer mem, ++ gulong n_bytes);; + + + /* Convenience memory allocators +@@ -82,13 +82,13 @@ + gpointer (*try_realloc) (gpointer mem, + gsize n_bytes); + }; +-void g_mem_set_vtable (GMemVTable *vtable); +-gboolean g_mem_is_system_malloc (void); ++GLIB_FUNC void g_mem_set_vtable (GMemVTable *vtable); ++GLIB_FUNC gboolean g_mem_is_system_malloc (void); + + /* Memory profiler and checker, has to be enabled via g_mem_set_vtable() + */ + GLIB_VAR GMemVTable *glib_mem_profiler_table; +-void g_mem_profile (void); ++GLIB_FUNC void g_mem_profile (void); + + + /* Memchunk convenience functions +@@ -132,19 +132,19 @@ + #define G_ALLOC_ONLY 1 + #define G_ALLOC_AND_FREE 2 + +-GMemChunk* g_mem_chunk_new (const gchar *name, ++GLIB_FUNC GMemChunk* g_mem_chunk_new (const gchar *name, + gint atom_size, + gulong area_size, +- gint type); +-void g_mem_chunk_destroy (GMemChunk *mem_chunk); +-gpointer g_mem_chunk_alloc (GMemChunk *mem_chunk); +-gpointer g_mem_chunk_alloc0 (GMemChunk *mem_chunk); +-void g_mem_chunk_free (GMemChunk *mem_chunk, +- gpointer mem); +-void g_mem_chunk_clean (GMemChunk *mem_chunk); +-void g_mem_chunk_reset (GMemChunk *mem_chunk); +-void g_mem_chunk_print (GMemChunk *mem_chunk); +-void g_mem_chunk_info (void); ++ gint type);; ++GLIB_FUNC void g_mem_chunk_destroy (GMemChunk *mem_chunk); ++GLIB_FUNC gpointer g_mem_chunk_alloc (GMemChunk *mem_chunk); ++GLIB_FUNC gpointer g_mem_chunk_alloc0 (GMemChunk *mem_chunk); ++GLIB_FUNC void g_mem_chunk_free (GMemChunk *mem_chunk, ++ gpointer mem);; ++GLIB_FUNC void g_mem_chunk_clean (GMemChunk *mem_chunk); ++GLIB_FUNC void g_mem_chunk_reset (GMemChunk *mem_chunk); ++GLIB_FUNC void g_mem_chunk_print (GMemChunk *mem_chunk); ++GLIB_FUNC void g_mem_chunk_info (void); + + /* Ah yes...we have a "g_blow_chunks" function. + * "g_blow_chunks" simply compresses all the chunks. This operation +@@ -154,14 +154,14 @@ + * much better name than "g_mem_chunk_clean_all" or something + * similar. + */ +-void g_blow_chunks (void); ++GLIB_FUNC void g_blow_chunks (void); + + + /* Generic allocators + */ +-GAllocator* g_allocator_new (const gchar *name, +- guint n_preallocs); +-void g_allocator_free (GAllocator *allocator); ++GLIB_FUNC GAllocator* g_allocator_new (const gchar *name, ++ guint n_preallocs);; ++GLIB_FUNC void g_allocator_free (GAllocator *allocator); + + /* internal */ + #define G_ALLOCATOR_LIST (1) +--- glib-2.4.6/glib/gmessages.h~visibility.patch ++++ glib-2.4.6/glib/gmessages.h +@@ -41,8 +41,8 @@ + + /* calculate a string size, guaranteed to fit format + args. + */ +-gsize g_printf_string_upper_bound (const gchar* format, +- va_list args); ++GLIB_FUNC gsize g_printf_string_upper_bound (const gchar* format, ++ va_list args);; + + /* Log level shift offset for user defined + * log levels (0-7 are used by GLib). +@@ -78,27 +78,27 @@ + + /* Logging mechanism + */ +-guint g_log_set_handler (const gchar *log_domain, ++GLIB_FUNC guint g_log_set_handler (const gchar *log_domain, + GLogLevelFlags log_levels, + GLogFunc log_func, +- gpointer user_data); +-void g_log_remove_handler (const gchar *log_domain, +- guint handler_id); +-void g_log_default_handler (const gchar *log_domain, ++ gpointer user_data);; ++GLIB_FUNC void g_log_remove_handler (const gchar *log_domain, ++ guint handler_id);; ++GLIB_FUNC void g_log_default_handler (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, +- gpointer unused_data); +-void g_log (const gchar *log_domain, ++ gpointer unused_data);; ++GLIB_FUNC void g_log (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *format, +- ...) G_GNUC_PRINTF (3, 4); +-void g_logv (const gchar *log_domain, ++ ...) G_GNUC_PRINTF (3, 4);; ++GLIB_FUNC void g_logv (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *format, +- va_list args); +-GLogLevelFlags g_log_set_fatal_mask (const gchar *log_domain, +- GLogLevelFlags fatal_mask); +-GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask); ++ va_list args);; ++GLIB_FUNC GLogLevelFlags g_log_set_fatal_mask (const gchar *log_domain, ++ GLogLevelFlags fatal_mask);; ++GLIB_FUNC GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask); + + /* internal */ + void _g_log_fallback_handler (const gchar *log_domain, +@@ -176,12 +176,12 @@ + #endif /* !__GNUC__ */ + + typedef void (*GPrintFunc) (const gchar *string); +-void g_print (const gchar *format, +- ...) G_GNUC_PRINTF (1, 2); +-GPrintFunc g_set_print_handler (GPrintFunc func); +-void g_printerr (const gchar *format, +- ...) G_GNUC_PRINTF (1, 2); +-GPrintFunc g_set_printerr_handler (GPrintFunc func); ++GLIB_FUNC void g_print (const gchar *format, ++ ...) G_GNUC_PRINTF (1, 2);; ++GLIB_FUNC GPrintFunc g_set_print_handler (GPrintFunc func); ++GLIB_FUNC void g_printerr (const gchar *format, ++ ...) G_GNUC_PRINTF (1, 2);; ++GLIB_FUNC GPrintFunc g_set_printerr_handler (GPrintFunc func); + + + /* Provide macros for error handling. The "assert" macros will +--- glib-2.4.6/glib/gnode.h~visibility.patch ++++ glib-2.4.6/glib/gnode.h +@@ -74,36 +74,36 @@ + ((GNode*) (node))->next == NULL) + #define G_NODE_IS_LEAF(node) (((GNode*) (node))->children == NULL) + +-void g_node_push_allocator (GAllocator *allocator); +-void g_node_pop_allocator (void); +-GNode* g_node_new (gpointer data); +-void g_node_destroy (GNode *root); +-void g_node_unlink (GNode *node); +-GNode* g_node_copy_deep (GNode *node, ++GLIB_FUNC void g_node_push_allocator (GAllocator *allocator); ++GLIB_FUNC void g_node_pop_allocator (void); ++GLIB_FUNC GNode* g_node_new (gpointer data); ++GLIB_FUNC void g_node_destroy (GNode *root); ++GLIB_FUNC void g_node_unlink (GNode *node); ++GLIB_FUNC GNode* g_node_copy_deep (GNode *node, + GCopyFunc copy_func, +- gpointer data); +-GNode* g_node_copy (GNode *node); +-GNode* g_node_insert (GNode *parent, ++ gpointer data);; ++GLIB_FUNC GNode* g_node_copy (GNode *node); ++GLIB_FUNC GNode* g_node_insert (GNode *parent, + gint position, +- GNode *node); +-GNode* g_node_insert_before (GNode *parent, ++ GNode *node);; ++GLIB_FUNC GNode* g_node_insert_before (GNode *parent, + GNode *sibling, +- GNode *node); +-GNode* g_node_insert_after (GNode *parent, ++ GNode *node);; ++GLIB_FUNC GNode* g_node_insert_after (GNode *parent, + GNode *sibling, +- GNode *node); +-GNode* g_node_prepend (GNode *parent, +- GNode *node); +-guint g_node_n_nodes (GNode *root, +- GTraverseFlags flags); +-GNode* g_node_get_root (GNode *node); +-gboolean g_node_is_ancestor (GNode *node, +- GNode *descendant); +-guint g_node_depth (GNode *node); +-GNode* g_node_find (GNode *root, ++ GNode *node);; ++GLIB_FUNC GNode* g_node_prepend (GNode *parent, ++ GNode *node);; ++GLIB_FUNC guint g_node_n_nodes (GNode *root, ++ GTraverseFlags flags);; ++GLIB_FUNC GNode* g_node_get_root (GNode *node); ++GLIB_FUNC gboolean g_node_is_ancestor (GNode *node, ++ GNode *descendant);; ++GLIB_FUNC guint g_node_depth (GNode *node); ++GLIB_FUNC GNode* g_node_find (GNode *root, + GTraverseType order, + GTraverseFlags flags, +- gpointer data); ++ gpointer data);; + + /* convenience macros */ + #define g_node_append(parent, node) \ +@@ -122,39 +122,39 @@ + * this function is just a high level interface to + * low level traversal functions, optimized for speed. + */ +-void g_node_traverse (GNode *root, ++GLIB_FUNC void g_node_traverse (GNode *root, + GTraverseType order, + GTraverseFlags flags, + gint max_depth, + GNodeTraverseFunc func, +- gpointer data); ++ gpointer data);; + + /* return the maximum tree height starting with `node', this is an expensive + * operation, since we need to visit all nodes. this could be shortened by + * adding `guint height' to struct _GNode, but then again, this is not very + * often needed, and would make g_node_insert() more time consuming. + */ +-guint g_node_max_height (GNode *root); ++GLIB_FUNC guint g_node_max_height (GNode *root); + +-void g_node_children_foreach (GNode *node, ++GLIB_FUNC void g_node_children_foreach (GNode *node, + GTraverseFlags flags, + GNodeForeachFunc func, +- gpointer data); +-void g_node_reverse_children (GNode *node); +-guint g_node_n_children (GNode *node); +-GNode* g_node_nth_child (GNode *node, +- guint n); +-GNode* g_node_last_child (GNode *node); +-GNode* g_node_find_child (GNode *node, ++ gpointer data);; ++GLIB_FUNC void g_node_reverse_children (GNode *node); ++GLIB_FUNC guint g_node_n_children (GNode *node); ++GLIB_FUNC GNode* g_node_nth_child (GNode *node, ++ guint n);; ++GLIB_FUNC GNode* g_node_last_child (GNode *node); ++GLIB_FUNC GNode* g_node_find_child (GNode *node, + GTraverseFlags flags, +- gpointer data); +-gint g_node_child_position (GNode *node, +- GNode *child); +-gint g_node_child_index (GNode *node, +- gpointer data); ++ gpointer data);; ++GLIB_FUNC gint g_node_child_position (GNode *node, ++ GNode *child);; ++GLIB_FUNC gint g_node_child_index (GNode *node, ++ gpointer data);; + +-GNode* g_node_first_sibling (GNode *node); +-GNode* g_node_last_sibling (GNode *node); ++GLIB_FUNC GNode* g_node_first_sibling (GNode *node); ++GLIB_FUNC GNode* g_node_last_sibling (GNode *node); + + #define g_node_prev_sibling(node) ((node) ? \ + ((GNode*) (node))->prev : NULL) +--- glib-2.4.6/glib/gpattern.h~visibility.patch ++++ glib-2.4.6/glib/gpattern.h +@@ -26,18 +26,18 @@ + + typedef struct _GPatternSpec GPatternSpec; + +-GPatternSpec* g_pattern_spec_new (const gchar *pattern); +-void g_pattern_spec_free (GPatternSpec *pspec); +-gboolean g_pattern_spec_equal (GPatternSpec *pspec1, +- GPatternSpec *pspec2); +-gboolean g_pattern_match (GPatternSpec *pspec, ++GLIB_FUNC GPatternSpec* g_pattern_spec_new (const gchar *pattern); ++GLIB_FUNC void g_pattern_spec_free (GPatternSpec *pspec); ++GLIB_FUNC gboolean g_pattern_spec_equal (GPatternSpec *pspec1, ++ GPatternSpec *pspec2);; ++GLIB_FUNC gboolean g_pattern_match (GPatternSpec *pspec, + guint string_length, + const gchar *string, +- const gchar *string_reversed); +-gboolean g_pattern_match_string (GPatternSpec *pspec, +- const gchar *string); +-gboolean g_pattern_match_simple (const gchar *pattern, +- const gchar *string); ++ const gchar *string_reversed);; ++GLIB_FUNC gboolean g_pattern_match_string (GPatternSpec *pspec, ++ const gchar *string);; ++GLIB_FUNC gboolean g_pattern_match_simple (const gchar *pattern, ++ const gchar *string);; + + G_END_DECLS + +--- glib-2.4.6/glib/gprimes.h~visibility.patch ++++ glib-2.4.6/glib/gprimes.h +@@ -40,7 +40,7 @@ + * next largest prime, or the highest it knows about which is about + * MAXINT/4. + */ +-guint g_spaced_primes_closest (guint num) G_GNUC_CONST; ++GLIB_FUNC guint g_spaced_primes_closest (guint num) G_GNUC_CONST;; + + G_END_DECLS + +--- glib-2.4.6/glib/gprintf.h~visibility.patch ++++ glib-2.4.6/glib/gprintf.h +@@ -25,34 +25,34 @@ + + G_BEGIN_DECLS + +-gint g_printf (gchar const *format, +- ...) G_GNUC_PRINTF (1, 2); +-gint g_fprintf (FILE *file, ++GLIB_FUNC gint g_printf (gchar const *format, ++ ...) G_GNUC_PRINTF (1, 2);; ++GLIB_FUNC gint g_fprintf (FILE *file, + gchar const *format, +- ...) G_GNUC_PRINTF (2, 3); +-gint g_sprintf (gchar *string, ++ ...) G_GNUC_PRINTF (2, 3);; ++GLIB_FUNC gint g_sprintf (gchar *string, + gchar const *format, +- ...) G_GNUC_PRINTF (2, 3); +-gint g_snprintf (gchar *string, ++ ...) G_GNUC_PRINTF (2, 3);; ++GLIB_FUNC gint g_snprintf (gchar *string, + gulong n, + gchar const *format, +- ...) G_GNUC_PRINTF (3, 4); ++ ...) G_GNUC_PRINTF (3, 4);; + +-gint g_vprintf (gchar const *format, +- va_list args); +-gint g_vfprintf (FILE *file, ++GLIB_FUNC gint g_vprintf (gchar const *format, ++ va_list args);; ++GLIB_FUNC gint g_vfprintf (FILE *file, + gchar const *format, +- va_list args); +-gint g_vsprintf (gchar *string, ++ va_list args);; ++GLIB_FUNC gint g_vsprintf (gchar *string, + gchar const *format, +- va_list args); +-gint g_vsnprintf (gchar *string, ++ va_list args);; ++GLIB_FUNC gint g_vsnprintf (gchar *string, + gulong n, + gchar const *format, +- va_list args); +-gint g_vasprintf (gchar **string, ++ va_list args);; ++GLIB_FUNC gint g_vasprintf (gchar **string, + gchar const *format, +- va_list args); ++ va_list args);; + + G_END_DECLS + +--- glib-2.4.6/glib/gqsort.h~visibility.patch ++++ glib-2.4.6/glib/gqsort.h +@@ -32,11 +32,11 @@ + + G_BEGIN_DECLS + +-void g_qsort_with_data (gconstpointer pbase, ++GLIB_FUNC void g_qsort_with_data (gconstpointer pbase, + gint total_elems, + gsize size, + GCompareDataFunc compare_func, +- gpointer user_data); ++ gpointer user_data);; + + G_END_DECLS + +--- glib-2.4.6/glib/gquark.h~visibility.patch ++++ glib-2.4.6/glib/gquark.h +@@ -35,10 +35,10 @@ + + /* Quarks (string<->id association) + */ +-GQuark g_quark_try_string (const gchar *string); +-GQuark g_quark_from_static_string (const gchar *string); +-GQuark g_quark_from_string (const gchar *string); +-G_CONST_RETURN gchar* g_quark_to_string (GQuark quark) G_GNUC_CONST; ++GLIB_FUNC GQuark g_quark_try_string (const gchar *string); ++GLIB_FUNC GQuark g_quark_from_static_string (const gchar *string); ++GLIB_FUNC GQuark g_quark_from_string (const gchar *string); ++GLIB_FUNC G_CONST_RETURN gchar* g_quark_to_string (GQuark quark) G_GNUC_CONST; + + G_END_DECLS + +--- glib-2.4.6/glib/gqueue.h~visibility.patch ++++ glib-2.4.6/glib/gqueue.h +@@ -42,77 +42,77 @@ + + /* Queues + */ +-GQueue* g_queue_new (void); +-void g_queue_free (GQueue *queue); +-gboolean g_queue_is_empty (GQueue *queue); +-guint g_queue_get_length (GQueue *queue); +-void g_queue_reverse (GQueue *queue); +-GQueue * g_queue_copy (GQueue *queue); +-void g_queue_foreach (GQueue *queue, ++GLIB_FUNC GQueue* g_queue_new (void); ++GLIB_FUNC void g_queue_free (GQueue *queue); ++GLIB_FUNC gboolean g_queue_is_empty (GQueue *queue); ++GLIB_FUNC guint g_queue_get_length (GQueue *queue); ++GLIB_FUNC void g_queue_reverse (GQueue *queue); ++GLIB_FUNC GQueue * g_queue_copy (GQueue *queue); ++GLIB_FUNC void g_queue_foreach (GQueue *queue, + GFunc func, +- gpointer user_data); +-GList * g_queue_find (GQueue *queue, +- gconstpointer data); +-GList * g_queue_find_custom (GQueue *queue, ++ gpointer user_data);; ++GLIB_FUNC GList * g_queue_find (GQueue *queue, ++ gconstpointer data);; ++GLIB_FUNC GList * g_queue_find_custom (GQueue *queue, + gconstpointer data, +- GCompareFunc func); +-void g_queue_sort (GQueue *queue, ++ GCompareFunc func);; ++GLIB_FUNC void g_queue_sort (GQueue *queue, + GCompareDataFunc compare_func, +- gpointer user_data); ++ gpointer user_data);; + +-void g_queue_push_head (GQueue *queue, +- gpointer data); +-void g_queue_push_tail (GQueue *queue, +- gpointer data); +-void g_queue_push_nth (GQueue *queue, ++GLIB_FUNC void g_queue_push_head (GQueue *queue, ++ gpointer data);; ++GLIB_FUNC void g_queue_push_tail (GQueue *queue, ++ gpointer data);; ++GLIB_FUNC void g_queue_push_nth (GQueue *queue, + gpointer data, +- gint n); +-gpointer g_queue_pop_head (GQueue *queue); +-gpointer g_queue_pop_tail (GQueue *queue); +-gpointer g_queue_pop_nth (GQueue *queue, +- guint n); +-gpointer g_queue_peek_head (GQueue *queue); +-gpointer g_queue_peek_tail (GQueue *queue); +-gpointer g_queue_peek_nth (GQueue *queue, +- guint n); +-gint g_queue_index (GQueue *queue, +- gconstpointer data); +-void g_queue_remove (GQueue *queue, +- gconstpointer data); +-void g_queue_remove_all (GQueue *queue, +- gconstpointer data); +-void g_queue_insert_before (GQueue *queue, ++ gint n);; ++GLIB_FUNC gpointer g_queue_pop_head (GQueue *queue); ++GLIB_FUNC gpointer g_queue_pop_tail (GQueue *queue); ++GLIB_FUNC gpointer g_queue_pop_nth (GQueue *queue, ++ guint n);; ++GLIB_FUNC gpointer g_queue_peek_head (GQueue *queue); ++GLIB_FUNC gpointer g_queue_peek_tail (GQueue *queue); ++GLIB_FUNC gpointer g_queue_peek_nth (GQueue *queue, ++ guint n);; ++GLIB_FUNC gint g_queue_index (GQueue *queue, ++ gconstpointer data);; ++GLIB_FUNC void g_queue_remove (GQueue *queue, ++ gconstpointer data);; ++GLIB_FUNC void g_queue_remove_all (GQueue *queue, ++ gconstpointer data);; ++GLIB_FUNC void g_queue_insert_before (GQueue *queue, + GList *sibling, +- gpointer data); +-void g_queue_insert_after (GQueue *queue, ++ gpointer data);; ++GLIB_FUNC void g_queue_insert_after (GQueue *queue, + GList *sibling, +- gpointer data); +-void g_queue_insert_sorted (GQueue *queue, ++ gpointer data);; ++GLIB_FUNC void g_queue_insert_sorted (GQueue *queue, + gpointer data, + GCompareDataFunc func, +- gpointer user_data); ++ gpointer user_data);; + +-void g_queue_push_head_link (GQueue *queue, +- GList *link_); +-void g_queue_push_tail_link (GQueue *queue, +- GList *link_); +-void g_queue_push_nth_link (GQueue *queue, ++GLIB_FUNC void g_queue_push_head_link (GQueue *queue, ++ GList *link_);; ++GLIB_FUNC void g_queue_push_tail_link (GQueue *queue, ++ GList *link_);; ++GLIB_FUNC void g_queue_push_nth_link (GQueue *queue, + gint n, +- GList *link_); +-GList* g_queue_pop_head_link (GQueue *queue); +-GList* g_queue_pop_tail_link (GQueue *queue); +-GList* g_queue_pop_nth_link (GQueue *queue, +- guint n); +-GList* g_queue_peek_head_link (GQueue *queue); +-GList* g_queue_peek_tail_link (GQueue *queue); +-GList* g_queue_peek_nth_link (GQueue *queue, +- guint n); +-gint g_queue_link_index (GQueue *queue, +- GList *link_); +-void g_queue_unlink (GQueue *queue, +- GList *link_); +-void g_queue_delete_link (GQueue *queue, +- GList *link_); ++ GList *link_);; ++GLIB_FUNC GList* g_queue_pop_head_link (GQueue *queue); ++GLIB_FUNC GList* g_queue_pop_tail_link (GQueue *queue); ++GLIB_FUNC GList* g_queue_pop_nth_link (GQueue *queue, ++ guint n);; ++GLIB_FUNC GList* g_queue_peek_head_link (GQueue *queue); ++GLIB_FUNC GList* g_queue_peek_tail_link (GQueue *queue); ++GLIB_FUNC GList* g_queue_peek_nth_link (GQueue *queue, ++ guint n);; ++GLIB_FUNC gint g_queue_link_index (GQueue *queue, ++ GList *link_);; ++GLIB_FUNC void g_queue_unlink (GQueue *queue, ++ GList *link_);; ++GLIB_FUNC void g_queue_delete_link (GQueue *queue, ++ GList *link_);; + + G_END_DECLS + +--- glib-2.4.6/glib/grand.h~visibility.patch ++++ glib-2.4.6/glib/grand.h +@@ -42,38 +42,38 @@ + * double_range -> [begin..end) + */ + +-GRand* g_rand_new_with_seed (guint32 seed); +-GRand* g_rand_new_with_seed_array (const guint32 *seed, +- guint seed_length); +-GRand* g_rand_new (void); +-void g_rand_free (GRand *rand_); +-GRand* g_rand_copy (GRand *rand_); +-void g_rand_set_seed (GRand *rand_, +- guint32 seed); +-void g_rand_set_seed_array (GRand *rand_, ++GLIB_FUNC GRand* g_rand_new_with_seed (guint32 seed); ++GLIB_FUNC GRand* g_rand_new_with_seed_array (const guint32 *seed, ++ guint seed_length);; ++GLIB_FUNC GRand* g_rand_new (void); ++GLIB_FUNC void g_rand_free (GRand *rand_); ++GLIB_FUNC GRand* g_rand_copy (GRand *rand_); ++GLIB_FUNC void g_rand_set_seed (GRand *rand_, ++ guint32 seed);; ++GLIB_FUNC void g_rand_set_seed_array (GRand *rand_, + const guint32 *seed, +- guint seed_length); ++ guint seed_length);; + + #define g_rand_boolean(rand_) ((g_rand_int (rand_) & (1 << 15)) != 0) + +-guint32 g_rand_int (GRand *rand_); +-gint32 g_rand_int_range (GRand *rand_, ++GLIB_FUNC guint32 g_rand_int (GRand *rand_); ++GLIB_FUNC gint32 g_rand_int_range (GRand *rand_, + gint32 begin, +- gint32 end); +-gdouble g_rand_double (GRand *rand_); +-gdouble g_rand_double_range (GRand *rand_, ++ gint32 end);; ++GLIB_FUNC gdouble g_rand_double (GRand *rand_); ++GLIB_FUNC gdouble g_rand_double_range (GRand *rand_, + gdouble begin, +- gdouble end); +-void g_random_set_seed (guint32 seed); ++ gdouble end);; ++GLIB_FUNC void g_random_set_seed (guint32 seed); + + #define g_random_boolean() ((g_random_int () & (1 << 15)) != 0) + +-guint32 g_random_int (void); +-gint32 g_random_int_range (gint32 begin, +- gint32 end); +-gdouble g_random_double (void); +-gdouble g_random_double_range (gdouble begin, +- gdouble end); ++GLIB_FUNC guint32 g_random_int (void); ++GLIB_FUNC gint32 g_random_int_range (gint32 begin, ++ gint32 end);; ++GLIB_FUNC gdouble g_random_double (void); ++GLIB_FUNC gdouble g_random_double_range (gdouble begin, ++ gdouble end);; + + + G_END_DECLS +--- glib-2.4.6/glib/grel.h~visibility.patch ++++ glib-2.4.6/glib/grel.h +@@ -62,31 +62,31 @@ + * g_relation_count() counts ... + */ + +-GRelation* g_relation_new (gint fields); +-void g_relation_destroy (GRelation *relation); +-void g_relation_index (GRelation *relation, ++GLIB_FUNC GRelation* g_relation_new (gint fields); ++GLIB_FUNC void g_relation_destroy (GRelation *relation); ++GLIB_FUNC void g_relation_index (GRelation *relation, + gint field, + GHashFunc hash_func, +- GEqualFunc key_equal_func); +-void g_relation_insert (GRelation *relation, +- ...); +-gint g_relation_delete (GRelation *relation, ++ GEqualFunc key_equal_func);; ++GLIB_FUNC void g_relation_insert (GRelation *relation, ++ ...);; ++GLIB_FUNC gint g_relation_delete (GRelation *relation, + gconstpointer key, +- gint field); +-GTuples* g_relation_select (GRelation *relation, ++ gint field);; ++GLIB_FUNC GTuples* g_relation_select (GRelation *relation, + gconstpointer key, +- gint field); +-gint g_relation_count (GRelation *relation, ++ gint field);; ++GLIB_FUNC gint g_relation_count (GRelation *relation, + gconstpointer key, +- gint field); +-gboolean g_relation_exists (GRelation *relation, +- ...); +-void g_relation_print (GRelation *relation); ++ gint field);; ++GLIB_FUNC gboolean g_relation_exists (GRelation *relation, ++ ...);; ++GLIB_FUNC void g_relation_print (GRelation *relation); + +-void g_tuples_destroy (GTuples *tuples); +-gpointer g_tuples_index (GTuples *tuples, ++GLIB_FUNC void g_tuples_destroy (GTuples *tuples); ++GLIB_FUNC gpointer g_tuples_index (GTuples *tuples, + gint index_, +- gint field); ++ gint field);; + + G_END_DECLS + +--- glib-2.4.6/glib/gscanner.h~visibility.patch ++++ glib-2.4.6/glib/gscanner.h +@@ -201,52 +201,52 @@ + GScannerMsgFunc msg_handler; + }; + +-GScanner* g_scanner_new (const GScannerConfig *config_templ); +-void g_scanner_destroy (GScanner *scanner); +-void g_scanner_input_file (GScanner *scanner, +- gint input_fd); +-void g_scanner_sync_file_offset (GScanner *scanner); +-void g_scanner_input_text (GScanner *scanner, ++GLIB_FUNC GScanner* g_scanner_new (const GScannerConfig *config_templ); ++GLIB_FUNC void g_scanner_destroy (GScanner *scanner); ++GLIB_FUNC void g_scanner_input_file (GScanner *scanner, ++ gint input_fd);; ++GLIB_FUNC void g_scanner_sync_file_offset (GScanner *scanner); ++GLIB_FUNC void g_scanner_input_text (GScanner *scanner, + const gchar *text, +- guint text_len); +-GTokenType g_scanner_get_next_token (GScanner *scanner); +-GTokenType g_scanner_peek_next_token (GScanner *scanner); +-GTokenType g_scanner_cur_token (GScanner *scanner); +-GTokenValue g_scanner_cur_value (GScanner *scanner); +-guint g_scanner_cur_line (GScanner *scanner); +-guint g_scanner_cur_position (GScanner *scanner); +-gboolean g_scanner_eof (GScanner *scanner); +-guint g_scanner_set_scope (GScanner *scanner, +- guint scope_id); +-void g_scanner_scope_add_symbol (GScanner *scanner, ++ guint text_len);; ++GLIB_FUNC GTokenType g_scanner_get_next_token (GScanner *scanner); ++GLIB_FUNC GTokenType g_scanner_peek_next_token (GScanner *scanner); ++GLIB_FUNC GTokenType g_scanner_cur_token (GScanner *scanner); ++GLIB_FUNC GTokenValue g_scanner_cur_value (GScanner *scanner); ++GLIB_FUNC guint g_scanner_cur_line (GScanner *scanner); ++GLIB_FUNC guint g_scanner_cur_position (GScanner *scanner); ++GLIB_FUNC gboolean g_scanner_eof (GScanner *scanner); ++GLIB_FUNC guint g_scanner_set_scope (GScanner *scanner, ++ guint scope_id);; ++GLIB_FUNC void g_scanner_scope_add_symbol (GScanner *scanner, + guint scope_id, + const gchar *symbol, +- gpointer value); +-void g_scanner_scope_remove_symbol (GScanner *scanner, ++ gpointer value);; ++GLIB_FUNC void g_scanner_scope_remove_symbol (GScanner *scanner, + guint scope_id, +- const gchar *symbol); +-gpointer g_scanner_scope_lookup_symbol (GScanner *scanner, ++ const gchar *symbol);; ++GLIB_FUNC gpointer g_scanner_scope_lookup_symbol (GScanner *scanner, + guint scope_id, +- const gchar *symbol); +-void g_scanner_scope_foreach_symbol (GScanner *scanner, ++ const gchar *symbol);; ++GLIB_FUNC void g_scanner_scope_foreach_symbol (GScanner *scanner, + guint scope_id, + GHFunc func, +- gpointer user_data); +-gpointer g_scanner_lookup_symbol (GScanner *scanner, +- const gchar *symbol); +-void g_scanner_unexp_token (GScanner *scanner, ++ gpointer user_data);; ++GLIB_FUNC gpointer g_scanner_lookup_symbol (GScanner *scanner, ++ const gchar *symbol);; ++GLIB_FUNC void g_scanner_unexp_token (GScanner *scanner, + GTokenType expected_token, + const gchar *identifier_spec, + const gchar *symbol_spec, + const gchar *symbol_name, + const gchar *message, +- gint is_error); +-void g_scanner_error (GScanner *scanner, ++ gint is_error);; ++GLIB_FUNC void g_scanner_error (GScanner *scanner, + const gchar *format, +- ...) G_GNUC_PRINTF (2,3); +-void g_scanner_warn (GScanner *scanner, ++ ...) G_GNUC_PRINTF (2,3);; ++GLIB_FUNC void g_scanner_warn (GScanner *scanner, + const gchar *format, +- ...) G_GNUC_PRINTF (2,3); ++ ...) G_GNUC_PRINTF (2,3);; + + #ifndef G_DISABLE_DEPRECATED + +--- glib-2.4.6/glib/gshell.h~visibility.patch ++++ glib-2.4.6/glib/gshell.h +@@ -36,15 +36,15 @@ + G_SHELL_ERROR_FAILED + } GShellError; + +-GQuark g_shell_error_quark (void); ++GLIB_FUNC GQuark g_shell_error_quark (void); + +-gchar* g_shell_quote (const gchar *unquoted_string); +-gchar* g_shell_unquote (const gchar *quoted_string, +- GError **error); +-gboolean g_shell_parse_argv (const gchar *command_line, ++GLIB_FUNC gchar* g_shell_quote (const gchar *unquoted_string); ++GLIB_FUNC gchar* g_shell_unquote (const gchar *quoted_string, ++ GError **error);; ++GLIB_FUNC gboolean g_shell_parse_argv (const gchar *command_line, + gint *argcp, + gchar ***argvp, +- GError **error); ++ GError **error);; + + G_END_DECLS + +--- glib-2.4.6/glib/gslist.h~visibility.patch ++++ glib-2.4.6/glib/gslist.h +@@ -41,59 +41,59 @@ + + /* Singly linked lists + */ +-void g_slist_push_allocator (GAllocator *allocator); +-void g_slist_pop_allocator (void); +-GSList* g_slist_alloc (void); +-void g_slist_free (GSList *list); +-void g_slist_free_1 (GSList *list); +-GSList* g_slist_append (GSList *list, +- gpointer data); +-GSList* g_slist_prepend (GSList *list, +- gpointer data); +-GSList* g_slist_insert (GSList *list, ++GLIB_FUNC void g_slist_push_allocator (GAllocator *allocator); ++GLIB_FUNC void g_slist_pop_allocator (void); ++GLIB_FUNC GSList* g_slist_alloc (void); ++GLIB_FUNC void g_slist_free (GSList *list); ++GLIB_FUNC void g_slist_free_1 (GSList *list); ++GLIB_FUNC GSList* g_slist_append (GSList *list, ++ gpointer data);; ++GLIB_FUNC GSList* g_slist_prepend (GSList *list, ++ gpointer data);; ++GLIB_FUNC GSList* g_slist_insert (GSList *list, + gpointer data, +- gint position); +-GSList* g_slist_insert_sorted (GSList *list, ++ gint position);; ++GLIB_FUNC GSList* g_slist_insert_sorted (GSList *list, + gpointer data, +- GCompareFunc func); +-GSList* g_slist_insert_before (GSList *slist, ++ GCompareFunc func);; ++GLIB_FUNC GSList* g_slist_insert_before (GSList *slist, + GSList *sibling, +- gpointer data); +-GSList* g_slist_concat (GSList *list1, +- GSList *list2); +-GSList* g_slist_remove (GSList *list, +- gconstpointer data); +-GSList* g_slist_remove_all (GSList *list, +- gconstpointer data); +-GSList* g_slist_remove_link (GSList *list, +- GSList *link_); +-GSList* g_slist_delete_link (GSList *list, +- GSList *link_); +-GSList* g_slist_reverse (GSList *list); +-GSList* g_slist_copy (GSList *list); +-GSList* g_slist_nth (GSList *list, +- guint n); +-GSList* g_slist_find (GSList *list, +- gconstpointer data); +-GSList* g_slist_find_custom (GSList *list, ++ gpointer data);; ++GLIB_FUNC GSList* g_slist_concat (GSList *list1, ++ GSList *list2);; ++GLIB_FUNC GSList* g_slist_remove (GSList *list, ++ gconstpointer data);; ++GLIB_FUNC GSList* g_slist_remove_all (GSList *list, ++ gconstpointer data);; ++GLIB_FUNC GSList* g_slist_remove_link (GSList *list, ++ GSList *link_);; ++GLIB_FUNC GSList* g_slist_delete_link (GSList *list, ++ GSList *link_);; ++GLIB_FUNC GSList* g_slist_reverse (GSList *list); ++GLIB_FUNC GSList* g_slist_copy (GSList *list); ++GLIB_FUNC GSList* g_slist_nth (GSList *list, ++ guint n);; ++GLIB_FUNC GSList* g_slist_find (GSList *list, ++ gconstpointer data);; ++GLIB_FUNC GSList* g_slist_find_custom (GSList *list, + gconstpointer data, +- GCompareFunc func); +-gint g_slist_position (GSList *list, +- GSList *llink); +-gint g_slist_index (GSList *list, +- gconstpointer data); +-GSList* g_slist_last (GSList *list); +-guint g_slist_length (GSList *list); +-void g_slist_foreach (GSList *list, ++ GCompareFunc func);; ++GLIB_FUNC gint g_slist_position (GSList *list, ++ GSList *llink);; ++GLIB_FUNC gint g_slist_index (GSList *list, ++ gconstpointer data);; ++GLIB_FUNC GSList* g_slist_last (GSList *list); ++GLIB_FUNC guint g_slist_length (GSList *list); ++GLIB_FUNC void g_slist_foreach (GSList *list, + GFunc func, +- gpointer user_data); +-GSList* g_slist_sort (GSList *list, +- GCompareFunc compare_func); +-GSList* g_slist_sort_with_data (GSList *list, ++ gpointer user_data);; ++GLIB_FUNC GSList* g_slist_sort (GSList *list, ++ GCompareFunc compare_func);; ++GLIB_FUNC GSList* g_slist_sort_with_data (GSList *list, + GCompareDataFunc compare_func, +- gpointer user_data); +-gpointer g_slist_nth_data (GSList *list, +- guint n); ++ gpointer user_data);; ++GLIB_FUNC gpointer g_slist_nth_data (GSList *list, ++ guint n);; + #define g_slist_next(slist) ((slist) ? (((GSList *)(slist))->next) : NULL) + + G_END_DECLS +--- glib-2.4.6/glib/gspawn.h~visibility.patch ++++ glib-2.4.6/glib/gspawn.h +@@ -69,22 +69,22 @@ + G_SPAWN_FILE_AND_ARGV_ZERO = 1 << 6 + } GSpawnFlags; + +-GQuark g_spawn_error_quark (void); ++GLIB_FUNC GQuark g_spawn_error_quark (void); + +-gboolean g_spawn_async (const gchar *working_directory, ++GLIB_FUNC gboolean g_spawn_async (const gchar *working_directory, + gchar **argv, + gchar **envp, + GSpawnFlags flags, + GSpawnChildSetupFunc child_setup, + gpointer user_data, + GPid *child_pid, +- GError **error); ++ GError **error);; + + + /* Opens pipes for non-NULL standard_output, standard_input, standard_error, + * and returns the parent's end of the pipes. + */ +-gboolean g_spawn_async_with_pipes (const gchar *working_directory, ++GLIB_FUNC gboolean g_spawn_async_with_pipes (const gchar *working_directory, + gchar **argv, + gchar **envp, + GSpawnFlags flags, +@@ -94,14 +94,14 @@ + gint *standard_input, + gint *standard_output, + gint *standard_error, +- GError **error); ++ GError **error);; + + + /* If standard_output or standard_error are non-NULL, the full + * standard output or error of the command will be placed there. + */ + +-gboolean g_spawn_sync (const gchar *working_directory, ++GLIB_FUNC gboolean g_spawn_sync (const gchar *working_directory, + gchar **argv, + gchar **envp, + GSpawnFlags flags, +@@ -110,17 +110,17 @@ + gchar **standard_output, + gchar **standard_error, + gint *exit_status, +- GError **error); ++ GError **error);; + +-gboolean g_spawn_command_line_sync (const gchar *command_line, ++GLIB_FUNC gboolean g_spawn_command_line_sync (const gchar *command_line, + gchar **standard_output, + gchar **standard_error, + gint *exit_status, +- GError **error); +-gboolean g_spawn_command_line_async (const gchar *command_line, +- GError **error); ++ GError **error);; ++GLIB_FUNC gboolean g_spawn_command_line_async (const gchar *command_line, ++ GError **error);; + +-void g_spawn_close_pid (GPid pid); ++GLIB_FUNC void g_spawn_close_pid (GPid pid); + + + G_END_DECLS +--- glib-2.4.6/glib/gstrfuncs.h~visibility.patch ++++ glib-2.4.6/glib/gstrfuncs.h +@@ -82,82 +82,82 @@ + #define g_ascii_isxdigit(c) \ + ((g_ascii_table[(guchar) (c)] & G_ASCII_XDIGIT) != 0) + +-gchar g_ascii_tolower (gchar c) G_GNUC_CONST; +-gchar g_ascii_toupper (gchar c) G_GNUC_CONST; ++GLIB_FUNC gchar g_ascii_tolower (gchar c) G_GNUC_CONST;; ++GLIB_FUNC gchar g_ascii_toupper (gchar c) G_GNUC_CONST;; + +-gint g_ascii_digit_value (gchar c) G_GNUC_CONST; +-gint g_ascii_xdigit_value (gchar c) G_GNUC_CONST; ++GLIB_FUNC gint g_ascii_digit_value (gchar c) G_GNUC_CONST;; ++GLIB_FUNC gint g_ascii_xdigit_value (gchar c) G_GNUC_CONST;; + + /* String utility functions that modify a string argument or + * return a constant string that must not be freed. + */ + #define G_STR_DELIMITERS "_-|> <." +-gchar* g_strdelimit (gchar *string, ++GLIB_FUNC gchar* g_strdelimit (gchar *string, + const gchar *delimiters, +- gchar new_delimiter); +-gchar* g_strcanon (gchar *string, ++ gchar new_delimiter);; ++GLIB_FUNC gchar* g_strcanon (gchar *string, + const gchar *valid_chars, +- gchar substitutor); +-G_CONST_RETURN gchar* g_strerror (gint errnum) G_GNUC_CONST; +-G_CONST_RETURN gchar* g_strsignal (gint signum) G_GNUC_CONST; +-gchar* g_strreverse (gchar *string); +-gsize g_strlcpy (gchar *dest, ++ gchar substitutor);; ++GLIB_FUNC G_CONST_RETURN gchar* g_strerror (gint errnum) G_GNUC_CONST; ++GLIB_FUNC G_CONST_RETURN gchar* g_strsignal (gint signum) G_GNUC_CONST; ++GLIB_FUNC gchar* g_strreverse (gchar *string); ++GLIB_FUNC gsize g_strlcpy (gchar *dest, + const gchar *src, +- gsize dest_size); +-gsize g_strlcat (gchar *dest, ++ gsize dest_size);; ++GLIB_FUNC gsize g_strlcat (gchar *dest, + const gchar *src, +- gsize dest_size); +-gchar * g_strstr_len (const gchar *haystack, ++ gsize dest_size);; ++GLIB_FUNC gchar * g_strstr_len (const gchar *haystack, + gssize haystack_len, +- const gchar *needle); +-gchar * g_strrstr (const gchar *haystack, +- const gchar *needle); +-gchar * g_strrstr_len (const gchar *haystack, ++ const gchar *needle);; ++GLIB_FUNC gchar * g_strrstr (const gchar *haystack, ++ const gchar *needle);; ++GLIB_FUNC gchar * g_strrstr_len (const gchar *haystack, + gssize haystack_len, +- const gchar *needle); ++ const gchar *needle);; + +-gboolean g_str_has_suffix (const gchar *str, +- const gchar *suffix); +-gboolean g_str_has_prefix (const gchar *str, +- const gchar *prefix); ++GLIB_FUNC gboolean g_str_has_suffix (const gchar *str, ++ const gchar *suffix);; ++GLIB_FUNC gboolean g_str_has_prefix (const gchar *str, ++ const gchar *prefix);; + + /* String to/from double conversion functions */ + +-gdouble g_strtod (const gchar *nptr, +- gchar **endptr); +-gdouble g_ascii_strtod (const gchar *nptr, +- gchar **endptr); +-guint64 g_ascii_strtoull (const gchar *nptr, ++GLIB_FUNC gdouble g_strtod (const gchar *nptr, ++ gchar **endptr);; ++GLIB_FUNC gdouble g_ascii_strtod (const gchar *nptr, ++ gchar **endptr);; ++GLIB_FUNC guint64 g_ascii_strtoull (const gchar *nptr, + gchar **endptr, +- guint base); ++ guint base);; + /* 29 bytes should enough for all possible values that + * g_ascii_dtostr can produce. + * Then add 10 for good measure */ + #define G_ASCII_DTOSTR_BUF_SIZE (29 + 10) +-gchar * g_ascii_dtostr (gchar *buffer, ++GLIB_FUNC gchar * g_ascii_dtostr (gchar *buffer, + gint buf_len, +- gdouble d); +-gchar * g_ascii_formatd (gchar *buffer, ++ gdouble d);; ++GLIB_FUNC gchar * g_ascii_formatd (gchar *buffer, + gint buf_len, + const gchar *format, +- gdouble d); ++ gdouble d);; + + /* removes leading spaces */ +-gchar* g_strchug (gchar *string); ++GLIB_FUNC gchar* g_strchug (gchar *string); + /* removes trailing spaces */ +-gchar* g_strchomp (gchar *string); ++GLIB_FUNC gchar* g_strchomp (gchar *string); + /* removes leading & trailing spaces */ + #define g_strstrip( string ) g_strchomp (g_strchug (string)) + +-gint g_ascii_strcasecmp (const gchar *s1, +- const gchar *s2); +-gint g_ascii_strncasecmp (const gchar *s1, ++GLIB_FUNC gint g_ascii_strcasecmp (const gchar *s1, ++ const gchar *s2);; ++GLIB_FUNC gint g_ascii_strncasecmp (const gchar *s1, + const gchar *s2, +- gsize n); +-gchar* g_ascii_strdown (const gchar *str, +- gssize len); +-gchar* g_ascii_strup (const gchar *str, +- gssize len); ++ gsize n);; ++GLIB_FUNC gchar* g_ascii_strdown (const gchar *str, ++ gssize len);; ++GLIB_FUNC gchar* g_ascii_strup (const gchar *str, ++ gssize len);; + + #ifndef G_DISABLE_DEPRECATED + +@@ -166,37 +166,37 @@ + * toupper, which is almost never the right thing. + */ + +-gint g_strcasecmp (const gchar *s1, +- const gchar *s2); +-gint g_strncasecmp (const gchar *s1, ++GLIB_FUNC gint g_strcasecmp (const gchar *s1, ++ const gchar *s2);; ++GLIB_FUNC gint g_strncasecmp (const gchar *s1, + const gchar *s2, +- guint n); +-gchar* g_strdown (gchar *string); +-gchar* g_strup (gchar *string); ++ guint n);; ++GLIB_FUNC gchar* g_strdown (gchar *string); ++GLIB_FUNC gchar* g_strup (gchar *string); + + #endif /* G_DISABLE_DEPRECATED */ + + /* String utility functions that return a newly allocated string which + * ought to be freed with g_free from the caller at some point. + */ +-gchar* g_strdup (const gchar *str); +-gchar* g_strdup_printf (const gchar *format, +- ...) G_GNUC_PRINTF (1, 2); +-gchar* g_strdup_vprintf (const gchar *format, +- va_list args); +-gchar* g_strndup (const gchar *str, +- gsize n); +-gchar* g_strnfill (gsize length, +- gchar fill_char); +-gchar* g_strconcat (const gchar *string1, +- ...); /* NULL terminated */ +-gchar* g_strjoin (const gchar *separator, +- ...); /* NULL terminated */ ++GLIB_FUNC gchar* g_strdup (const gchar *str); ++GLIB_FUNC gchar* g_strdup_printf (const gchar *format, ++ ...) G_GNUC_PRINTF (1, 2);; ++GLIB_FUNC gchar* g_strdup_vprintf (const gchar *format, ++ va_list args);; ++GLIB_FUNC gchar* g_strndup (const gchar *str, ++ gsize n);; ++GLIB_FUNC gchar* g_strnfill (gsize length, ++ gchar fill_char);; ++GLIB_FUNC gchar* g_strconcat (const gchar *string1, ++ ...);; /* NULL terminated */ ++GLIB_FUNC gchar* g_strjoin (const gchar *separator, ++ ...);; /* NULL terminated */ + /* Make a copy of a string interpreting C string -style escape + * sequences. Inverse of g_strescape. The recognized sequences are \b + * \f \n \r \t \\ \" and the octal format. + */ +-gchar* g_strcompress (const gchar *source); ++GLIB_FUNC gchar* g_strcompress (const gchar *source); + + /* Copy a string escaping nonprintable characters like in C strings. + * Inverse of g_strcompress. The exceptions parameter, if non-NULL, points +@@ -206,11 +206,11 @@ + * Luckily this function wasn't used much, using NULL as second parameter + * provides mostly identical semantics. + */ +-gchar* g_strescape (const gchar *source, +- const gchar *exceptions); ++GLIB_FUNC gchar* g_strescape (const gchar *source, ++ const gchar *exceptions);; + +-gpointer g_memdup (gconstpointer mem, +- guint byte_size); ++GLIB_FUNC gpointer g_memdup (gconstpointer mem, ++ guint byte_size);; + + /* NULL terminated string arrays. + * g_strsplit(), g_strsplit_set() split up string into max_tokens tokens +@@ -220,21 +220,21 @@ + * g_strfreev() frees the array itself and all of its strings. + * g_strdupv() copies a NULL-terminated array of strings + */ +-gchar** g_strsplit (const gchar *string, ++GLIB_FUNC gchar** g_strsplit (const gchar *string, + const gchar *delimiter, +- gint max_tokens); +-gchar ** g_strsplit_set (const gchar *string, ++ gint max_tokens);; ++GLIB_FUNC gchar ** g_strsplit_set (const gchar *string, + const gchar *delimiters, +- gint max_tokens); +-gchar* g_strjoinv (const gchar *separator, +- gchar **str_array); +-void g_strfreev (gchar **str_array); +-gchar** g_strdupv (gchar **str_array); ++ gint max_tokens);; ++GLIB_FUNC gchar* g_strjoinv (const gchar *separator, ++ gchar **str_array);; ++GLIB_FUNC void g_strfreev (gchar **str_array); ++GLIB_FUNC gchar** g_strdupv (gchar **str_array); + +-gchar* g_stpcpy (gchar *dest, +- const char *src); ++GLIB_FUNC gchar* g_stpcpy (gchar *dest, ++ const char *src);; + +-G_CONST_RETURN gchar *g_strip_context (const gchar *msgid, ++GLIB_FUNC G_CONST_RETURN gchar *g_strip_context (const gchar *msgid, + const gchar *msgval); + + G_END_DECLS +--- glib-2.4.6/glib/gstring.h~visibility.patch ++++ glib-2.4.6/glib/gstring.h +@@ -45,76 +45,76 @@ + + /* String Chunks + */ +-GStringChunk* g_string_chunk_new (gsize size); +-void g_string_chunk_free (GStringChunk *chunk); +-gchar* g_string_chunk_insert (GStringChunk *chunk, +- const gchar *string); +-gchar* g_string_chunk_insert_len (GStringChunk *chunk, ++GLIB_FUNC GStringChunk* g_string_chunk_new (gsize size); ++GLIB_FUNC void g_string_chunk_free (GStringChunk *chunk); ++GLIB_FUNC gchar* g_string_chunk_insert (GStringChunk *chunk, ++ const gchar *string);; ++GLIB_FUNC gchar* g_string_chunk_insert_len (GStringChunk *chunk, + const gchar *string, +- gssize len); +-gchar* g_string_chunk_insert_const (GStringChunk *chunk, +- const gchar *string); ++ gssize len);; ++GLIB_FUNC gchar* g_string_chunk_insert_const (GStringChunk *chunk, ++ const gchar *string);; + + + /* Strings + */ +-GString* g_string_new (const gchar *init); +-GString* g_string_new_len (const gchar *init, +- gssize len); +-GString* g_string_sized_new (gsize dfl_size); +-gchar* g_string_free (GString *string, +- gboolean free_segment); +-gboolean g_string_equal (const GString *v, +- const GString *v2); +-guint g_string_hash (const GString *str); +-GString* g_string_assign (GString *string, +- const gchar *rval); +-GString* g_string_truncate (GString *string, +- gsize len); +-GString* g_string_set_size (GString *string, +- gsize len); +-GString* g_string_insert_len (GString *string, ++GLIB_FUNC GString* g_string_new (const gchar *init); ++GLIB_FUNC GString* g_string_new_len (const gchar *init, ++ gssize len);; ++GLIB_FUNC GString* g_string_sized_new (gsize dfl_size); ++GLIB_FUNC gchar* g_string_free (GString *string, ++ gboolean free_segment);; ++GLIB_FUNC gboolean g_string_equal (const GString *v, ++ const GString *v2);; ++GLIB_FUNC guint g_string_hash (const GString *str); ++GLIB_FUNC GString* g_string_assign (GString *string, ++ const gchar *rval);; ++GLIB_FUNC GString* g_string_truncate (GString *string, ++ gsize len);; ++GLIB_FUNC GString* g_string_set_size (GString *string, ++ gsize len);; ++GLIB_FUNC GString* g_string_insert_len (GString *string, + gssize pos, + const gchar *val, +- gssize len); +-GString* g_string_append (GString *string, +- const gchar *val); +-GString* g_string_append_len (GString *string, ++ gssize len);; ++GLIB_FUNC GString* g_string_append (GString *string, ++ const gchar *val);; ++GLIB_FUNC GString* g_string_append_len (GString *string, + const gchar *val, +- gssize len); +-GString* g_string_append_c (GString *string, +- gchar c); +-GString* g_string_append_unichar (GString *string, +- gunichar wc); +-GString* g_string_prepend (GString *string, +- const gchar *val); +-GString* g_string_prepend_c (GString *string, +- gchar c); +-GString* g_string_prepend_unichar (GString *string, +- gunichar wc); +-GString* g_string_prepend_len (GString *string, ++ gssize len);; ++GLIB_FUNC GString* g_string_append_c (GString *string, ++ gchar c);; ++GLIB_FUNC GString* g_string_append_unichar (GString *string, ++ gunichar wc);; ++GLIB_FUNC GString* g_string_prepend (GString *string, ++ const gchar *val);; ++GLIB_FUNC GString* g_string_prepend_c (GString *string, ++ gchar c);; ++GLIB_FUNC GString* g_string_prepend_unichar (GString *string, ++ gunichar wc);; ++GLIB_FUNC GString* g_string_prepend_len (GString *string, + const gchar *val, +- gssize len); +-GString* g_string_insert (GString *string, ++ gssize len);; ++GLIB_FUNC GString* g_string_insert (GString *string, + gssize pos, +- const gchar *val); +-GString* g_string_insert_c (GString *string, ++ const gchar *val);; ++GLIB_FUNC GString* g_string_insert_c (GString *string, + gssize pos, +- gchar c); +-GString* g_string_insert_unichar (GString *string, ++ gchar c);; ++GLIB_FUNC GString* g_string_insert_unichar (GString *string, + gssize pos, +- gunichar wc); +-GString* g_string_erase (GString *string, ++ gunichar wc);; ++GLIB_FUNC GString* g_string_erase (GString *string, + gssize pos, +- gssize len); +-GString* g_string_ascii_down (GString *string); +-GString* g_string_ascii_up (GString *string); +-void g_string_printf (GString *string, ++ gssize len);; ++GLIB_FUNC GString* g_string_ascii_down (GString *string); ++GLIB_FUNC GString* g_string_ascii_up (GString *string); ++GLIB_FUNC void g_string_printf (GString *string, + const gchar *format, +- ...) G_GNUC_PRINTF (2, 3); +-void g_string_append_printf (GString *string, ++ ...) G_GNUC_PRINTF (2, 3);; ++GLIB_FUNC void g_string_append_printf (GString *string, + const gchar *format, +- ...) G_GNUC_PRINTF (2, 3); ++ ...) G_GNUC_PRINTF (2, 3);; + + /* -- optimize g_strig_append_c --- */ + #ifdef G_CAN_INLINE +@@ -127,8 +127,8 @@ + gstring->str[gstring->len++] = c; + gstring->str[gstring->len] = 0; + } +- else +- g_string_insert_c (gstring, -1, c); ++else ++ g_string_insert_c (gstring, -1, c);;;; + return gstring; + } + #define g_string_append_c(gstr,c) g_string_append_c_inline (gstr, c) +@@ -142,8 +142,8 @@ + * toupper, which is almost never the right thing. + */ + +-GString* g_string_down (GString *string); +-GString* g_string_up (GString *string); ++GLIB_FUNC GString* g_string_down (GString *string); ++GLIB_FUNC GString* g_string_up (GString *string); + + /* These aliases are included for compatibility. */ + #define g_string_sprintf g_string_printf +--- glib-2.4.6/glib/gthread.h~visibility.patch ++++ glib-2.4.6/glib/gthread.h +@@ -36,7 +36,7 @@ + /* GLib Thread support + */ + +-extern GQuark g_thread_error_quark (void); ++GLIB_FUNC extern GQuark g_thread_error_quark (void); + #define G_THREAD_ERROR g_thread_error_quark () + + typedef enum +@@ -116,7 +116,7 @@ + * only be called once, and must not be called directly or indirectly + * from another glib-function, e.g. as a callback. + */ +-void g_thread_init (GThreadFunctions *vtable); ++GLIB_FUNC void g_thread_init (GThreadFunctions *vtable); + + /* Errorcheck mutexes. If you define G_ERRORCHECK_MUTEXES, then all + * mutexes will check for re-locking and re-unlocking */ +@@ -125,7 +125,7 @@ + * NULL. Do not call directly. Use #define G_ERRORCHECK_MUTEXES + * instead. + */ +-void g_thread_init_with_errorcheck_mutexes (GThreadFunctions* vtable); ++GLIB_FUNC void g_thread_init_with_errorcheck_mutexes (GThreadFunctions* vtable); + + /* A random number to recognize debug calls to g_mutex_... */ + #define G_MUTEX_DEBUG_MAGIC 0xf8e18ad7 +@@ -135,7 +135,7 @@ + #endif + + /* internal function for fallback static mutex implementation */ +-GMutex* g_static_mutex_get_mutex_impl (GMutex **mutex); ++GLIB_FUNC GMutex* g_static_mutex_get_mutex_impl (GMutex **mutex); + + #define g_static_mutex_get_mutex_impl_shortcut(mutex) \ + (g_atomic_pointer_get ((gpointer*)mutex) ? *(mutex) : \ +@@ -205,19 +205,19 @@ + (g_thread_create_full (func, data, 0, joinable, FALSE, \ + G_THREAD_PRIORITY_NORMAL, error)) + +-GThread* g_thread_create_full (GThreadFunc func, ++GLIB_FUNC GThread* g_thread_create_full (GThreadFunc func, + gpointer data, + gulong stack_size, + gboolean joinable, + gboolean bound, + GThreadPriority priority, +- GError **error); +-GThread* g_thread_self (void); +-void g_thread_exit (gpointer retval); +-gpointer g_thread_join (GThread *thread); ++ GError **error);; ++GLIB_FUNC GThread* g_thread_self (void); ++GLIB_FUNC void g_thread_exit (gpointer retval); ++GLIB_FUNC gpointer g_thread_join (GThread *thread); + +-void g_thread_set_priority (GThread *thread, +- GThreadPriority priority); ++GLIB_FUNC void g_thread_set_priority (GThread *thread, ++ GThreadPriority priority);; + + /* GStaticMutexes can be statically initialized with the value + * G_STATIC_MUTEX_INIT, and then they can directly be used, that is +@@ -230,8 +230,8 @@ + g_mutex_trylock (g_static_mutex_get_mutex (mutex)) + #define g_static_mutex_unlock(mutex) \ + g_mutex_unlock (g_static_mutex_get_mutex (mutex)) +-void g_static_mutex_init (GStaticMutex *mutex); +-void g_static_mutex_free (GStaticMutex *mutex); ++GLIB_FUNC void g_static_mutex_init (GStaticMutex *mutex); ++GLIB_FUNC void g_static_mutex_free (GStaticMutex *mutex); + + struct _GStaticPrivate + { +@@ -239,12 +239,12 @@ + guint index; + }; + #define G_STATIC_PRIVATE_INIT { 0 } +-void g_static_private_init (GStaticPrivate *private_key); +-gpointer g_static_private_get (GStaticPrivate *private_key); +-void g_static_private_set (GStaticPrivate *private_key, ++GLIB_FUNC void g_static_private_init (GStaticPrivate *private_key); ++GLIB_FUNC gpointer g_static_private_get (GStaticPrivate *private_key); ++GLIB_FUNC void g_static_private_set (GStaticPrivate *private_key, + gpointer data, +- GDestroyNotify notify); +-void g_static_private_free (GStaticPrivate *private_key); ++ GDestroyNotify notify);; ++GLIB_FUNC void g_static_private_free (GStaticPrivate *private_key); + + typedef struct _GStaticRecMutex GStaticRecMutex; + struct _GStaticRecMutex +@@ -256,14 +256,14 @@ + }; + + #define G_STATIC_REC_MUTEX_INIT { G_STATIC_MUTEX_INIT } +-void g_static_rec_mutex_init (GStaticRecMutex *mutex); +-void g_static_rec_mutex_lock (GStaticRecMutex *mutex); +-gboolean g_static_rec_mutex_trylock (GStaticRecMutex *mutex); +-void g_static_rec_mutex_unlock (GStaticRecMutex *mutex); +-void g_static_rec_mutex_lock_full (GStaticRecMutex *mutex, +- guint depth); +-guint g_static_rec_mutex_unlock_full (GStaticRecMutex *mutex); +-void g_static_rec_mutex_free (GStaticRecMutex *mutex); ++GLIB_FUNC void g_static_rec_mutex_init (GStaticRecMutex *mutex); ++GLIB_FUNC void g_static_rec_mutex_lock (GStaticRecMutex *mutex); ++GLIB_FUNC gboolean g_static_rec_mutex_trylock (GStaticRecMutex *mutex); ++GLIB_FUNC void g_static_rec_mutex_unlock (GStaticRecMutex *mutex); ++GLIB_FUNC void g_static_rec_mutex_lock_full (GStaticRecMutex *mutex, ++ guint depth);; ++GLIB_FUNC guint g_static_rec_mutex_unlock_full (GStaticRecMutex *mutex); ++GLIB_FUNC void g_static_rec_mutex_free (GStaticRecMutex *mutex); + + typedef struct _GStaticRWLock GStaticRWLock; + struct _GStaticRWLock +@@ -280,14 +280,14 @@ + + #define G_STATIC_RW_LOCK_INIT { G_STATIC_MUTEX_INIT, NULL, NULL, 0, FALSE, 0, 0 } + +-void g_static_rw_lock_init (GStaticRWLock* lock); +-void g_static_rw_lock_reader_lock (GStaticRWLock* lock); +-gboolean g_static_rw_lock_reader_trylock (GStaticRWLock* lock); +-void g_static_rw_lock_reader_unlock (GStaticRWLock* lock); +-void g_static_rw_lock_writer_lock (GStaticRWLock* lock); +-gboolean g_static_rw_lock_writer_trylock (GStaticRWLock* lock); +-void g_static_rw_lock_writer_unlock (GStaticRWLock* lock); +-void g_static_rw_lock_free (GStaticRWLock* lock); ++GLIB_FUNC void g_static_rw_lock_init (GStaticRWLock* lock); ++GLIB_FUNC void g_static_rw_lock_reader_lock (GStaticRWLock* lock); ++GLIB_FUNC gboolean g_static_rw_lock_reader_trylock (GStaticRWLock* lock); ++GLIB_FUNC void g_static_rw_lock_reader_unlock (GStaticRWLock* lock); ++GLIB_FUNC void g_static_rw_lock_writer_lock (GStaticRWLock* lock); ++GLIB_FUNC gboolean g_static_rw_lock_writer_trylock (GStaticRWLock* lock); ++GLIB_FUNC void g_static_rw_lock_writer_unlock (GStaticRWLock* lock); ++GLIB_FUNC void g_static_rw_lock_free (GStaticRWLock* lock); + + typedef enum + { +@@ -305,7 +305,7 @@ + + #define G_ONCE_INIT { G_ONCE_STATUS_NOTCALLED, NULL } + +-gpointer g_once_impl (GOnce *once, GThreadFunc func, gpointer arg); ++GLIB_FUNC gpointer g_once_impl (GOnce *once, GThreadFunc func, gpointer arg); + + #ifdef G_ATOMIC_OP_MEMORY_BARRIER_NEEDED + # define g_once(once, func, arg) g_once_impl ((once), (func), (arg)) +--- glib-2.4.6/glib/gthreadinit.h~visibility.patch ++++ glib-2.4.6/glib/gthreadinit.h +@@ -24,7 +24,7 @@ + G_BEGIN_DECLS + + /* Is called from gthread/gthread-impl.c */ +-void g_thread_init_glib (void); ++GLIB_FUNC void g_thread_init_glib (void); + + /* Are called from glib/gthread.c. May not contain g_private_new calls */ + void _g_mem_thread_init (void); +--- glib-2.4.6/glib/gthreadpool.h~visibility.patch ++++ glib-2.4.6/glib/gthreadpool.h +@@ -50,51 +50,51 @@ + * means, that the threads shouldn't be shared and that they will be + * prestarted (otherwise they are started as needed) user_data is the + * 2nd argument to the func */ +-GThreadPool* g_thread_pool_new (GFunc func, ++GLIB_FUNC GThreadPool* g_thread_pool_new (GFunc func, + gpointer user_data, + gint max_threads, + gboolean exclusive, +- GError **error); ++ GError **error);; + + /* Push new data into the thread pool. This task is assigned to a thread later + * (when the maximal number of threads is reached for that pool) or now + * (otherwise). If necessary a new thread will be started. The function + * returns immediatly */ +-void g_thread_pool_push (GThreadPool *pool, ++GLIB_FUNC void g_thread_pool_push (GThreadPool *pool, + gpointer data, +- GError **error); ++ GError **error);; + + /* Set the number of threads, which can run concurrently for that pool, -1 + * means no limit. 0 means has the effect, that the pool won't process + * requests until the limit is set higher again */ +-void g_thread_pool_set_max_threads (GThreadPool *pool, ++GLIB_FUNC void g_thread_pool_set_max_threads (GThreadPool *pool, + gint max_threads, +- GError **error); +-gint g_thread_pool_get_max_threads (GThreadPool *pool); ++ GError **error);; ++GLIB_FUNC gint g_thread_pool_get_max_threads (GThreadPool *pool); + + /* Get the number of threads assigned to that pool. This number doesn't + * necessarily represent the number of working threads in that pool */ +-guint g_thread_pool_get_num_threads (GThreadPool *pool); ++GLIB_FUNC guint g_thread_pool_get_num_threads (GThreadPool *pool); + + /* Get the number of unprocessed items in the pool */ +-guint g_thread_pool_unprocessed (GThreadPool *pool); ++GLIB_FUNC guint g_thread_pool_unprocessed (GThreadPool *pool); + + /* Free the pool, immediate means, that all unprocessed items in the queue + * wont be processed, wait means, that the function doesn't return immediatly, + * but after all threads in the pool are ready processing items. immediate + * does however not mean, that threads are killed. */ +-void g_thread_pool_free (GThreadPool *pool, ++GLIB_FUNC void g_thread_pool_free (GThreadPool *pool, + gboolean immediate, +- gboolean wait); ++ gboolean wait);; + + /* Set the maximal number of unused threads before threads will be stopped by + * GLib, -1 means no limit */ +-void g_thread_pool_set_max_unused_threads (gint max_threads); +-gint g_thread_pool_get_max_unused_threads (void); +-guint g_thread_pool_get_num_unused_threads (void); ++GLIB_FUNC void g_thread_pool_set_max_unused_threads (gint max_threads); ++GLIB_FUNC gint g_thread_pool_get_max_unused_threads (void); ++GLIB_FUNC guint g_thread_pool_get_num_unused_threads (void); + + /* Stop all currently unused threads, but leave the limit untouched */ +-void g_thread_pool_stop_unused_threads (void); ++GLIB_FUNC void g_thread_pool_stop_unused_threads (void); + + G_END_DECLS + +--- glib-2.4.6/glib/gtimer.h~visibility.patch ++++ glib-2.4.6/glib/gtimer.h +@@ -39,19 +39,19 @@ + + #define G_USEC_PER_SEC 1000000 + +-GTimer* g_timer_new (void); +-void g_timer_destroy (GTimer *timer); +-void g_timer_start (GTimer *timer); +-void g_timer_stop (GTimer *timer); +-void g_timer_reset (GTimer *timer); +-void g_timer_continue (GTimer *timer); +-gdouble g_timer_elapsed (GTimer *timer, +- gulong *microseconds); ++GLIB_FUNC GTimer* g_timer_new (void); ++GLIB_FUNC void g_timer_destroy (GTimer *timer); ++GLIB_FUNC void g_timer_start (GTimer *timer); ++GLIB_FUNC void g_timer_stop (GTimer *timer); ++GLIB_FUNC void g_timer_reset (GTimer *timer); ++GLIB_FUNC void g_timer_continue (GTimer *timer); ++GLIB_FUNC gdouble g_timer_elapsed (GTimer *timer, ++ gulong *microseconds);; + +-void g_usleep (gulong microseconds); ++GLIB_FUNC void g_usleep (gulong microseconds); + +-void g_time_val_add (GTimeVal *time_, +- glong microseconds); ++GLIB_FUNC void g_time_val_add (GTimeVal *time_, ++ glong microseconds);; + + G_END_DECLS + +--- glib-2.4.6/glib/gtree.h~visibility.patch ++++ glib-2.4.6/glib/gtree.h +@@ -39,46 +39,46 @@ + + /* Balanced binary trees + */ +-GTree* g_tree_new (GCompareFunc key_compare_func); +-GTree* g_tree_new_with_data (GCompareDataFunc key_compare_func, +- gpointer key_compare_data); +-GTree* g_tree_new_full (GCompareDataFunc key_compare_func, ++GLIB_FUNC GTree* g_tree_new (GCompareFunc key_compare_func); ++GLIB_FUNC GTree* g_tree_new_with_data (GCompareDataFunc key_compare_func, ++ gpointer key_compare_data);; ++GLIB_FUNC GTree* g_tree_new_full (GCompareDataFunc key_compare_func, + gpointer key_compare_data, + GDestroyNotify key_destroy_func, +- GDestroyNotify value_destroy_func); +-void g_tree_destroy (GTree *tree); +-void g_tree_insert (GTree *tree, ++ GDestroyNotify value_destroy_func);; ++GLIB_FUNC void g_tree_destroy (GTree *tree); ++GLIB_FUNC void g_tree_insert (GTree *tree, + gpointer key, +- gpointer value); +-void g_tree_replace (GTree *tree, ++ gpointer value);; ++GLIB_FUNC void g_tree_replace (GTree *tree, + gpointer key, +- gpointer value); +-void g_tree_remove (GTree *tree, +- gconstpointer key); +-void g_tree_steal (GTree *tree, +- gconstpointer key); +-gpointer g_tree_lookup (GTree *tree, +- gconstpointer key); +-gboolean g_tree_lookup_extended (GTree *tree, ++ gpointer value);; ++GLIB_FUNC void g_tree_remove (GTree *tree, ++ gconstpointer key);; ++GLIB_FUNC void g_tree_steal (GTree *tree, ++ gconstpointer key);; ++GLIB_FUNC gpointer g_tree_lookup (GTree *tree, ++ gconstpointer key);; ++GLIB_FUNC gboolean g_tree_lookup_extended (GTree *tree, + gconstpointer lookup_key, + gpointer *orig_key, +- gpointer *value); +-void g_tree_foreach (GTree *tree, ++ gpointer *value);; ++GLIB_FUNC void g_tree_foreach (GTree *tree, + GTraverseFunc func, +- gpointer user_data); ++ gpointer user_data);; + + #ifndef G_DISABLE_DEPRECATED +-void g_tree_traverse (GTree *tree, ++GLIB_FUNC void g_tree_traverse (GTree *tree, + GTraverseFunc traverse_func, + GTraverseType traverse_type, +- gpointer user_data); ++ gpointer user_data);; + #endif /* G_DISABLE_DEPRECATED */ + +-gpointer g_tree_search (GTree *tree, ++GLIB_FUNC gpointer g_tree_search (GTree *tree, + GCompareFunc search_func, +- gconstpointer user_data); +-gint g_tree_height (GTree *tree); +-gint g_tree_nnodes (GTree *tree); ++ gconstpointer user_data);; ++GLIB_FUNC gint g_tree_height (GTree *tree); ++GLIB_FUNC gint g_tree_nnodes (GTree *tree); + + + +--- glib-2.4.6/glib/gtypes.h~visibility.patch ++++ glib-2.4.6/glib/gtypes.h +@@ -411,9 +411,42 @@ + # endif /* !GLIB_COMPILATION */ + # endif /* !GLIB_STATIC_COMPILATION */ + # else /* !G_PLATFORM_WIN32 */ +-# define GLIB_VAR extern ++# ifdef GLIB_STATIC_COMPILATION ++# define GLIB_VAR extern ++# else /* !GLIB_STATIC_COMPILATION */ ++# ifdef GLIB_COMPILATION ++# ifdef GCC_HASCLASSVISIBILITY ++# define GLIB_VAR __attribute__ ((visibility("default"))) ++# endif /* !GCC_HASCLASSVISIBILITY */ ++# endif /* !GLIB_COMPILATION */ ++# endif /* !GLIB_STATIC_COMPILATION */ ++# ifndef GLIB_VAR ++# define GLIB_VAR extern ++# endif /* !GLIB_VAR */ + # endif /* !G_PLATFORM_WIN32 */ + #endif /* GLIB_VAR */ ++#ifndef GLIB_FUNC ++# ifdef G_PLATFORM_WIN32 ++# ifndef GLIB_STATIC_COMPILATION ++# ifdef GLIB_COMPILATION ++# define GLIB_FUNC __declspec(dllexport) ++# else /* !GLIB_COMPILATION */ ++# define GLIB_FUNC __declspec(dllimport) ++# endif /* !GLIB_COMPILATION */ ++# endif /* !GLIB_STATIC_COMPILATION */ ++# else /* !G_PLATFORM_WIN32 */ ++# ifndef GLIB_STATIC_COMPILATION ++# ifdef GLIB_COMPILATION ++# ifdef GCC_HASCLASSVISIBILITY ++# define GLIB_FUNC __attribute__ ((visibility("default"))) ++# endif /* !GCC_HASCLASSVISIBILITY */ ++# endif /* !GLIB_COMPILATION */ ++# endif /* !GLIB_STATIC_COMPILATION */ ++# ifndef GLIB_FUNC ++# define GLIB_FUNC ++# endif /* !GLIB_FUNC */ ++# endif /* !G_PLATFORM_WIN32 */ ++#endif /* GLIB_FUNC */ + + #endif /* __G_TYPES_H__ */ + +--- glib-2.4.6/glib/gunicode.h~visibility.patch ++++ glib-2.4.6/glib/gunicode.h +@@ -111,55 +111,55 @@ + * in case the locale's charset will be changed later using setlocale() + * or in some other way. + */ +-gboolean g_get_charset (G_CONST_RETURN char **charset); ++GLIB_FUNC gboolean g_get_charset (G_CONST_RETURN char **charset); + + /* These are all analogs of the functions. + */ +-gboolean g_unichar_isalnum (gunichar c) G_GNUC_CONST; +-gboolean g_unichar_isalpha (gunichar c) G_GNUC_CONST; +-gboolean g_unichar_iscntrl (gunichar c) G_GNUC_CONST; +-gboolean g_unichar_isdigit (gunichar c) G_GNUC_CONST; +-gboolean g_unichar_isgraph (gunichar c) G_GNUC_CONST; +-gboolean g_unichar_islower (gunichar c) G_GNUC_CONST; +-gboolean g_unichar_isprint (gunichar c) G_GNUC_CONST; +-gboolean g_unichar_ispunct (gunichar c) G_GNUC_CONST; +-gboolean g_unichar_isspace (gunichar c) G_GNUC_CONST; +-gboolean g_unichar_isupper (gunichar c) G_GNUC_CONST; +-gboolean g_unichar_isxdigit (gunichar c) G_GNUC_CONST; +-gboolean g_unichar_istitle (gunichar c) G_GNUC_CONST; +-gboolean g_unichar_isdefined (gunichar c) G_GNUC_CONST; +-gboolean g_unichar_iswide (gunichar c) G_GNUC_CONST; ++GLIB_FUNC gboolean g_unichar_isalnum (gunichar c) G_GNUC_CONST;; ++GLIB_FUNC gboolean g_unichar_isalpha (gunichar c) G_GNUC_CONST;; ++GLIB_FUNC gboolean g_unichar_iscntrl (gunichar c) G_GNUC_CONST;; ++GLIB_FUNC gboolean g_unichar_isdigit (gunichar c) G_GNUC_CONST;; ++GLIB_FUNC gboolean g_unichar_isgraph (gunichar c) G_GNUC_CONST;; ++GLIB_FUNC gboolean g_unichar_islower (gunichar c) G_GNUC_CONST;; ++GLIB_FUNC gboolean g_unichar_isprint (gunichar c) G_GNUC_CONST;; ++GLIB_FUNC gboolean g_unichar_ispunct (gunichar c) G_GNUC_CONST;; ++GLIB_FUNC gboolean g_unichar_isspace (gunichar c) G_GNUC_CONST;; ++GLIB_FUNC gboolean g_unichar_isupper (gunichar c) G_GNUC_CONST;; ++GLIB_FUNC gboolean g_unichar_isxdigit (gunichar c) G_GNUC_CONST;; ++GLIB_FUNC gboolean g_unichar_istitle (gunichar c) G_GNUC_CONST;; ++GLIB_FUNC gboolean g_unichar_isdefined (gunichar c) G_GNUC_CONST;; ++GLIB_FUNC gboolean g_unichar_iswide (gunichar c) G_GNUC_CONST;; + + /* More functions. These convert between the three cases. + * See the Unicode book to understand title case. */ +-gunichar g_unichar_toupper (gunichar c) G_GNUC_CONST; +-gunichar g_unichar_tolower (gunichar c) G_GNUC_CONST; +-gunichar g_unichar_totitle (gunichar c) G_GNUC_CONST; ++GLIB_FUNC gunichar g_unichar_toupper (gunichar c) G_GNUC_CONST;; ++GLIB_FUNC gunichar g_unichar_tolower (gunichar c) G_GNUC_CONST;; ++GLIB_FUNC gunichar g_unichar_totitle (gunichar c) G_GNUC_CONST;; + + /* If C is a digit (according to `g_unichar_isdigit'), then return its + numeric value. Otherwise return -1. */ +-gint g_unichar_digit_value (gunichar c) G_GNUC_CONST; ++GLIB_FUNC gint g_unichar_digit_value (gunichar c) G_GNUC_CONST;; + +-gint g_unichar_xdigit_value (gunichar c) G_GNUC_CONST; ++GLIB_FUNC gint g_unichar_xdigit_value (gunichar c) G_GNUC_CONST;; + + /* Return the Unicode character type of a given character. */ +-GUnicodeType g_unichar_type (gunichar c) G_GNUC_CONST; ++GLIB_FUNC GUnicodeType g_unichar_type (gunichar c) G_GNUC_CONST;; + + /* Return the line break property for a given character */ +-GUnicodeBreakType g_unichar_break_type (gunichar c) G_GNUC_CONST; ++GLIB_FUNC GUnicodeBreakType g_unichar_break_type (gunichar c) G_GNUC_CONST;; + + + /* Compute canonical ordering of a string in-place. This rearranges + decomposed characters in the string according to their combining + classes. See the Unicode manual for more information. */ +-void g_unicode_canonical_ordering (gunichar *string, +- gsize len); ++GLIB_FUNC void g_unicode_canonical_ordering (gunichar *string, ++ gsize len);; + + /* Compute canonical decomposition of a character. Returns g_malloc()d + string of Unicode characters. RESULT_LEN is set to the resulting + length of the string. */ +-gunichar *g_unicode_canonical_decomposition (gunichar ch, +- gsize *result_len); ++GLIB_FUNC gunichar *g_unicode_canonical_decomposition (gunichar ch, ++ gsize *result_len);; + + /* Array of skip-bytes-per-initial character. + */ +@@ -167,97 +167,97 @@ + + #define g_utf8_next_char(p) (char *)((p) + g_utf8_skip[*(guchar *)(p)]) + +-gunichar g_utf8_get_char (const gchar *p); +-gunichar g_utf8_get_char_validated (const gchar *p, +- gssize max_len); ++GLIB_FUNC gunichar g_utf8_get_char (const gchar *p); ++GLIB_FUNC gunichar g_utf8_get_char_validated (const gchar *p, ++ gssize max_len);; + +-gchar* g_utf8_offset_to_pointer (const gchar *str, +- glong offset); +-glong g_utf8_pointer_to_offset (const gchar *str, +- const gchar *pos); +-gchar* g_utf8_prev_char (const gchar *p); +-gchar* g_utf8_find_next_char (const gchar *p, +- const gchar *end); +-gchar* g_utf8_find_prev_char (const gchar *str, +- const gchar *p); ++GLIB_FUNC gchar* g_utf8_offset_to_pointer (const gchar *str, ++ glong offset);; ++GLIB_FUNC glong g_utf8_pointer_to_offset (const gchar *str, ++ const gchar *pos);; ++GLIB_FUNC gchar* g_utf8_prev_char (const gchar *p); ++GLIB_FUNC gchar* g_utf8_find_next_char (const gchar *p, ++ const gchar *end);; ++GLIB_FUNC gchar* g_utf8_find_prev_char (const gchar *str, ++ const gchar *p);; + +-glong g_utf8_strlen (const gchar *p, +- gssize max); ++GLIB_FUNC glong g_utf8_strlen (const gchar *p, ++ gssize max);; + + /* Copies n characters from src to dest */ +-gchar* g_utf8_strncpy (gchar *dest, ++GLIB_FUNC gchar* g_utf8_strncpy (gchar *dest, + const gchar *src, +- gsize n); ++ gsize n);; + + /* Find the UTF-8 character corresponding to ch, in string p. These + functions are equivalants to strchr and strrchr */ +-gchar* g_utf8_strchr (const gchar *p, ++GLIB_FUNC gchar* g_utf8_strchr (const gchar *p, + gssize len, +- gunichar c); +-gchar* g_utf8_strrchr (const gchar *p, ++ gunichar c);; ++GLIB_FUNC gchar* g_utf8_strrchr (const gchar *p, + gssize len, +- gunichar c); +-gchar* g_utf8_strreverse (const gchar *str, +- gssize len); ++ gunichar c);; ++GLIB_FUNC gchar* g_utf8_strreverse (const gchar *str, ++ gssize len);; + +-gunichar2 *g_utf8_to_utf16 (const gchar *str, ++GLIB_FUNC gunichar2 *g_utf8_to_utf16 (const gchar *str, + glong len, + glong *items_read, + glong *items_written, +- GError **error); +-gunichar * g_utf8_to_ucs4 (const gchar *str, ++ GError **error);; ++GLIB_FUNC gunichar * g_utf8_to_ucs4 (const gchar *str, + glong len, + glong *items_read, + glong *items_written, +- GError **error); +-gunichar * g_utf8_to_ucs4_fast (const gchar *str, ++ GError **error);; ++GLIB_FUNC gunichar * g_utf8_to_ucs4_fast (const gchar *str, + glong len, +- glong *items_written); +-gunichar * g_utf16_to_ucs4 (const gunichar2 *str, ++ glong *items_written);; ++GLIB_FUNC gunichar * g_utf16_to_ucs4 (const gunichar2 *str, + glong len, + glong *items_read, + glong *items_written, +- GError **error); +-gchar* g_utf16_to_utf8 (const gunichar2 *str, ++ GError **error);; ++GLIB_FUNC gchar* g_utf16_to_utf8 (const gunichar2 *str, + glong len, + glong *items_read, + glong *items_written, +- GError **error); +-gunichar2 *g_ucs4_to_utf16 (const gunichar *str, ++ GError **error);; ++GLIB_FUNC gunichar2 *g_ucs4_to_utf16 (const gunichar *str, + glong len, + glong *items_read, + glong *items_written, +- GError **error); +-gchar* g_ucs4_to_utf8 (const gunichar *str, ++ GError **error);; ++GLIB_FUNC gchar* g_ucs4_to_utf8 (const gunichar *str, + glong len, + glong *items_read, + glong *items_written, +- GError **error); ++ GError **error);; + + /* Convert a single character into UTF-8. outbuf must have at + * least 6 bytes of space. Returns the number of bytes in the + * result. + */ +-gint g_unichar_to_utf8 (gunichar c, +- gchar *outbuf); ++GLIB_FUNC gint g_unichar_to_utf8 (gunichar c, ++ gchar *outbuf);; + + /* Validate a UTF8 string, return TRUE if valid, put pointer to + * first invalid char in **end + */ + +-gboolean g_utf8_validate (const gchar *str, ++GLIB_FUNC gboolean g_utf8_validate (const gchar *str, + gssize max_len, +- const gchar **end); ++ const gchar **end);; + + /* Validate a Unicode character */ +-gboolean g_unichar_validate (gunichar ch); ++GLIB_FUNC gboolean g_unichar_validate (gunichar ch); + +-gchar *g_utf8_strup (const gchar *str, +- gssize len); +-gchar *g_utf8_strdown (const gchar *str, +- gssize len); +-gchar *g_utf8_casefold (const gchar *str, +- gssize len); ++GLIB_FUNC gchar *g_utf8_strup (const gchar *str, ++ gssize len);; ++GLIB_FUNC gchar *g_utf8_strdown (const gchar *str, ++ gssize len);; ++GLIB_FUNC gchar *g_utf8_casefold (const gchar *str, ++ gssize len);; + + typedef enum { + G_NORMALIZE_DEFAULT, +@@ -270,17 +270,17 @@ + G_NORMALIZE_NFKC = G_NORMALIZE_ALL_COMPOSE + } GNormalizeMode; + +-gchar *g_utf8_normalize (const gchar *str, ++GLIB_FUNC gchar *g_utf8_normalize (const gchar *str, + gssize len, +- GNormalizeMode mode); ++ GNormalizeMode mode);; + +-gint g_utf8_collate (const gchar *str1, +- const gchar *str2); +-gchar *g_utf8_collate_key (const gchar *str, +- gssize len); ++GLIB_FUNC gint g_utf8_collate (const gchar *str1, ++ const gchar *str2);; ++GLIB_FUNC gchar *g_utf8_collate_key (const gchar *str, ++ gssize len);; + +-gboolean g_unichar_get_mirror_char (gunichar ch, +- gunichar *mirrored_ch); ++GLIB_FUNC gboolean g_unichar_get_mirror_char (gunichar ch, ++ gunichar *mirrored_ch);; + + G_END_DECLS + +--- glib-2.4.6/glib/gutils.h~visibility.patch ++++ glib-2.4.6/glib/gutils.h +@@ -113,14 +113,14 @@ + + /* Retrive static string info + */ +-G_CONST_RETURN gchar* g_get_user_name (void); +-G_CONST_RETURN gchar* g_get_real_name (void); +-G_CONST_RETURN gchar* g_get_home_dir (void); +-G_CONST_RETURN gchar* g_get_tmp_dir (void); +-gchar* g_get_prgname (void); +-void g_set_prgname (const gchar *prgname); +-G_CONST_RETURN gchar* g_get_application_name (void); +-void g_set_application_name (const gchar *application_name); ++GLIB_FUNC G_CONST_RETURN gchar* g_get_user_name (void); ++GLIB_FUNC G_CONST_RETURN gchar* g_get_real_name (void); ++GLIB_FUNC G_CONST_RETURN gchar* g_get_home_dir (void); ++GLIB_FUNC G_CONST_RETURN gchar* g_get_tmp_dir (void); ++GLIB_FUNC gchar* g_get_prgname (void); ++GLIB_FUNC void g_set_prgname (const gchar *prgname); ++GLIB_FUNC G_CONST_RETURN gchar* g_get_application_name (void); ++GLIB_FUNC void g_set_application_name (const gchar *application_name); + + + typedef struct _GDebugKey GDebugKey; +@@ -132,24 +132,24 @@ + + /* Miscellaneous utility functions + */ +-guint g_parse_debug_string (const gchar *string, ++GLIB_FUNC guint g_parse_debug_string (const gchar *string, + const GDebugKey *keys, +- guint nkeys); ++ guint nkeys);; + +-gint g_snprintf (gchar *string, ++GLIB_FUNC gint g_snprintf (gchar *string, + gulong n, + gchar const *format, +- ...) G_GNUC_PRINTF (3, 4); +-gint g_vsnprintf (gchar *string, ++ ...) G_GNUC_PRINTF (3, 4);; ++GLIB_FUNC gint g_vsnprintf (gchar *string, + gulong n, + gchar const *format, +- va_list args); ++ va_list args);; + + /* Check if a file name is an absolute path */ +-gboolean g_path_is_absolute (const gchar *file_name); ++GLIB_FUNC gboolean g_path_is_absolute (const gchar *file_name); + + /* In case of absolute paths, skip the root part */ +-G_CONST_RETURN gchar* g_path_skip_root (const gchar *file_name); ++GLIB_FUNC G_CONST_RETURN gchar* g_path_skip_root (const gchar *file_name); + + #ifndef G_DISABLE_DEPRECATED + +@@ -157,27 +157,27 @@ + * major release of GLib. Use g_path_get_dirname/g_path_get_basename + * instead. Whatch out! The string returned by g_path_get_basename + * must be g_freed, while the string returned by g_basename must not.*/ +-G_CONST_RETURN gchar* g_basename (const gchar *file_name); ++GLIB_FUNC G_CONST_RETURN gchar* g_basename (const gchar *file_name); + #define g_dirname g_path_get_dirname + + #endif /* G_DISABLE_DEPRECATED */ + + /* The returned strings are newly allocated with g_malloc() */ +-gchar* g_get_current_dir (void); +-gchar* g_path_get_basename (const gchar *file_name); +-gchar* g_path_get_dirname (const gchar *file_name); ++GLIB_FUNC gchar* g_get_current_dir (void); ++GLIB_FUNC gchar* g_path_get_basename (const gchar *file_name); ++GLIB_FUNC gchar* g_path_get_dirname (const gchar *file_name); + + + /* Set the pointer at the specified location to NULL */ +-void g_nullify_pointer (gpointer *nullify_location); ++GLIB_FUNC void g_nullify_pointer (gpointer *nullify_location); + + /* return the environment string for the variable. The returned memory + * must not be freed. */ +-G_CONST_RETURN gchar* g_getenv (const gchar *variable); +-gboolean g_setenv (const gchar *variable, ++GLIB_FUNC G_CONST_RETURN gchar* g_getenv (const gchar *variable); ++GLIB_FUNC gboolean g_setenv (const gchar *variable, + const gchar *value, +- gboolean overwrite); +-void g_unsetenv (const gchar *variable); ++ gboolean overwrite);; ++GLIB_FUNC void g_unsetenv (const gchar *variable); + + + /* we try to provide a usefull equivalent for ATEXIT if it is +@@ -195,18 +195,18 @@ + * (if there is any in the implementation) and doesn't encounter + * missing include files. + */ +-void g_atexit (GVoidFunc func); ++GLIB_FUNC void g_atexit (GVoidFunc func); + + /* Look for an executable in PATH, following execvp() rules */ +-gchar* g_find_program_in_path (const gchar *program); ++GLIB_FUNC gchar* g_find_program_in_path (const gchar *program); + + /* Bit tests + */ +-G_INLINE_FUNC gint g_bit_nth_lsf (gulong mask, +- gint nth_bit); +-G_INLINE_FUNC gint g_bit_nth_msf (gulong mask, +- gint nth_bit); +-G_INLINE_FUNC guint g_bit_storage (gulong number); ++GLIB_FUNC G_INLINE_FUNC gint g_bit_nth_lsf (gulong mask, ++ gint nth_bit);; ++GLIB_FUNC G_INLINE_FUNC gint g_bit_nth_msf (gulong mask, ++ gint nth_bit);; ++GLIB_FUNC G_INLINE_FUNC guint g_bit_storage (gulong number); + + /* Trash Stacks + * elements need to be >= sizeof (gpointer) +@@ -217,11 +217,11 @@ + GTrashStack *next; + }; + +-G_INLINE_FUNC void g_trash_stack_push (GTrashStack **stack_p, +- gpointer data_p); +-G_INLINE_FUNC gpointer g_trash_stack_pop (GTrashStack **stack_p); +-G_INLINE_FUNC gpointer g_trash_stack_peek (GTrashStack **stack_p); +-G_INLINE_FUNC guint g_trash_stack_height (GTrashStack **stack_p); ++GLIB_FUNC G_INLINE_FUNC void g_trash_stack_push (GTrashStack **stack_p, ++ gpointer data_p);; ++GLIB_FUNC G_INLINE_FUNC gpointer g_trash_stack_pop (GTrashStack **stack_p); ++GLIB_FUNC G_INLINE_FUNC gpointer g_trash_stack_peek (GTrashStack **stack_p); ++GLIB_FUNC G_INLINE_FUNC guint g_trash_stack_height (GTrashStack **stack_p); + + /* inline function implementations + */ +--- glib-2.4.6/glib/gwin32.h~visibility.patch ++++ glib-2.4.6/glib/gwin32.h +@@ -68,8 +68,8 @@ + */ + # define ftruncate(fd, size) g_win32_ftruncate (fd, size) + +-gint g_win32_ftruncate (gint f, +- guint size); ++GLIB_FUNC gint g_win32_ftruncate (gint f, ++ guint size);; + #endif /* G_OS_WIN32 */ + + /* The MS setlocale uses locale names of the form "English_United +@@ -78,20 +78,20 @@ + * returns it as a string of the above form for use in forming file + * names etc. The returned string should be deallocated with g_free(). + */ +-gchar* g_win32_getlocale (void); ++GLIB_FUNC gchar* g_win32_getlocale (void); + + /* Translate a Win32 error code (as returned by GetLastError()) into + * the corresponding message. The returned string should be deallocated + * with g_free(). + */ +-gchar* g_win32_error_message (gint error); ++GLIB_FUNC gchar* g_win32_error_message (gint error); + +-gchar* g_win32_get_package_installation_directory (gchar *package, +- gchar *dll_name); ++GLIB_FUNC gchar* g_win32_get_package_installation_directory (gchar *package, ++ gchar *dll_name);; + +-gchar* g_win32_get_package_installation_subdirectory (gchar *package, ++GLIB_FUNC gchar* g_win32_get_package_installation_subdirectory (gchar *package, + gchar *dll_name, +- gchar *subdir); ++ gchar *subdir);; + + G_END_DECLS + +--- glib-2.4.6/gmodule/gmodule.def~visibility.patch ++++ glib-2.4.6/gmodule/gmodule.def +@@ -1,4 +1,3 @@ +-EXPORTS + g_module_build_path + g_module_close + g_module_error +--- glib-2.4.6/gmodule/gmodule.h~visibility.patch ++++ glib-2.4.6/gmodule/gmodule.h +@@ -38,9 +38,35 @@ + #ifdef G_PLATFORM_WIN32 + # define G_MODULE_EXPORT __declspec(dllexport) + #else /* !G_PLATFORM_WIN32 */ +-# define G_MODULE_EXPORT ++# ifdef GCC_HASCLASSVISIBILITY ++# define G_MODULE_EXPORT __attribute__ ((visibility("default"))) ++# else /* !GCC_HASCLASSVISIBILITY */ ++# define G_MODULE_EXPORT ++# endif /* !GCC_HASCLASSVISIBILITY */ + #endif /* !G_PLATFORM_WIN32 */ + ++#ifndef GMODULE_FUNC ++# ifdef G_PLATFORM_WIN32 ++# ifndef GMODULE_STATIC_COMPILATION ++# ifdef GMODULE_COMPILATION ++# define GMODULE_FUNC __declspec(dllexport) ++# else /* !GMODULE_COMPILATION */ ++# define GMODULE_FUNC __declspec(dllimport) ++# endif /* !GMODULE_COMPILATION */ ++# endif /* !GMODULE_STATIC_COMPILATION */ ++# else /* !G_PLATFORM_WIN32 */ ++# ifndef GMODULE_STATIC_COMPILATION ++# ifdef GMODULE_COMPILATION ++# ifdef GCC_HASCLASSVISIBILITY ++# define GMODULE_FUNC __attribute__ ((visibility("default"))) ++# endif ++# endif /* !GMODULE_COMPILATION */ ++# endif /* !GMODULE_STATIC_COMPILATION */ ++# ifndef GMODULE_FUNC ++# define GMODULE_FUNC ++# endif /* !GMODULE_FUNC */ ++# endif /* !G_PLATFORM_WIN32 */ ++#endif /* GMODULE_FUNC */ + typedef enum + { + G_MODULE_BIND_LAZY = 1 << 0, +@@ -53,28 +79,28 @@ + typedef void (*GModuleUnload) (GModule *module); + + /* return TRUE if dynamic module loading is supported */ +-gboolean g_module_supported (void) G_GNUC_CONST; ++GMODULE_FUNC gboolean g_module_supported (void) G_GNUC_CONST; + + /* open a module `file_name' and return handle, which is NULL on error */ +-GModule* g_module_open (const gchar *file_name, ++GMODULE_FUNC GModule* g_module_open (const gchar *file_name, + GModuleFlags flags); + + /* close a previously opened module, returns TRUE on success */ +-gboolean g_module_close (GModule *module); ++GMODULE_FUNC gboolean g_module_close (GModule *module); + + /* make a module resident so g_module_close on it will be ignored */ +-void g_module_make_resident (GModule *module); ++GMODULE_FUNC void g_module_make_resident (GModule *module); + + /* query the last module error as a string */ +-G_CONST_RETURN gchar* g_module_error (void); ++GMODULE_FUNC G_CONST_RETURN gchar* g_module_error (void); + + /* retrieve a symbol pointer from `module', returns TRUE on success */ +-gboolean g_module_symbol (GModule *module, ++GMODULE_FUNC gboolean g_module_symbol (GModule *module, + const gchar *symbol_name, + gpointer *symbol); + + /* retrieve the file name from an existing module */ +-G_CONST_RETURN gchar* g_module_name (GModule *module); ++GMODULE_FUNC G_CONST_RETURN gchar* g_module_name (GModule *module); + + /* Build the actual file name containing a module. `directory' is the + * directory where the module file is supposed to be, or NULL or empty +@@ -87,7 +113,7 @@ + * + * No checks are made that the file exists, or is of correct type. + */ +-gchar* g_module_build_path (const gchar *directory, ++GMODULE_FUNC gchar* g_module_build_path (const gchar *directory, + const gchar *module_name); + + +--- glib-2.4.6/gmodule/Makefile.am~visibility.patch ++++ glib-2.4.6/gmodule/Makefile.am +@@ -1,7 +1,9 @@ + ## Process this file with automake to produce Makefile.in + + INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/glib -I$(top_srcdir)/gmodule \ +- -DG_LOG_DOMAIN=\"GModule\" @GLIB_DEBUG_FLAGS@ -DG_DISABLE_DEPRECATED ++ -DG_LOG_DOMAIN=\"GModule\" @GLIB_DEBUG_FLAGS@ \ ++ -DG_DISABLE_DEPRECATED \ ++ -DGMODULE_COMPILATION + + EXTRA_DIST = \ + makefile.msc.in \ +--- glib-2.4.6/gobject/gboxed.h~visibility.patch ++++ glib-2.4.6/gobject/gboxed.h +@@ -38,22 +38,22 @@ + + + /* --- prototypes --- */ +-gpointer g_boxed_copy (GType boxed_type, +- gconstpointer src_boxed); +-void g_boxed_free (GType boxed_type, +- gpointer boxed); +-void g_value_set_boxed (GValue *value, +- gconstpointer v_boxed); +-void g_value_set_static_boxed (GValue *value, +- gconstpointer v_boxed); +-gpointer g_value_get_boxed (const GValue *value); +-gpointer g_value_dup_boxed (const GValue *value); ++GOBJECT_FUNC gpointer g_boxed_copy (GType boxed_type, ++ gconstpointer src_boxed);; ++GOBJECT_FUNC void g_boxed_free (GType boxed_type, ++ gpointer boxed);; ++GOBJECT_FUNC void g_value_set_boxed (GValue *value, ++ gconstpointer v_boxed);; ++GOBJECT_FUNC void g_value_set_static_boxed (GValue *value, ++ gconstpointer v_boxed);; ++GOBJECT_FUNC gpointer g_value_get_boxed (const GValue *value);; ++GOBJECT_FUNC gpointer g_value_dup_boxed (const GValue *value);; + + + /* --- convenience --- */ +-GType g_boxed_type_register_static (const gchar *name, ++GOBJECT_FUNC GType g_boxed_type_register_static (const gchar *name, + GBoxedCopyFunc boxed_copy, +- GBoxedFreeFunc boxed_free); ++ GBoxedFreeFunc boxed_free);; + + + /* --- GLib boxed types --- */ +@@ -64,17 +64,17 @@ + #define G_TYPE_GSTRING (g_gstring_get_type ()) + + +-void g_value_take_boxed (GValue *value, +- gconstpointer v_boxed); ++GOBJECT_FUNC void g_value_take_boxed (GValue *value, ++ gconstpointer v_boxed);; + #ifndef G_DISABLE_DEPRECATED +-void g_value_set_boxed_take_ownership (GValue *value, +- gconstpointer v_boxed); ++GOBJECT_FUNC void g_value_set_boxed_take_ownership (GValue *value, ++ gconstpointer v_boxed);; + #endif +-GType g_closure_get_type (void) G_GNUC_CONST; +-GType g_value_get_type (void) G_GNUC_CONST; +-GType g_value_array_get_type (void) G_GNUC_CONST; +-GType g_strv_get_type (void) G_GNUC_CONST; +-GType g_gstring_get_type (void) G_GNUC_CONST; ++GOBJECT_FUNC GType g_closure_get_type (void) G_GNUC_CONST; ++GOBJECT_FUNC GType g_value_get_type (void) G_GNUC_CONST; ++GOBJECT_FUNC GType g_value_array_get_type (void) G_GNUC_CONST; ++GOBJECT_FUNC GType g_strv_get_type (void) G_GNUC_CONST; ++GOBJECT_FUNC GType g_gstring_get_type (void) G_GNUC_CONST; + + typedef gchar** GStrv; + +--- glib-2.4.6/gobject/gclosure.h~visibility.patch ++++ glib-2.4.6/gobject/gclosure.h +@@ -100,51 +100,51 @@ + + + /* --- prototypes --- */ +-GClosure* g_cclosure_new (GCallback callback_func, ++GOBJECT_FUNC GClosure* g_cclosure_new (GCallback callback_func, + gpointer user_data, +- GClosureNotify destroy_data); +-GClosure* g_cclosure_new_swap (GCallback callback_func, ++ GClosureNotify destroy_data);; ++GOBJECT_FUNC GClosure* g_cclosure_new_swap (GCallback callback_func, + gpointer user_data, +- GClosureNotify destroy_data); +-GClosure* g_signal_type_cclosure_new (GType itype, +- guint struct_offset); ++ GClosureNotify destroy_data);; ++GOBJECT_FUNC GClosure* g_signal_type_cclosure_new (GType itype, ++ guint struct_offset);; + + + /* --- prototypes --- */ +-GClosure* g_closure_ref (GClosure *closure); +-void g_closure_sink (GClosure *closure); +-void g_closure_unref (GClosure *closure); ++GOBJECT_FUNC GClosure* g_closure_ref (GClosure *closure);; ++GOBJECT_FUNC void g_closure_sink (GClosure *closure);; ++GOBJECT_FUNC void g_closure_unref (GClosure *closure);; + /* intimidating */ +-GClosure* g_closure_new_simple (guint sizeof_closure, +- gpointer data); +-void g_closure_add_finalize_notifier (GClosure *closure, ++GOBJECT_FUNC GClosure* g_closure_new_simple (guint sizeof_closure, ++ gpointer data);; ++GOBJECT_FUNC void g_closure_add_finalize_notifier (GClosure *closure, + gpointer notify_data, +- GClosureNotify notify_func); +-void g_closure_remove_finalize_notifier (GClosure *closure, ++ GClosureNotify notify_func);; ++GOBJECT_FUNC void g_closure_remove_finalize_notifier (GClosure *closure, + gpointer notify_data, +- GClosureNotify notify_func); +-void g_closure_add_invalidate_notifier (GClosure *closure, ++ GClosureNotify notify_func);; ++GOBJECT_FUNC void g_closure_add_invalidate_notifier (GClosure *closure, + gpointer notify_data, +- GClosureNotify notify_func); +-void g_closure_remove_invalidate_notifier (GClosure *closure, ++ GClosureNotify notify_func);; ++GOBJECT_FUNC void g_closure_remove_invalidate_notifier (GClosure *closure, + gpointer notify_data, +- GClosureNotify notify_func); +-void g_closure_add_marshal_guards (GClosure *closure, ++ GClosureNotify notify_func);; ++GOBJECT_FUNC void g_closure_add_marshal_guards (GClosure *closure, + gpointer pre_marshal_data, + GClosureNotify pre_marshal_notify, + gpointer post_marshal_data, +- GClosureNotify post_marshal_notify); +-void g_closure_set_marshal (GClosure *closure, +- GClosureMarshal marshal); +-void g_closure_set_meta_marshal (GClosure *closure, ++ GClosureNotify post_marshal_notify);; ++GOBJECT_FUNC void g_closure_set_marshal (GClosure *closure, ++ GClosureMarshal marshal);; ++GOBJECT_FUNC void g_closure_set_meta_marshal (GClosure *closure, + gpointer marshal_data, +- GClosureMarshal meta_marshal); +-void g_closure_invalidate (GClosure *closure); +-void g_closure_invoke (GClosure *closure, ++ GClosureMarshal meta_marshal);; ++GOBJECT_FUNC void g_closure_invalidate (GClosure *closure);; ++GOBJECT_FUNC void g_closure_invoke (GClosure *closure, + GValue /*out*/ *return_value, + guint n_param_values, + const GValue *param_values, +- gpointer invocation_hint); ++ gpointer invocation_hint);; + + /* FIXME: + OK: data_object::destroy -> closure_invalidate(); +--- glib-2.4.6/gobject/genums.h~visibility.patch ++++ glib-2.4.6/gobject/genums.h +@@ -81,24 +81,24 @@ + + + /* --- prototypes --- */ +-GEnumValue* g_enum_get_value (GEnumClass *enum_class, +- gint value); +-GEnumValue* g_enum_get_value_by_name (GEnumClass *enum_class, +- const gchar *name); +-GEnumValue* g_enum_get_value_by_nick (GEnumClass *enum_class, +- const gchar *nick); +-GFlagsValue* g_flags_get_first_value (GFlagsClass *flags_class, +- guint value); +-GFlagsValue* g_flags_get_value_by_name (GFlagsClass *flags_class, +- const gchar *name); +-GFlagsValue* g_flags_get_value_by_nick (GFlagsClass *flags_class, +- const gchar *nick); +-void g_value_set_enum (GValue *value, +- gint v_enum); +-gint g_value_get_enum (const GValue *value); +-void g_value_set_flags (GValue *value, +- guint v_flags); +-guint g_value_get_flags (const GValue *value); ++GOBJECT_FUNC GEnumValue* g_enum_get_value (GEnumClass *enum_class, ++ gint value);; ++GOBJECT_FUNC GEnumValue* g_enum_get_value_by_name (GEnumClass *enum_class, ++ const gchar *name);; ++GOBJECT_FUNC GEnumValue* g_enum_get_value_by_nick (GEnumClass *enum_class, ++ const gchar *nick);; ++GOBJECT_FUNC GFlagsValue* g_flags_get_first_value (GFlagsClass *flags_class, ++ guint value);; ++GOBJECT_FUNC GFlagsValue* g_flags_get_value_by_name (GFlagsClass *flags_class, ++ const gchar *name);; ++GOBJECT_FUNC GFlagsValue* g_flags_get_value_by_nick (GFlagsClass *flags_class, ++ const gchar *nick);; ++GOBJECT_FUNC void g_value_set_enum (GValue *value, ++ gint v_enum);; ++GOBJECT_FUNC gint g_value_get_enum (const GValue *value);; ++GOBJECT_FUNC void g_value_set_flags (GValue *value, ++ guint v_flags);; ++GOBJECT_FUNC guint g_value_get_flags (const GValue *value);; + + + +@@ -106,19 +106,19 @@ + /* const_static_values is a NULL terminated array of enum/flags + * values that is taken over! + */ +-GType g_enum_register_static (const gchar *name, +- const GEnumValue *const_static_values); +-GType g_flags_register_static (const gchar *name, +- const GFlagsValue *const_static_values); ++GOBJECT_FUNC GType g_enum_register_static (const gchar *name, ++ const GEnumValue *const_static_values);; ++GOBJECT_FUNC GType g_flags_register_static (const gchar *name, ++ const GFlagsValue *const_static_values);; + /* functions to complete the type information + * for enums/flags implemented by plugins + */ +-void g_enum_complete_type_info (GType g_enum_type, ++GOBJECT_FUNC void g_enum_complete_type_info (GType g_enum_type, + GTypeInfo *info, +- const GEnumValue *const_values); +-void g_flags_complete_type_info (GType g_flags_type, ++ const GEnumValue *const_values);; ++GOBJECT_FUNC void g_flags_complete_type_info (GType g_flags_type, + GTypeInfo *info, +- const GFlagsValue *const_values); ++ const GFlagsValue *const_values);; + + G_END_DECLS + +--- glib-2.4.6/gobject/glib-genmarshal.c~visibility.patch ++++ glib-2.4.6/gobject/glib-genmarshal.c +@@ -356,7 +356,7 @@ + } + if (gen_cheader && !have_std_marshaller) + { +- ind = g_fprintf (fout, "extern void "); ++ ind = g_fprintf (fout, "GOBJECT_FUNC extern void "); + ind += g_fprintf (fout, "%s_%s (", marshaller_prefix, signame); + g_fprintf (fout, "GClosure *closure,\n"); + g_fprintf (fout, "%sGValue *return_value,\n", indent (ind)); +--- glib-2.4.6/gobject/gmarshal.c~visibility.patch ++++ glib-2.4.6/gobject/gmarshal.c +@@ -45,7 +45,7 @@ + #endif /* !G_ENABLE_DEBUG */ + + +-/* VOID:VOID (./gmarshal.list:26) */ ++/* VOID:VOID (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:26) */ + void + g_cclosure_marshal_VOID__VOID (GClosure *closure, + GValue *return_value, +@@ -78,7 +78,7 @@ + data2); + } + +-/* VOID:BOOLEAN (./gmarshal.list:27) */ ++/* VOID:BOOLEAN (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:27) */ + void + g_cclosure_marshal_VOID__BOOLEAN (GClosure *closure, + GValue *return_value, +@@ -113,7 +113,7 @@ + data2); + } + +-/* VOID:CHAR (./gmarshal.list:28) */ ++/* VOID:CHAR (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:28) */ + void + g_cclosure_marshal_VOID__CHAR (GClosure *closure, + GValue *return_value, +@@ -148,7 +148,7 @@ + data2); + } + +-/* VOID:UCHAR (./gmarshal.list:29) */ ++/* VOID:UCHAR (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:29) */ + void + g_cclosure_marshal_VOID__UCHAR (GClosure *closure, + GValue *return_value, +@@ -183,7 +183,7 @@ + data2); + } + +-/* VOID:INT (./gmarshal.list:30) */ ++/* VOID:INT (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:30) */ + void + g_cclosure_marshal_VOID__INT (GClosure *closure, + GValue *return_value, +@@ -218,7 +218,7 @@ + data2); + } + +-/* VOID:UINT (./gmarshal.list:31) */ ++/* VOID:UINT (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:31) */ + void + g_cclosure_marshal_VOID__UINT (GClosure *closure, + GValue *return_value, +@@ -253,7 +253,7 @@ + data2); + } + +-/* VOID:LONG (./gmarshal.list:32) */ ++/* VOID:LONG (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:32) */ + void + g_cclosure_marshal_VOID__LONG (GClosure *closure, + GValue *return_value, +@@ -288,7 +288,7 @@ + data2); + } + +-/* VOID:ULONG (./gmarshal.list:33) */ ++/* VOID:ULONG (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:33) */ + void + g_cclosure_marshal_VOID__ULONG (GClosure *closure, + GValue *return_value, +@@ -323,7 +323,7 @@ + data2); + } + +-/* VOID:ENUM (./gmarshal.list:34) */ ++/* VOID:ENUM (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:34) */ + void + g_cclosure_marshal_VOID__ENUM (GClosure *closure, + GValue *return_value, +@@ -358,7 +358,7 @@ + data2); + } + +-/* VOID:FLAGS (./gmarshal.list:35) */ ++/* VOID:FLAGS (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:35) */ + void + g_cclosure_marshal_VOID__FLAGS (GClosure *closure, + GValue *return_value, +@@ -393,7 +393,7 @@ + data2); + } + +-/* VOID:FLOAT (./gmarshal.list:36) */ ++/* VOID:FLOAT (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:36) */ + void + g_cclosure_marshal_VOID__FLOAT (GClosure *closure, + GValue *return_value, +@@ -428,7 +428,7 @@ + data2); + } + +-/* VOID:DOUBLE (./gmarshal.list:37) */ ++/* VOID:DOUBLE (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:37) */ + void + g_cclosure_marshal_VOID__DOUBLE (GClosure *closure, + GValue *return_value, +@@ -463,7 +463,7 @@ + data2); + } + +-/* VOID:STRING (./gmarshal.list:38) */ ++/* VOID:STRING (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:38) */ + void + g_cclosure_marshal_VOID__STRING (GClosure *closure, + GValue *return_value, +@@ -498,7 +498,7 @@ + data2); + } + +-/* VOID:PARAM (./gmarshal.list:39) */ ++/* VOID:PARAM (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:39) */ + void + g_cclosure_marshal_VOID__PARAM (GClosure *closure, + GValue *return_value, +@@ -533,7 +533,7 @@ + data2); + } + +-/* VOID:BOXED (./gmarshal.list:40) */ ++/* VOID:BOXED (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:40) */ + void + g_cclosure_marshal_VOID__BOXED (GClosure *closure, + GValue *return_value, +@@ -568,7 +568,7 @@ + data2); + } + +-/* VOID:POINTER (./gmarshal.list:41) */ ++/* VOID:POINTER (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:41) */ + void + g_cclosure_marshal_VOID__POINTER (GClosure *closure, + GValue *return_value, +@@ -603,7 +603,7 @@ + data2); + } + +-/* VOID:OBJECT (./gmarshal.list:42) */ ++/* VOID:OBJECT (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:42) */ + void + g_cclosure_marshal_VOID__OBJECT (GClosure *closure, + GValue *return_value, +@@ -638,7 +638,7 @@ + data2); + } + +-/* VOID:UINT,POINTER (./gmarshal.list:45) */ ++/* VOID:UINT,POINTER (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:45) */ + void + g_cclosure_marshal_VOID__UINT_POINTER (GClosure *closure, + GValue *return_value, +@@ -675,7 +675,7 @@ + data2); + } + +-/* BOOL:FLAGS (./gmarshal.list:46) */ ++/* BOOL:FLAGS (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:46) */ + void + g_cclosure_marshal_BOOLEAN__FLAGS (GClosure *closure, + GValue *return_value, +@@ -714,7 +714,7 @@ + g_value_set_boolean (return_value, v_return); + } + +-/* STRING:OBJECT,POINTER (./gmarshal.list:47) */ ++/* STRING:OBJECT,POINTER (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:47) */ + void + g_cclosure_marshal_STRING__OBJECT_POINTER (GClosure *closure, + GValue *return_value, +--- glib-2.4.6/gobject/gmarshal.h~visibility.patch ++++ glib-2.4.6/gobject/gmarshal.h +@@ -3,166 +3,166 @@ + + G_BEGIN_DECLS + +-/* VOID:VOID (./gmarshal.list:26) */ +-extern void g_cclosure_marshal_VOID__VOID (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); ++/* VOID:VOID (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:26) */ ++GOBJECT_FUNC extern void g_cclosure_marshal_VOID__VOID (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); + +-/* VOID:BOOLEAN (./gmarshal.list:27) */ +-extern void g_cclosure_marshal_VOID__BOOLEAN (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); ++/* VOID:BOOLEAN (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:27) */ ++GOBJECT_FUNC extern void g_cclosure_marshal_VOID__BOOLEAN (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); + +-/* VOID:CHAR (./gmarshal.list:28) */ +-extern void g_cclosure_marshal_VOID__CHAR (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); ++/* VOID:CHAR (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:28) */ ++GOBJECT_FUNC extern void g_cclosure_marshal_VOID__CHAR (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); + +-/* VOID:UCHAR (./gmarshal.list:29) */ +-extern void g_cclosure_marshal_VOID__UCHAR (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); ++/* VOID:UCHAR (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:29) */ ++GOBJECT_FUNC extern void g_cclosure_marshal_VOID__UCHAR (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); + +-/* VOID:INT (./gmarshal.list:30) */ +-extern void g_cclosure_marshal_VOID__INT (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); ++/* VOID:INT (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:30) */ ++GOBJECT_FUNC extern void g_cclosure_marshal_VOID__INT (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); + +-/* VOID:UINT (./gmarshal.list:31) */ +-extern void g_cclosure_marshal_VOID__UINT (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); ++/* VOID:UINT (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:31) */ ++GOBJECT_FUNC extern void g_cclosure_marshal_VOID__UINT (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); + +-/* VOID:LONG (./gmarshal.list:32) */ +-extern void g_cclosure_marshal_VOID__LONG (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); ++/* VOID:LONG (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:32) */ ++GOBJECT_FUNC extern void g_cclosure_marshal_VOID__LONG (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); + +-/* VOID:ULONG (./gmarshal.list:33) */ +-extern void g_cclosure_marshal_VOID__ULONG (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); ++/* VOID:ULONG (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:33) */ ++GOBJECT_FUNC extern void g_cclosure_marshal_VOID__ULONG (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); + +-/* VOID:ENUM (./gmarshal.list:34) */ +-extern void g_cclosure_marshal_VOID__ENUM (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); ++/* VOID:ENUM (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:34) */ ++GOBJECT_FUNC extern void g_cclosure_marshal_VOID__ENUM (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); + +-/* VOID:FLAGS (./gmarshal.list:35) */ +-extern void g_cclosure_marshal_VOID__FLAGS (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); ++/* VOID:FLAGS (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:35) */ ++GOBJECT_FUNC extern void g_cclosure_marshal_VOID__FLAGS (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); + +-/* VOID:FLOAT (./gmarshal.list:36) */ +-extern void g_cclosure_marshal_VOID__FLOAT (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); ++/* VOID:FLOAT (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:36) */ ++GOBJECT_FUNC extern void g_cclosure_marshal_VOID__FLOAT (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); + +-/* VOID:DOUBLE (./gmarshal.list:37) */ +-extern void g_cclosure_marshal_VOID__DOUBLE (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); ++/* VOID:DOUBLE (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:37) */ ++GOBJECT_FUNC extern void g_cclosure_marshal_VOID__DOUBLE (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); + +-/* VOID:STRING (./gmarshal.list:38) */ +-extern void g_cclosure_marshal_VOID__STRING (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); ++/* VOID:STRING (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:38) */ ++GOBJECT_FUNC extern void g_cclosure_marshal_VOID__STRING (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); + +-/* VOID:PARAM (./gmarshal.list:39) */ +-extern void g_cclosure_marshal_VOID__PARAM (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); ++/* VOID:PARAM (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:39) */ ++GOBJECT_FUNC extern void g_cclosure_marshal_VOID__PARAM (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); + +-/* VOID:BOXED (./gmarshal.list:40) */ +-extern void g_cclosure_marshal_VOID__BOXED (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); ++/* VOID:BOXED (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:40) */ ++GOBJECT_FUNC extern void g_cclosure_marshal_VOID__BOXED (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); + +-/* VOID:POINTER (./gmarshal.list:41) */ +-extern void g_cclosure_marshal_VOID__POINTER (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); ++/* VOID:POINTER (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:41) */ ++GOBJECT_FUNC extern void g_cclosure_marshal_VOID__POINTER (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); + +-/* VOID:OBJECT (./gmarshal.list:42) */ +-extern void g_cclosure_marshal_VOID__OBJECT (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); ++/* VOID:OBJECT (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:42) */ ++GOBJECT_FUNC extern void g_cclosure_marshal_VOID__OBJECT (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); + +-/* VOID:UINT,POINTER (./gmarshal.list:45) */ +-extern void g_cclosure_marshal_VOID__UINT_POINTER (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); ++/* VOID:UINT,POINTER (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:45) */ ++GOBJECT_FUNC extern void g_cclosure_marshal_VOID__UINT_POINTER (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); + +-/* BOOL:FLAGS (./gmarshal.list:46) */ +-extern void g_cclosure_marshal_BOOLEAN__FLAGS (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); ++/* BOOL:FLAGS (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:46) */ ++GOBJECT_FUNC extern void g_cclosure_marshal_BOOLEAN__FLAGS (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); + #define g_cclosure_marshal_BOOL__FLAGS g_cclosure_marshal_BOOLEAN__FLAGS + +-/* STRING:OBJECT,POINTER (./gmarshal.list:47) */ +-extern void g_cclosure_marshal_STRING__OBJECT_POINTER (GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data); ++/* STRING:OBJECT,POINTER (/home/kergoth/code/build-z/tmp/work/arm-linux/glib-2.0-2.4.6-r2/glib-2.4.6/gobject/gmarshal.list:47) */ ++GOBJECT_FUNC extern void g_cclosure_marshal_STRING__OBJECT_POINTER (GClosure *closure, ++ GValue *return_value, ++ guint n_param_values, ++ const GValue *param_values, ++ gpointer invocation_hint, ++ gpointer marshal_data); + + G_END_DECLS + +--- glib-2.4.6/gobject/gobject.def~visibility.patch ++++ glib-2.4.6/gobject/gobject.def +@@ -1,4 +1,3 @@ +-EXPORTS + g_boxed_copy + g_boxed_free + g_boxed_type_register_static +--- glib-2.4.6/gobject/gobject.h~visibility.patch ++++ glib-2.4.6/gobject/gobject.h +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + G_BEGIN_DECLS + +@@ -111,123 +112,123 @@ + + + /* --- prototypes --- */ +-void g_object_class_install_property (GObjectClass *oclass, ++GOBJECT_FUNC void g_object_class_install_property (GObjectClass *oclass, + guint property_id, +- GParamSpec *pspec); +-GParamSpec* g_object_class_find_property (GObjectClass *oclass, +- const gchar *property_name); +-GParamSpec**g_object_class_list_properties (GObjectClass *oclass, ++ GParamSpec *pspec);; ++GOBJECT_FUNC GParamSpec* g_object_class_find_property (GObjectClass *oclass, ++ const gchar *property_name);; ++GOBJECT_FUNC GParamSpec**g_object_class_list_properties (GObjectClass *oclass, + guint *n_properties); +-void g_object_class_override_property (GObjectClass *oclass, ++GOBJECT_FUNC void g_object_class_override_property (GObjectClass *oclass, + guint property_id, +- const gchar *name); ++ const gchar *name);; + +-void g_object_interface_install_property (gpointer g_iface, +- GParamSpec *pspec); +-GParamSpec* g_object_interface_find_property (gpointer g_iface, +- const gchar *property_name); +-GParamSpec**g_object_interface_list_properties (gpointer g_iface, ++GOBJECT_FUNC void g_object_interface_install_property (gpointer g_iface, ++ GParamSpec *pspec);; ++GOBJECT_FUNC GParamSpec* g_object_interface_find_property (gpointer g_iface, ++ const gchar *property_name);; ++GOBJECT_FUNC GParamSpec**g_object_interface_list_properties (gpointer g_iface, + guint *n_properties_p); + +-gpointer g_object_new (GType object_type, ++GOBJECT_FUNC gpointer g_object_new (GType object_type, + const gchar *first_property_name, +- ...); +-gpointer g_object_newv (GType object_type, ++ ...);; ++GOBJECT_FUNC gpointer g_object_newv (GType object_type, + guint n_parameters, +- GParameter *parameters); +-GObject* g_object_new_valist (GType object_type, ++ GParameter *parameters);; ++GOBJECT_FUNC GObject* g_object_new_valist (GType object_type, + const gchar *first_property_name, +- va_list var_args); +-void g_object_set (gpointer object, ++ va_list var_args);; ++GOBJECT_FUNC void g_object_set (gpointer object, + const gchar *first_property_name, +- ...); +-void g_object_get (gpointer object, ++ ...);; ++GOBJECT_FUNC void g_object_get (gpointer object, + const gchar *first_property_name, +- ...); +-gpointer g_object_connect (gpointer object, ++ ...);; ++GOBJECT_FUNC gpointer g_object_connect (gpointer object, + const gchar *signal_spec, +- ...); +-void g_object_disconnect (gpointer object, ++ ...);; ++GOBJECT_FUNC void g_object_disconnect (gpointer object, + const gchar *signal_spec, +- ...); +-void g_object_set_valist (GObject *object, ++ ...);; ++GOBJECT_FUNC void g_object_set_valist (GObject *object, + const gchar *first_property_name, +- va_list var_args); +-void g_object_get_valist (GObject *object, ++ va_list var_args);; ++GOBJECT_FUNC void g_object_get_valist (GObject *object, + const gchar *first_property_name, +- va_list var_args); +-void g_object_set_property (GObject *object, ++ va_list var_args);; ++GOBJECT_FUNC void g_object_set_property (GObject *object, + const gchar *property_name, +- const GValue *value); +-void g_object_get_property (GObject *object, ++ const GValue *value);; ++GOBJECT_FUNC void g_object_get_property (GObject *object, + const gchar *property_name, +- GValue *value); +-void g_object_freeze_notify (GObject *object); +-void g_object_notify (GObject *object, +- const gchar *property_name); +-void g_object_thaw_notify (GObject *object); +-gpointer g_object_ref (gpointer object); +-void g_object_unref (gpointer object); +-void g_object_weak_ref (GObject *object, ++ GValue *value);; ++GOBJECT_FUNC void g_object_freeze_notify (GObject *object);; ++GOBJECT_FUNC void g_object_notify (GObject *object, ++ const gchar *property_name);; ++GOBJECT_FUNC void g_object_thaw_notify (GObject *object);; ++GOBJECT_FUNC gpointer g_object_ref (gpointer object);; ++GOBJECT_FUNC void g_object_unref (gpointer object);; ++GOBJECT_FUNC void g_object_weak_ref (GObject *object, + GWeakNotify notify, +- gpointer data); +-void g_object_weak_unref (GObject *object, ++ gpointer data);; ++GOBJECT_FUNC void g_object_weak_unref (GObject *object, + GWeakNotify notify, +- gpointer data); +-void g_object_add_weak_pointer (GObject *object, +- gpointer *weak_pointer_location); +-void g_object_remove_weak_pointer (GObject *object, +- gpointer *weak_pointer_location); +-gpointer g_object_get_qdata (GObject *object, +- GQuark quark); +-void g_object_set_qdata (GObject *object, ++ gpointer data);; ++GOBJECT_FUNC void g_object_add_weak_pointer (GObject *object, ++ gpointer *weak_pointer_location);; ++GOBJECT_FUNC void g_object_remove_weak_pointer (GObject *object, ++ gpointer *weak_pointer_location);; ++GOBJECT_FUNC gpointer g_object_get_qdata (GObject *object, ++ GQuark quark);; ++GOBJECT_FUNC void g_object_set_qdata (GObject *object, + GQuark quark, +- gpointer data); +-void g_object_set_qdata_full (GObject *object, ++ gpointer data);; ++GOBJECT_FUNC void g_object_set_qdata_full (GObject *object, + GQuark quark, + gpointer data, +- GDestroyNotify destroy); +-gpointer g_object_steal_qdata (GObject *object, +- GQuark quark); +-gpointer g_object_get_data (GObject *object, +- const gchar *key); +-void g_object_set_data (GObject *object, ++ GDestroyNotify destroy);; ++GOBJECT_FUNC gpointer g_object_steal_qdata (GObject *object, ++ GQuark quark);; ++GOBJECT_FUNC gpointer g_object_get_data (GObject *object, ++ const gchar *key);; ++GOBJECT_FUNC void g_object_set_data (GObject *object, + const gchar *key, +- gpointer data); +-void g_object_set_data_full (GObject *object, ++ gpointer data);; ++GOBJECT_FUNC void g_object_set_data_full (GObject *object, + const gchar *key, + gpointer data, +- GDestroyNotify destroy); +-gpointer g_object_steal_data (GObject *object, +- const gchar *key); +-void g_object_watch_closure (GObject *object, +- GClosure *closure); +-GClosure* g_cclosure_new_object (GCallback callback_func, +- GObject *object); +-GClosure* g_cclosure_new_object_swap (GCallback callback_func, +- GObject *object); +-GClosure* g_closure_new_object (guint sizeof_closure, +- GObject *object); +-void g_value_set_object (GValue *value, +- gpointer v_object); +-gpointer g_value_get_object (const GValue *value); +-GObject* g_value_dup_object (const GValue *value); +-gulong g_signal_connect_object (gpointer instance, ++ GDestroyNotify destroy);; ++GOBJECT_FUNC gpointer g_object_steal_data (GObject *object, ++ const gchar *key);; ++GOBJECT_FUNC void g_object_watch_closure (GObject *object, ++ GClosure *closure);; ++GOBJECT_FUNC GClosure* g_cclosure_new_object (GCallback callback_func, ++ GObject *object);; ++GOBJECT_FUNC GClosure* g_cclosure_new_object_swap (GCallback callback_func, ++ GObject *object);; ++GOBJECT_FUNC GClosure* g_closure_new_object (guint sizeof_closure, ++ GObject *object);; ++GOBJECT_FUNC void g_value_set_object (GValue *value, ++ gpointer v_object);; ++GOBJECT_FUNC gpointer g_value_get_object (const GValue *value);; ++GOBJECT_FUNC GObject* g_value_dup_object (const GValue *value);; ++GOBJECT_FUNC gulong g_signal_connect_object (gpointer instance, + const gchar *detailed_signal, + GCallback c_handler, + gpointer gobject, +- GConnectFlags connect_flags); ++ GConnectFlags connect_flags);; + + + /*< protected >*/ +-void g_object_run_dispose (GObject *object); ++GOBJECT_FUNC void g_object_run_dispose (GObject *object);; + + +-void g_value_take_object (GValue *value, +- gpointer v_object); ++GOBJECT_FUNC void g_value_take_object (GValue *value, ++ gpointer v_object);; + #ifndef G_DISABLE_DEPRECATED +-void g_value_set_object_take_ownership (GValue *value, +- gpointer v_object); ++GOBJECT_FUNC void g_value_set_object_take_ownership (GValue *value, ++ gpointer v_object);; + #endif + + /* --- implementation macros --- */ +--- glib-2.4.6/gobject/gparam.h~visibility.patch ++++ glib-2.4.6/gobject/gparam.h +@@ -109,49 +109,49 @@ + + + /* --- prototypes --- */ +-GParamSpec* g_param_spec_ref (GParamSpec *pspec); +-void g_param_spec_unref (GParamSpec *pspec); +-void g_param_spec_sink (GParamSpec *pspec); +-gpointer g_param_spec_get_qdata (GParamSpec *pspec, +- GQuark quark); +-void g_param_spec_set_qdata (GParamSpec *pspec, ++GOBJECT_FUNC GParamSpec* g_param_spec_ref (GParamSpec *pspec);; ++GOBJECT_FUNC void g_param_spec_unref (GParamSpec *pspec);; ++GOBJECT_FUNC void g_param_spec_sink (GParamSpec *pspec);; ++GOBJECT_FUNC gpointer g_param_spec_get_qdata (GParamSpec *pspec, ++ GQuark quark);; ++GOBJECT_FUNC void g_param_spec_set_qdata (GParamSpec *pspec, + GQuark quark, +- gpointer data); +-void g_param_spec_set_qdata_full (GParamSpec *pspec, ++ gpointer data);; ++GOBJECT_FUNC void g_param_spec_set_qdata_full (GParamSpec *pspec, + GQuark quark, + gpointer data, +- GDestroyNotify destroy); +-gpointer g_param_spec_steal_qdata (GParamSpec *pspec, +- GQuark quark); +-GParamSpec* g_param_spec_get_redirect_target (GParamSpec *pspec); ++ GDestroyNotify destroy);; ++GOBJECT_FUNC gpointer g_param_spec_steal_qdata (GParamSpec *pspec, ++ GQuark quark);; ++GOBJECT_FUNC GParamSpec* g_param_spec_get_redirect_target (GParamSpec *pspec);; + +-void g_param_value_set_default (GParamSpec *pspec, +- GValue *value); +-gboolean g_param_value_defaults (GParamSpec *pspec, +- GValue *value); +-gboolean g_param_value_validate (GParamSpec *pspec, +- GValue *value); +-gboolean g_param_value_convert (GParamSpec *pspec, ++GOBJECT_FUNC void g_param_value_set_default (GParamSpec *pspec, ++ GValue *value);; ++GOBJECT_FUNC gboolean g_param_value_defaults (GParamSpec *pspec, ++ GValue *value);; ++GOBJECT_FUNC gboolean g_param_value_validate (GParamSpec *pspec, ++ GValue *value);; ++GOBJECT_FUNC gboolean g_param_value_convert (GParamSpec *pspec, + const GValue *src_value, + GValue *dest_value, +- gboolean strict_validation); +-gint g_param_values_cmp (GParamSpec *pspec, ++ gboolean strict_validation);; ++GOBJECT_FUNC gint g_param_values_cmp (GParamSpec *pspec, + const GValue *value1, +- const GValue *value2); +-G_CONST_RETURN gchar* g_param_spec_get_name (GParamSpec *pspec); +-G_CONST_RETURN gchar* g_param_spec_get_nick (GParamSpec *pspec); +-G_CONST_RETURN gchar* g_param_spec_get_blurb (GParamSpec *pspec); +-void g_value_set_param (GValue *value, +- GParamSpec *param); +-GParamSpec* g_value_get_param (const GValue *value); +-GParamSpec* g_value_dup_param (const GValue *value); ++ const GValue *value2);; ++GOBJECT_FUNC G_CONST_RETURN gchar* g_param_spec_get_name (GParamSpec *pspec);; ++GOBJECT_FUNC G_CONST_RETURN gchar* g_param_spec_get_nick (GParamSpec *pspec);; ++GOBJECT_FUNC G_CONST_RETURN gchar* g_param_spec_get_blurb (GParamSpec *pspec);; ++GOBJECT_FUNC void g_value_set_param (GValue *value, ++ GParamSpec *param);; ++GOBJECT_FUNC GParamSpec* g_value_get_param (const GValue *value);; ++GOBJECT_FUNC GParamSpec* g_value_dup_param (const GValue *value);; + + +-void g_value_take_param (GValue *value, +- GParamSpec *param); ++GOBJECT_FUNC void g_value_take_param (GValue *value, ++ GParamSpec *param);; + #ifndef G_DISABLE_DEPRECATED +-void g_value_set_param_take_ownership (GValue *value, +- GParamSpec *param); ++GOBJECT_FUNC void g_value_set_param_take_ownership (GValue *value, ++ GParamSpec *param);; + #endif + + /* --- convenience functions --- */ +@@ -174,36 +174,36 @@ + const GValue *value1, + const GValue *value2); + }; +-GType g_param_type_register_static (const gchar *name, +- const GParamSpecTypeInfo *pspec_info); ++GOBJECT_FUNC GType g_param_type_register_static (const gchar *name, ++ const GParamSpecTypeInfo *pspec_info);; + + /* For registering builting types */ +-GType _g_param_type_register_static_constant (const gchar *name, ++GOBJECT_FUNC GType _g_param_type_register_static_constant (const gchar *name, + const GParamSpecTypeInfo *pspec_info, + GType opt_type); + + + /* --- protected --- */ +-gpointer g_param_spec_internal (GType param_type, ++GOBJECT_FUNC gpointer g_param_spec_internal (GType param_type, + const gchar *name, + const gchar *nick, + const gchar *blurb, +- GParamFlags flags); +-GParamSpecPool* g_param_spec_pool_new (gboolean type_prefixing); +-void g_param_spec_pool_insert (GParamSpecPool *pool, ++ GParamFlags flags);; ++GOBJECT_FUNC GParamSpecPool* g_param_spec_pool_new (gboolean type_prefixing);; ++GOBJECT_FUNC void g_param_spec_pool_insert (GParamSpecPool *pool, + GParamSpec *pspec, +- GType owner_type); +-void g_param_spec_pool_remove (GParamSpecPool *pool, +- GParamSpec *pspec); +-GParamSpec* g_param_spec_pool_lookup (GParamSpecPool *pool, ++ GType owner_type);; ++GOBJECT_FUNC void g_param_spec_pool_remove (GParamSpecPool *pool, ++ GParamSpec *pspec);; ++GOBJECT_FUNC GParamSpec* g_param_spec_pool_lookup (GParamSpecPool *pool, + const gchar *param_name, + GType owner_type, +- gboolean walk_ancestors); +-GList* g_param_spec_pool_list_owned (GParamSpecPool *pool, +- GType owner_type); +-GParamSpec** g_param_spec_pool_list (GParamSpecPool *pool, ++ gboolean walk_ancestors);; ++GOBJECT_FUNC GList* g_param_spec_pool_list_owned (GParamSpecPool *pool, ++ GType owner_type);; ++GOBJECT_FUNC GParamSpec** g_param_spec_pool_list (GParamSpecPool *pool, + GType owner_type, +- guint *n_pspecs_p); ++ guint *n_pspecs_p);; + + + +--- glib-2.4.6/gobject/gparamspecs.h~visibility.patch ++++ glib-2.4.6/gobject/gparamspecs.h +@@ -270,154 +270,130 @@ + }; + + /* --- GParamSpec prototypes --- */ +-GParamSpec* g_param_spec_char (const gchar *name, ++GOBJECT_FUNC GParamSpec* g_param_spec_char (const gchar *name, + const gchar *nick, + const gchar *blurb, + gint8 minimum, + gint8 maximum, + gint8 default_value, +- GParamFlags flags); +-GParamSpec* g_param_spec_uchar (const gchar *name, ++ GParamFlags flags);; ++GOBJECT_FUNC GParamSpec* g_param_spec_uchar (const gchar *name, + const gchar *nick, + const gchar *blurb, + guint8 minimum, + guint8 maximum, + guint8 default_value, +- GParamFlags flags); +-GParamSpec* g_param_spec_boolean (const gchar *name, ++ GParamFlags flags);; ++GOBJECT_FUNC GParamSpec* g_param_spec_boolean (const gchar *name, + const gchar *nick, + const gchar *blurb, + gboolean default_value, +- GParamFlags flags); +-GParamSpec* g_param_spec_int (const gchar *name, ++ GParamFlags flags);; ++GOBJECT_FUNC GParamSpec* g_param_spec_int (const gchar *name, + const gchar *nick, + const gchar *blurb, + gint minimum, + gint maximum, + gint default_value, +- GParamFlags flags); +-GParamSpec* g_param_spec_uint (const gchar *name, ++ GParamFlags flags);; ++GOBJECT_FUNC GParamSpec* g_param_spec_uint (const gchar *name, + const gchar *nick, + const gchar *blurb, + guint minimum, + guint maximum, + guint default_value, +- GParamFlags flags); +-GParamSpec* g_param_spec_long (const gchar *name, ++ GParamFlags flags);; ++GOBJECT_FUNC GParamSpec* g_param_spec_long (const gchar *name, + const gchar *nick, + const gchar *blurb, + glong minimum, + glong maximum, + glong default_value, +- GParamFlags flags); +-GParamSpec* g_param_spec_ulong (const gchar *name, ++ GParamFlags flags);; ++GOBJECT_FUNC GParamSpec* g_param_spec_ulong (const gchar *name, + const gchar *nick, + const gchar *blurb, + gulong minimum, + gulong maximum, + gulong default_value, +- GParamFlags flags); +-GParamSpec* g_param_spec_int64 (const gchar *name, ++ GParamFlags flags);; ++GOBJECT_FUNC GParamSpec* g_param_spec_int64 (const gchar *name, + const gchar *nick, + const gchar *blurb, + gint64 minimum, + gint64 maximum, + gint64 default_value, +- GParamFlags flags); +-GParamSpec* g_param_spec_uint64 (const gchar *name, ++ GParamFlags flags);; ++GOBJECT_FUNC GParamSpec* g_param_spec_uint64 (const gchar *name, + const gchar *nick, + const gchar *blurb, + guint64 minimum, + guint64 maximum, + guint64 default_value, +- GParamFlags flags); +-GParamSpec* g_param_spec_unichar (const gchar *name, ++ GParamFlags flags);; ++GOBJECT_FUNC GParamSpec* g_param_spec_unichar (const gchar *name, + const gchar *nick, + const gchar *blurb, + gunichar default_value, +- GParamFlags flags); +-GParamSpec* g_param_spec_enum (const gchar *name, ++ GParamFlags flags);; ++GOBJECT_FUNC GParamSpec* g_param_spec_enum (const gchar *name, + const gchar *nick, + const gchar *blurb, + GType enum_type, + gint default_value, +- GParamFlags flags); +-GParamSpec* g_param_spec_flags (const gchar *name, ++ GParamFlags flags);; ++GOBJECT_FUNC GParamSpec* g_param_spec_flags (const gchar *name, + const gchar *nick, + const gchar *blurb, + GType flags_type, + guint default_value, +- GParamFlags flags); +-GParamSpec* g_param_spec_float (const gchar *name, ++ GParamFlags flags);; ++GOBJECT_FUNC GParamSpec* g_param_spec_float (const gchar *name, + const gchar *nick, + const gchar *blurb, + gfloat minimum, + gfloat maximum, + gfloat default_value, +- GParamFlags flags); +-GParamSpec* g_param_spec_double (const gchar *name, ++ GParamFlags flags);; ++GOBJECT_FUNC GParamSpec* g_param_spec_double (const gchar *name, + const gchar *nick, + const gchar *blurb, + gdouble minimum, + gdouble maximum, + gdouble default_value, +- GParamFlags flags); +-GParamSpec* g_param_spec_string (const gchar *name, ++ GParamFlags flags);; ++GOBJECT_FUNC GParamSpec* g_param_spec_string (const gchar *name, + const gchar *nick, + const gchar *blurb, + const gchar *default_value, +- GParamFlags flags); +-GParamSpec* g_param_spec_param (const gchar *name, ++ GParamFlags flags);; ++GOBJECT_FUNC GParamSpec* g_param_spec_param (const gchar *name, + const gchar *nick, + const gchar *blurb, + GType param_type, +- GParamFlags flags); +-GParamSpec* g_param_spec_boxed (const gchar *name, ++ GParamFlags flags);; ++GOBJECT_FUNC GParamSpec* g_param_spec_boxed (const gchar *name, + const gchar *nick, + const gchar *blurb, + GType boxed_type, +- GParamFlags flags); +-GParamSpec* g_param_spec_pointer (const gchar *name, ++ GParamFlags flags);; ++GOBJECT_FUNC GParamSpec* g_param_spec_pointer (const gchar *name, + const gchar *nick, + const gchar *blurb, +- GParamFlags flags); +-GParamSpec* g_param_spec_value_array (const gchar *name, ++ GParamFlags flags);; ++GOBJECT_FUNC GParamSpec* g_param_spec_value_array (const gchar *name, + const gchar *nick, + const gchar *blurb, + GParamSpec *element_spec, +- GParamFlags flags); +-GParamSpec* g_param_spec_object (const gchar *name, ++ GParamFlags flags);; ++GOBJECT_FUNC GParamSpec* g_param_spec_object (const gchar *name, + const gchar *nick, + const gchar *blurb, + GType object_type, +- GParamFlags flags); +- +-GParamSpec* g_param_spec_override (const gchar *name, +- GParamSpec *overridden); ++ GParamFlags flags);; + +-/* --- internal --- */ +-/* We prefix variable declarations so they can +- * properly get exported in windows dlls. +- */ +-#ifndef GOBJECT_VAR +-# ifdef G_PLATFORM_WIN32 +-# ifdef GOBJECT_STATIC_COMPILATION +-# define GOBJECT_VAR extern +-# else /* !GOBJECT_STATIC_COMPILATION */ +-# ifdef GOBJECT_COMPILATION +-# ifdef DLL_EXPORT +-# define GOBJECT_VAR __declspec(dllexport) +-# else /* !DLL_EXPORT */ +-# define GOBJECT_VAR extern +-# endif /* !DLL_EXPORT */ +-# else /* !GOBJECT_COMPILATION */ +-# define GOBJECT_VAR extern __declspec(dllimport) +-# endif /* !GOBJECT_COMPILATION */ +-# endif /* !GOBJECT_STATIC_COMPILATION */ +-# else /* !G_PLATFORM_WIN32 */ +-# define GOBJECT_VAR extern +-# endif /* !G_PLATFORM_WIN32 */ +-#endif /* GOBJECT_VAR */ ++GOBJECT_FUNC GParamSpec* g_param_spec_override (const gchar *name, ++ GParamSpec *overridden);; + + GOBJECT_VAR GType *g_param_spec_types; + +--- glib-2.4.6/gobject/gsignal.h~visibility.patch ++++ glib-2.4.6/gobject/gsignal.h +@@ -94,7 +94,7 @@ + + + /* --- signals --- */ +-guint g_signal_newv (const gchar *signal_name, ++GOBJECT_FUNC guint g_signal_newv (const gchar *signal_name, + GType itype, + GSignalFlags signal_flags, + GClosure *class_closure, +@@ -103,8 +103,8 @@ + GSignalCMarshaller c_marshaller, + GType return_type, + guint n_params, +- GType *param_types); +-guint g_signal_new_valist (const gchar *signal_name, ++ GType *param_types);; ++GOBJECT_FUNC guint g_signal_new_valist (const gchar *signal_name, + GType itype, + GSignalFlags signal_flags, + GClosure *class_closure, +@@ -113,8 +113,8 @@ + GSignalCMarshaller c_marshaller, + GType return_type, + guint n_params, +- va_list args); +-guint g_signal_new (const gchar *signal_name, ++ va_list args);; ++GOBJECT_FUNC guint g_signal_new (const gchar *signal_name, + GType itype, + GSignalFlags signal_flags, + guint class_offset, +@@ -123,116 +123,116 @@ + GSignalCMarshaller c_marshaller, + GType return_type, + guint n_params, +- ...); +-void g_signal_emitv (const GValue *instance_and_params, ++ ...);; ++GOBJECT_FUNC void g_signal_emitv (const GValue *instance_and_params, + guint signal_id, + GQuark detail, +- GValue *return_value); +-void g_signal_emit_valist (gpointer instance, ++ GValue *return_value);; ++GOBJECT_FUNC void g_signal_emit_valist (gpointer instance, + guint signal_id, + GQuark detail, +- va_list var_args); +-void g_signal_emit (gpointer instance, ++ va_list var_args);; ++GOBJECT_FUNC void g_signal_emit (gpointer instance, + guint signal_id, + GQuark detail, +- ...); +-void g_signal_emit_by_name (gpointer instance, ++ ...);; ++GOBJECT_FUNC void g_signal_emit_by_name (gpointer instance, + const gchar *detailed_signal, +- ...); +-guint g_signal_lookup (const gchar *name, +- GType itype); +-G_CONST_RETURN gchar* g_signal_name (guint signal_id); +-void g_signal_query (guint signal_id, +- GSignalQuery *query); +-guint* g_signal_list_ids (GType itype, +- guint *n_ids); +-gboolean g_signal_parse_name (const gchar *detailed_signal, ++ ...);; ++GOBJECT_FUNC guint g_signal_lookup (const gchar *name, ++ GType itype);; ++GOBJECT_FUNC G_CONST_RETURN gchar* g_signal_name (guint signal_id);; ++GOBJECT_FUNC void g_signal_query (guint signal_id, ++ GSignalQuery *query);; ++GOBJECT_FUNC guint* g_signal_list_ids (GType itype, ++ guint *n_ids);; ++GOBJECT_FUNC gboolean g_signal_parse_name (const gchar *detailed_signal, + GType itype, + guint *signal_id_p, + GQuark *detail_p, +- gboolean force_detail_quark); +-GSignalInvocationHint* g_signal_get_invocation_hint (gpointer instance); ++ gboolean force_detail_quark);; ++GOBJECT_FUNC GSignalInvocationHint* g_signal_get_invocation_hint (gpointer instance);; + + + /* --- signal emissions --- */ +-void g_signal_stop_emission (gpointer instance, ++GOBJECT_FUNC void g_signal_stop_emission (gpointer instance, + guint signal_id, +- GQuark detail); +-void g_signal_stop_emission_by_name (gpointer instance, +- const gchar *detailed_signal); +-gulong g_signal_add_emission_hook (guint signal_id, ++ GQuark detail);; ++GOBJECT_FUNC void g_signal_stop_emission_by_name (gpointer instance, ++ const gchar *detailed_signal);; ++GOBJECT_FUNC gulong g_signal_add_emission_hook (guint signal_id, + GQuark detail, + GSignalEmissionHook hook_func, + gpointer hook_data, +- GDestroyNotify data_destroy); +-void g_signal_remove_emission_hook (guint signal_id, +- gulong hook_id); ++ GDestroyNotify data_destroy);; ++GOBJECT_FUNC void g_signal_remove_emission_hook (guint signal_id, ++ gulong hook_id);; + + + /* --- signal handlers --- */ +-gboolean g_signal_has_handler_pending (gpointer instance, ++GOBJECT_FUNC gboolean g_signal_has_handler_pending (gpointer instance, + guint signal_id, + GQuark detail, +- gboolean may_be_blocked); +-gulong g_signal_connect_closure_by_id (gpointer instance, ++ gboolean may_be_blocked);; ++GOBJECT_FUNC gulong g_signal_connect_closure_by_id (gpointer instance, + guint signal_id, + GQuark detail, + GClosure *closure, +- gboolean after); +-gulong g_signal_connect_closure (gpointer instance, ++ gboolean after);; ++GOBJECT_FUNC gulong g_signal_connect_closure (gpointer instance, + const gchar *detailed_signal, + GClosure *closure, +- gboolean after); +-gulong g_signal_connect_data (gpointer instance, ++ gboolean after);; ++GOBJECT_FUNC gulong g_signal_connect_data (gpointer instance, + const gchar *detailed_signal, + GCallback c_handler, + gpointer data, + GClosureNotify destroy_data, +- GConnectFlags connect_flags); +-void g_signal_handler_block (gpointer instance, +- gulong handler_id); +-void g_signal_handler_unblock (gpointer instance, +- gulong handler_id); +-void g_signal_handler_disconnect (gpointer instance, +- gulong handler_id); +-gboolean g_signal_handler_is_connected (gpointer instance, +- gulong handler_id); +-gulong g_signal_handler_find (gpointer instance, ++ GConnectFlags connect_flags);; ++GOBJECT_FUNC void g_signal_handler_block (gpointer instance, ++ gulong handler_id);; ++GOBJECT_FUNC void g_signal_handler_unblock (gpointer instance, ++ gulong handler_id);; ++GOBJECT_FUNC void g_signal_handler_disconnect (gpointer instance, ++ gulong handler_id);; ++GOBJECT_FUNC gboolean g_signal_handler_is_connected (gpointer instance, ++ gulong handler_id);; ++GOBJECT_FUNC gulong g_signal_handler_find (gpointer instance, + GSignalMatchType mask, + guint signal_id, + GQuark detail, + GClosure *closure, + gpointer func, +- gpointer data); +-guint g_signal_handlers_block_matched (gpointer instance, ++ gpointer data);; ++GOBJECT_FUNC guint g_signal_handlers_block_matched (gpointer instance, + GSignalMatchType mask, + guint signal_id, + GQuark detail, + GClosure *closure, + gpointer func, +- gpointer data); +-guint g_signal_handlers_unblock_matched (gpointer instance, ++ gpointer data);; ++GOBJECT_FUNC guint g_signal_handlers_unblock_matched (gpointer instance, + GSignalMatchType mask, + guint signal_id, + GQuark detail, + GClosure *closure, + gpointer func, +- gpointer data); +-guint g_signal_handlers_disconnect_matched (gpointer instance, ++ gpointer data);; ++GOBJECT_FUNC guint g_signal_handlers_disconnect_matched (gpointer instance, + GSignalMatchType mask, + guint signal_id, + GQuark detail, + GClosure *closure, + gpointer func, +- gpointer data); ++ gpointer data);; + + + /* --- chaining for language bindings --- */ +-void g_signal_override_class_closure (guint signal_id, ++GOBJECT_FUNC void g_signal_override_class_closure (guint signal_id, + GType instance_type, +- GClosure *class_closure); +-void g_signal_chain_from_overridden (const GValue *instance_and_params, +- GValue *return_value); ++ GClosure *class_closure);; ++GOBJECT_FUNC void g_signal_chain_from_overridden (const GValue *instance_and_params, ++ GValue *return_value);; + + + /* --- convenience --- */ +@@ -256,13 +256,13 @@ + 0, 0, NULL, (func), (data)) + + +-gboolean g_signal_accumulator_true_handled (GSignalInvocationHint *ihint, ++GOBJECT_FUNC gboolean g_signal_accumulator_true_handled (GSignalInvocationHint *ihint, + GValue *return_accu, + const GValue *handler_return, +- gpointer dummy); ++ gpointer dummy);; + + /*< private >*/ +-void g_signal_handlers_destroy (gpointer instance); ++GOBJECT_FUNC void g_signal_handlers_destroy (gpointer instance);; + void _g_signals_destroy (GType itype); + + G_END_DECLS +--- glib-2.4.6/gobject/gsourceclosure.h~visibility.patch ++++ glib-2.4.6/gobject/gsourceclosure.h +@@ -27,11 +27,11 @@ + + G_BEGIN_DECLS + +-void g_source_set_closure (GSource *source, +- GClosure *closure); ++GOBJECT_FUNC void g_source_set_closure (GSource *source, ++ GClosure *closure);; + +-GType g_io_channel_get_type (void); +-GType g_io_condition_get_type (void); ++GOBJECT_FUNC GType g_io_channel_get_type (void);; ++GOBJECT_FUNC GType g_io_condition_get_type (void);; + + #define G_TYPE_IO_CHANNEL (g_io_channel_get_type ()) + #define G_TYPE_IO_CONDITION (g_io_condition_get_type ()) +--- glib-2.4.6/gobject/gtype.h~visibility.patch ++++ glib-2.4.6/gobject/gtype.h +@@ -27,6 +27,63 @@ + + G_BEGIN_DECLS + ++/* We prefix variable declarations so they can ++ * properly get exported in windows dlls. ++ */ ++#ifndef GOBJECT_VAR ++# ifdef G_PLATFORM_WIN32 ++# ifdef GOBJECT_STATIC_COMPILATION ++# define GOBJECT_VAR extern ++# else /* !GOBJECT_STATIC_COMPILATION */ ++# ifdef GOBJECT_COMPILATION ++# ifdef DLL_EXPORT ++# define GOBJECT_VAR __declspec(dllexport) ++# else /* !DLL_EXPORT */ ++# define GOBJECT_VAR extern ++# endif /* !DLL_EXPORT */ ++# else /* !GOBJECT_COMPILATION */ ++# define GOBJECT_VAR extern __declspec(dllimport) ++# endif /* !GOBJECT_COMPILATION */ ++# endif /* !GOBJECT_STATIC_COMPILATION */ ++# else /* !G_PLATFORM_WIN32 */ ++# ifdef GOBJECT_STATIC_COMPILATION ++# define GOBJECT_VAR extern ++# else /* !GOBJECT_STATIC_COMPILATION */ ++# ifdef GOBJECT_COMPILATION ++# ifdef GCC_HASCLASSVISIBILITY ++# define GOBJECT_VAR __attribute__ ((visibility("default"))) ++# endif ++# endif /* !GOBJECT_COMPILATION */ ++# endif /* !GOBJECT_STATIC_COMPILATION */ ++# ifndef GOBJECT_VAR ++# define GOBJECT_VAR extern ++# endif /* !GOBJECT_VAR */ ++# endif /* !G_PLATFORM_WIN32 */ ++#endif /* GOBJECT_VAR */ ++ ++#ifndef GOBJECT_FUNC ++# ifdef G_PLATFORM_WIN32 ++# ifndef GOBJECT_STATIC_COMPILATION ++# ifdef GOBJECT_COMPILATION ++# define GOBJECT_FUNC __declspec(dllexport) ++# else /* !GOBJECT_COMPILATION */ ++# define GOBJECT_FUNC __declspec(dllimport) ++# endif /* !GOBJECT_COMPILATION */ ++# endif /* !GOBJECT_STATIC_COMPILATION */ ++# else /* !G_PLATFORM_WIN32 */ ++# ifndef GOBJECT_STATIC_COMPILATION ++# ifdef GOBJECT_COMPILATION ++# ifdef GCC_HASCLASSVISIBILITY ++# define GOBJECT_FUNC __attribute__ ((visibility("default"))) ++# endif ++# endif /* !GOBJECT_COMPILATION */ ++# endif /* !GOBJECT_STATIC_COMPILATION */ ++# ifndef GOBJECT_FUNC ++# define GOBJECT_FUNC ++# endif /* !GOBJECT_FUNC */ ++# endif /* !G_PLATFORM_WIN32 */ ++#endif /* GOBJECT_FUNC */ ++ + /* Basic Type Macros + */ + #define G_TYPE_FUNDAMENTAL(type) (g_type_fundamental (type)) +@@ -164,44 +221,44 @@ + + + /* --- prototypes --- */ +-void g_type_init (void); +-void g_type_init_with_debug_flags (GTypeDebugFlags debug_flags); +-G_CONST_RETURN gchar* g_type_name (GType type); +-GQuark g_type_qname (GType type); +-GType g_type_from_name (const gchar *name); +-GType g_type_parent (GType type); +-guint g_type_depth (GType type); +-GType g_type_next_base (GType leaf_type, +- GType root_type); +-gboolean g_type_is_a (GType type, +- GType is_a_type); +-gpointer g_type_class_ref (GType type); +-gpointer g_type_class_peek (GType type); +-gpointer g_type_class_peek_static (GType type); +-void g_type_class_unref (gpointer g_class); +-gpointer g_type_class_peek_parent (gpointer g_class); +-gpointer g_type_interface_peek (gpointer instance_class, +- GType iface_type); +-gpointer g_type_interface_peek_parent (gpointer g_iface); ++GOBJECT_FUNC void g_type_init (void);; ++GOBJECT_FUNC void g_type_init_with_debug_flags (GTypeDebugFlags debug_flags);; ++GOBJECT_FUNC G_CONST_RETURN gchar* g_type_name (GType type);; ++GOBJECT_FUNC GQuark g_type_qname (GType type);; ++GOBJECT_FUNC GType g_type_from_name (const gchar *name);; ++GOBJECT_FUNC GType g_type_parent (GType type);; ++GOBJECT_FUNC guint g_type_depth (GType type);; ++GOBJECT_FUNC GType g_type_next_base (GType leaf_type, ++ GType root_type);; ++GOBJECT_FUNC gboolean g_type_is_a (GType type, ++ GType is_a_type);; ++GOBJECT_FUNC gpointer g_type_class_ref (GType type);; ++GOBJECT_FUNC gpointer g_type_class_peek (GType type);; ++GOBJECT_FUNC gpointer g_type_class_peek_static (GType type);; ++GOBJECT_FUNC void g_type_class_unref (gpointer g_class);; ++GOBJECT_FUNC gpointer g_type_class_peek_parent (gpointer g_class);; ++GOBJECT_FUNC gpointer g_type_interface_peek (gpointer instance_class, ++ GType iface_type);; ++GOBJECT_FUNC gpointer g_type_interface_peek_parent (gpointer g_iface);; + +-gpointer g_type_default_interface_ref (GType g_type); +-gpointer g_type_default_interface_peek (GType g_type); +-void g_type_default_interface_unref (gpointer g_iface); ++GOBJECT_FUNC gpointer g_type_default_interface_ref (GType g_type);; ++GOBJECT_FUNC gpointer g_type_default_interface_peek (GType g_type);; ++GOBJECT_FUNC void g_type_default_interface_unref (gpointer g_iface);; + + /* g_free() the returned arrays */ +-GType* g_type_children (GType type, +- guint *n_children); +-GType* g_type_interfaces (GType type, +- guint *n_interfaces); ++GOBJECT_FUNC GType* g_type_children (GType type, ++ guint *n_children);; ++GOBJECT_FUNC GType* g_type_interfaces (GType type, ++ guint *n_interfaces);; + + /* per-type _static_ data */ +-void g_type_set_qdata (GType type, ++GOBJECT_FUNC void g_type_set_qdata (GType type, + GQuark quark, +- gpointer data); +-gpointer g_type_get_qdata (GType type, +- GQuark quark); +-void g_type_query (GType type, +- GTypeQuery *query); ++ gpointer data);; ++GOBJECT_FUNC gpointer g_type_get_qdata (GType type, ++ GQuark quark);; ++GOBJECT_FUNC void g_type_query (GType type, ++ GTypeQuery *query);; + + + /* --- type registration --- */ +@@ -283,33 +340,33 @@ + GTypeCValue *collect_values, + guint collect_flags); + }; +-GType g_type_register_static (GType parent_type, ++GOBJECT_FUNC GType g_type_register_static (GType parent_type, + const gchar *type_name, + const GTypeInfo *info, +- GTypeFlags flags); +-GType g_type_register_dynamic (GType parent_type, ++ GTypeFlags flags);; ++GOBJECT_FUNC GType g_type_register_dynamic (GType parent_type, + const gchar *type_name, + GTypePlugin *plugin, +- GTypeFlags flags); +-GType g_type_register_fundamental (GType type_id, ++ GTypeFlags flags);; ++GOBJECT_FUNC GType g_type_register_fundamental (GType type_id, + const gchar *type_name, + const GTypeInfo *info, + const GTypeFundamentalInfo *finfo, +- GTypeFlags flags); +-void g_type_add_interface_static (GType instance_type, ++ GTypeFlags flags);; ++GOBJECT_FUNC void g_type_add_interface_static (GType instance_type, + GType interface_type, +- const GInterfaceInfo *info); +-void g_type_add_interface_dynamic (GType instance_type, ++ const GInterfaceInfo *info);; ++GOBJECT_FUNC void g_type_add_interface_dynamic (GType instance_type, + GType interface_type, +- GTypePlugin *plugin); +-void g_type_interface_add_prerequisite (GType interface_type, +- GType prerequisite_type); +-GType*g_type_interface_prerequisites (GType interface_type, ++ GTypePlugin *plugin);; ++GOBJECT_FUNC void g_type_interface_add_prerequisite (GType interface_type, ++ GType prerequisite_type);; ++GOBJECT_FUNC GType*g_type_interface_prerequisites (GType interface_type, + guint *n_prerequisites); +-void g_type_class_add_private (gpointer g_class, +- gsize private_size); +-gpointer g_type_instance_get_private (GTypeInstance *instance, +- GType private_type); ++GOBJECT_FUNC void g_type_class_add_private (gpointer g_class, ++ gsize private_size);; ++GOBJECT_FUNC gpointer g_type_instance_get_private (GTypeInstance *instance, ++ GType private_type);; + + + /* --- GType boilerplate --- */ +@@ -382,49 +439,49 @@ + + + /* --- protected (for fundamental type implementations) --- */ +-GTypePlugin* g_type_get_plugin (GType type); +-GTypePlugin* g_type_interface_get_plugin (GType instance_type, +- GType interface_type); +-GType g_type_fundamental_next (void); +-GType g_type_fundamental (GType type_id); +-GTypeInstance* g_type_create_instance (GType type); +-void g_type_free_instance (GTypeInstance *instance); ++GOBJECT_FUNC GTypePlugin* g_type_get_plugin (GType type);; ++GOBJECT_FUNC GTypePlugin* g_type_interface_get_plugin (GType instance_type, ++ GType interface_type);; ++GOBJECT_FUNC GType g_type_fundamental_next (void);; ++GOBJECT_FUNC GType g_type_fundamental (GType type_id);; ++GOBJECT_FUNC GTypeInstance* g_type_create_instance (GType type);; ++GOBJECT_FUNC void g_type_free_instance (GTypeInstance *instance);; + +-void g_type_add_class_cache_func (gpointer cache_data, +- GTypeClassCacheFunc cache_func); +-void g_type_remove_class_cache_func (gpointer cache_data, +- GTypeClassCacheFunc cache_func); +-void g_type_class_unref_uncached (gpointer g_class); ++GOBJECT_FUNC void g_type_add_class_cache_func (gpointer cache_data, ++ GTypeClassCacheFunc cache_func);; ++GOBJECT_FUNC void g_type_remove_class_cache_func (gpointer cache_data, ++ GTypeClassCacheFunc cache_func);; ++GOBJECT_FUNC void g_type_class_unref_uncached (gpointer g_class);; + +-void g_type_add_interface_check (gpointer check_data, +- GTypeInterfaceCheckFunc check_func); +-void g_type_remove_interface_check (gpointer check_data, +- GTypeInterfaceCheckFunc chec_func); ++GOBJECT_FUNC void g_type_add_interface_check (gpointer check_data, ++ GTypeInterfaceCheckFunc check_func);; ++GOBJECT_FUNC void g_type_remove_interface_check (gpointer check_data, ++ GTypeInterfaceCheckFunc chec_func);; + +-GTypeValueTable* g_type_value_table_peek (GType type); ++GOBJECT_FUNC GTypeValueTable* g_type_value_table_peek (GType type);; + + + /*< private >*/ +-gboolean g_type_check_instance (GTypeInstance *instance); +-GTypeInstance* g_type_check_instance_cast (GTypeInstance *instance, +- GType iface_type); +-gboolean g_type_check_instance_is_a (GTypeInstance *instance, +- GType iface_type); +-GTypeClass* g_type_check_class_cast (GTypeClass *g_class, +- GType is_a_type); +-gboolean g_type_check_class_is_a (GTypeClass *g_class, +- GType is_a_type); +-gboolean g_type_check_is_value_type (GType type); +-gboolean g_type_check_value (GValue *value); +-gboolean g_type_check_value_holds (GValue *value, +- GType type); +-gboolean g_type_test_flags (GType type, +- guint flags); ++GOBJECT_FUNC gboolean g_type_check_instance (GTypeInstance *instance);; ++GOBJECT_FUNC GTypeInstance* g_type_check_instance_cast (GTypeInstance *instance, ++ GType iface_type);; ++GOBJECT_FUNC gboolean g_type_check_instance_is_a (GTypeInstance *instance, ++ GType iface_type);; ++GOBJECT_FUNC GTypeClass* g_type_check_class_cast (GTypeClass *g_class, ++ GType is_a_type);; ++GOBJECT_FUNC gboolean g_type_check_class_is_a (GTypeClass *g_class, ++ GType is_a_type);; ++GOBJECT_FUNC gboolean g_type_check_is_value_type (GType type);; ++GOBJECT_FUNC gboolean g_type_check_value (GValue *value);; ++GOBJECT_FUNC gboolean g_type_check_value_holds (GValue *value, ++ GType type);; ++GOBJECT_FUNC gboolean g_type_test_flags (GType type, ++ guint flags);; + + + /* --- debugging functions --- */ +-G_CONST_RETURN gchar* g_type_name_from_instance (GTypeInstance *instance); +-G_CONST_RETURN gchar* g_type_name_from_class (GTypeClass *g_class); ++GOBJECT_FUNC G_CONST_RETURN gchar* g_type_name_from_instance (GTypeInstance *instance);; ++GOBJECT_FUNC G_CONST_RETURN gchar* g_type_name_from_class (GTypeClass *g_class);; + + + /* --- implementation bits --- */ +--- glib-2.4.6/gobject/gtypemodule.h~visibility.patch ++++ glib-2.4.6/gobject/gtypemodule.h +@@ -65,20 +65,20 @@ + void (*reserved4) (void); + }; + +-GType g_type_module_get_type (void); +-gboolean g_type_module_use (GTypeModule *module); +-void g_type_module_unuse (GTypeModule *module); +-void g_type_module_set_name (GTypeModule *module, +- const gchar *name); +-GType g_type_module_register_type (GTypeModule *module, ++GOBJECT_FUNC GType g_type_module_get_type (void);; ++GOBJECT_FUNC gboolean g_type_module_use (GTypeModule *module);; ++GOBJECT_FUNC void g_type_module_unuse (GTypeModule *module);; ++GOBJECT_FUNC void g_type_module_set_name (GTypeModule *module, ++ const gchar *name);; ++GOBJECT_FUNC GType g_type_module_register_type (GTypeModule *module, + GType parent_type, + const gchar *type_name, + const GTypeInfo *type_info, +- GTypeFlags flags); +-void g_type_module_add_interface (GTypeModule *module, ++ GTypeFlags flags);; ++GOBJECT_FUNC void g_type_module_add_interface (GTypeModule *module, + GType instance_type, + GType interface_type, +- const GInterfaceInfo *interface_info); ++ const GInterfaceInfo *interface_info);; + + G_END_DECLS + +--- glib-2.4.6/gobject/gtypeplugin.h~visibility.patch ++++ glib-2.4.6/gobject/gtypeplugin.h +@@ -62,17 +62,17 @@ + + + /* --- prototypes --- */ +-GType g_type_plugin_get_type (void) G_GNUC_CONST; +-void g_type_plugin_use (GTypePlugin *plugin); +-void g_type_plugin_unuse (GTypePlugin *plugin); +-void g_type_plugin_complete_type_info (GTypePlugin *plugin, ++GOBJECT_FUNC GType g_type_plugin_get_type (void) G_GNUC_CONST; ++GOBJECT_FUNC void g_type_plugin_use (GTypePlugin *plugin);; ++GOBJECT_FUNC void g_type_plugin_unuse (GTypePlugin *plugin);; ++GOBJECT_FUNC void g_type_plugin_complete_type_info (GTypePlugin *plugin, + GType g_type, + GTypeInfo *info, +- GTypeValueTable *value_table); +-void g_type_plugin_complete_interface_info (GTypePlugin *plugin, ++ GTypeValueTable *value_table);; ++GOBJECT_FUNC void g_type_plugin_complete_interface_info (GTypePlugin *plugin, + GType instance_type, + GType interface_type, +- GInterfaceInfo *info); ++ GInterfaceInfo *info);; + + G_END_DECLS + +--- glib-2.4.6/gobject/gvaluearray.h~visibility.patch ++++ glib-2.4.6/gobject/gvaluearray.h +@@ -46,25 +46,25 @@ + + + /* --- prototypes --- */ +-GValue* g_value_array_get_nth (GValueArray *value_array, +- guint index_); +-GValueArray* g_value_array_new (guint n_prealloced); +-void g_value_array_free (GValueArray *value_array); +-GValueArray* g_value_array_copy (const GValueArray *value_array); +-GValueArray* g_value_array_prepend (GValueArray *value_array, +- const GValue *value); +-GValueArray* g_value_array_append (GValueArray *value_array, +- const GValue *value); +-GValueArray* g_value_array_insert (GValueArray *value_array, ++GOBJECT_FUNC GValue* g_value_array_get_nth (GValueArray *value_array, ++ guint index_);; ++GOBJECT_FUNC GValueArray* g_value_array_new (guint n_prealloced);; ++GOBJECT_FUNC void g_value_array_free (GValueArray *value_array);; ++GOBJECT_FUNC GValueArray* g_value_array_copy (const GValueArray *value_array);; ++GOBJECT_FUNC GValueArray* g_value_array_prepend (GValueArray *value_array, ++ const GValue *value);; ++GOBJECT_FUNC GValueArray* g_value_array_append (GValueArray *value_array, ++ const GValue *value);; ++GOBJECT_FUNC GValueArray* g_value_array_insert (GValueArray *value_array, + guint index_, +- const GValue *value); +-GValueArray* g_value_array_remove (GValueArray *value_array, +- guint index_); +-GValueArray* g_value_array_sort (GValueArray *value_array, +- GCompareFunc compare_func); +-GValueArray* g_value_array_sort_with_data (GValueArray *value_array, ++ const GValue *value);; ++GOBJECT_FUNC GValueArray* g_value_array_remove (GValueArray *value_array, ++ guint index_);; ++GOBJECT_FUNC GValueArray* g_value_array_sort (GValueArray *value_array, ++ GCompareFunc compare_func);; ++GOBJECT_FUNC GValueArray* g_value_array_sort_with_data (GValueArray *value_array, + GCompareDataFunc compare_func, +- gpointer user_data); ++ gpointer user_data);; + + + +--- glib-2.4.6/gobject/gvalue.h~visibility.patch ++++ glib-2.4.6/gobject/gvalue.h +@@ -61,31 +61,31 @@ + + + /* --- prototypes --- */ +-GValue* g_value_init (GValue *value, +- GType g_type); +-void g_value_copy (const GValue *src_value, +- GValue *dest_value); +-GValue* g_value_reset (GValue *value); +-void g_value_unset (GValue *value); +-void g_value_set_instance (GValue *value, +- gpointer instance); ++GOBJECT_FUNC GValue* g_value_init (GValue *value, ++ GType g_type);; ++GOBJECT_FUNC void g_value_copy (const GValue *src_value, ++ GValue *dest_value);; ++GOBJECT_FUNC GValue* g_value_reset (GValue *value);; ++GOBJECT_FUNC void g_value_unset (GValue *value);; ++GOBJECT_FUNC void g_value_set_instance (GValue *value, ++ gpointer instance);; + + + /* --- private --- */ +-gboolean g_value_fits_pointer (const GValue *value); +-gpointer g_value_peek_pointer (const GValue *value); ++GOBJECT_FUNC gboolean g_value_fits_pointer (const GValue *value);; ++GOBJECT_FUNC gpointer g_value_peek_pointer (const GValue *value);; + + + /* --- implementation details --- */ +-gboolean g_value_type_compatible (GType src_type, +- GType dest_type); +-gboolean g_value_type_transformable (GType src_type, +- GType dest_type); +-gboolean g_value_transform (const GValue *src_value, +- GValue *dest_value); +-void g_value_register_transform_func (GType src_type, ++GOBJECT_FUNC gboolean g_value_type_compatible (GType src_type, ++ GType dest_type);; ++GOBJECT_FUNC gboolean g_value_type_transformable (GType src_type, ++ GType dest_type);; ++GOBJECT_FUNC gboolean g_value_transform (const GValue *src_value, ++ GValue *dest_value);; ++GOBJECT_FUNC void g_value_register_transform_func (GType src_type, + GType dest_type, +- GValueTransform transform_func); ++ GValueTransform transform_func);; + #define G_VALUE_NOCOPY_CONTENTS (1 << 27) + + +--- glib-2.4.6/gobject/gvaluetypes.h~visibility.patch ++++ glib-2.4.6/gobject/gvaluetypes.h +@@ -46,62 +46,62 @@ + + + /* --- prototypes --- */ +-void g_value_set_char (GValue *value, +- gchar v_char); +-gchar g_value_get_char (const GValue *value); +-void g_value_set_uchar (GValue *value, +- guchar v_uchar); +-guchar g_value_get_uchar (const GValue *value); +-void g_value_set_boolean (GValue *value, +- gboolean v_boolean); +-gboolean g_value_get_boolean (const GValue *value); +-void g_value_set_int (GValue *value, +- gint v_int); +-gint g_value_get_int (const GValue *value); +-void g_value_set_uint (GValue *value, +- guint v_uint); +-guint g_value_get_uint (const GValue *value); +-void g_value_set_long (GValue *value, +- glong v_long); +-glong g_value_get_long (const GValue *value); +-void g_value_set_ulong (GValue *value, +- gulong v_ulong); +-gulong g_value_get_ulong (const GValue *value); +-void g_value_set_int64 (GValue *value, +- gint64 v_int64); +-gint64 g_value_get_int64 (const GValue *value); +-void g_value_set_uint64 (GValue *value, +- guint64 v_uint64); +-guint64 g_value_get_uint64 (const GValue *value); +-void g_value_set_float (GValue *value, +- gfloat v_float); +-gfloat g_value_get_float (const GValue *value); +-void g_value_set_double (GValue *value, +- gdouble v_double); +-gdouble g_value_get_double (const GValue *value); +-void g_value_set_string (GValue *value, +- const gchar *v_string); +-void g_value_set_static_string (GValue *value, +- const gchar *v_string); +-G_CONST_RETURN gchar* g_value_get_string (const GValue *value); +-gchar* g_value_dup_string (const GValue *value); +-void g_value_set_pointer (GValue *value, +- gpointer v_pointer); +-gpointer g_value_get_pointer (const GValue *value); ++GOBJECT_FUNC void g_value_set_char (GValue *value, ++ gchar v_char);; ++GOBJECT_FUNC gchar g_value_get_char (const GValue *value);; ++GOBJECT_FUNC void g_value_set_uchar (GValue *value, ++ guchar v_uchar);; ++GOBJECT_FUNC guchar g_value_get_uchar (const GValue *value);; ++GOBJECT_FUNC void g_value_set_boolean (GValue *value, ++ gboolean v_boolean);; ++GOBJECT_FUNC gboolean g_value_get_boolean (const GValue *value);; ++GOBJECT_FUNC void g_value_set_int (GValue *value, ++ gint v_int);; ++GOBJECT_FUNC gint g_value_get_int (const GValue *value);; ++GOBJECT_FUNC void g_value_set_uint (GValue *value, ++ guint v_uint);; ++GOBJECT_FUNC guint g_value_get_uint (const GValue *value);; ++GOBJECT_FUNC void g_value_set_long (GValue *value, ++ glong v_long);; ++GOBJECT_FUNC glong g_value_get_long (const GValue *value);; ++GOBJECT_FUNC void g_value_set_ulong (GValue *value, ++ gulong v_ulong);; ++GOBJECT_FUNC gulong g_value_get_ulong (const GValue *value);; ++GOBJECT_FUNC void g_value_set_int64 (GValue *value, ++ gint64 v_int64);; ++GOBJECT_FUNC gint64 g_value_get_int64 (const GValue *value);; ++GOBJECT_FUNC void g_value_set_uint64 (GValue *value, ++ guint64 v_uint64);; ++GOBJECT_FUNC guint64 g_value_get_uint64 (const GValue *value);; ++GOBJECT_FUNC void g_value_set_float (GValue *value, ++ gfloat v_float);; ++GOBJECT_FUNC gfloat g_value_get_float (const GValue *value);; ++GOBJECT_FUNC void g_value_set_double (GValue *value, ++ gdouble v_double);; ++GOBJECT_FUNC gdouble g_value_get_double (const GValue *value);; ++GOBJECT_FUNC void g_value_set_string (GValue *value, ++ const gchar *v_string);; ++GOBJECT_FUNC void g_value_set_static_string (GValue *value, ++ const gchar *v_string);; ++GOBJECT_FUNC G_CONST_RETURN gchar* g_value_get_string (const GValue *value);; ++GOBJECT_FUNC gchar* g_value_dup_string (const GValue *value);; ++GOBJECT_FUNC void g_value_set_pointer (GValue *value, ++ gpointer v_pointer);; ++GOBJECT_FUNC gpointer g_value_get_pointer (const GValue *value);; + + + /* Convenience for registering new pointer types */ +-GType g_pointer_type_register_static (const gchar *name); ++GOBJECT_FUNC GType g_pointer_type_register_static (const gchar *name);; + + /* debugging aid, describe value contents as string */ +-gchar* g_strdup_value_contents (const GValue *value); ++GOBJECT_FUNC gchar* g_strdup_value_contents (const GValue *value);; + + +-void g_value_take_string (GValue *value, +- gchar *v_string); ++GOBJECT_FUNC void g_value_take_string (GValue *value, ++ gchar *v_string);; + #ifndef G_DISABLE_DEPRECATED +-void g_value_set_string_take_ownership (GValue *value, +- gchar *v_string); ++GOBJECT_FUNC void g_value_set_string_take_ownership (GValue *value, ++ gchar *v_string);; + #endif + + +--- glib-2.4.6/gthread/gthread.def~visibility.patch ++++ glib-2.4.6/gthread/gthread.def +@@ -1,3 +1,2 @@ +-EXPORTS + g_thread_init + g_thread_init_with_errorcheck_mutexes +--- glib-2.4.6/gthread/Makefile.am~visibility.patch ++++ glib-2.4.6/gthread/Makefile.am +@@ -2,7 +2,8 @@ + + INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/glib -I$(top_srcdir)/gthread \ + -DG_LOG_DOMAIN=\"GThread\" @GTHREAD_COMPILE_IMPL_DEFINES@ \ +- @GLIB_DEBUG_FLAGS@ -DG_DISABLE_DEPRECATED ++ @GLIB_DEBUG_FLAGS@ -DG_DISABLE_DEPRECATED \ ++ -DGLIB_COMPILATION + + EXTRA_DIST = \ + makefile.msc.in \ diff --git a/openembedded/packages/glib-2.0/glib-2.0-native_2.6.5.bb b/openembedded/packages/glib-2.0/glib-2.0-native_2.6.5.bb new file mode 100644 index 0000000000..6615fc39c5 --- /dev/null +++ b/openembedded/packages/glib-2.0/glib-2.0-native_2.6.5.bb @@ -0,0 +1,49 @@ +DESCRIPTION = "GLib is a general-purpose utility library, \ +which provides many useful data types, macros, \ +type conversions, string utilities, file utilities, a main \ +loop abstraction, and so on. It works on many \ +UNIX-like platforms, Windows, OS/2 and BeOS." +LICENSE = "LGPL" +SECTION = "libs" +PRIORITY = "optional" +MAINTAINER = "Philip Blundell " +DEPENDS = "gtk-doc-native" +PR = "r0" + +EXTRA_OECONF = "--disable-debug" + +SRC_URI = "ftp://ftp.gtk.org/pub/gtk/v2.6/glib-${PV}.tar.bz2 \ + file://glib-gettextize-dir.patch;patch=1 \ + file://glibconfig-sysdefs.h" + +S = "${WORKDIR}/glib-${PV}" + +inherit autotools pkgconfig native gettext + +acpaths = "" +do_configure_prepend () { + install -m 0644 ${WORKDIR}/glibconfig-sysdefs.h . +} + +do_stage () { + install -m 0755 gobject/glib-mkenums ${STAGING_BINDIR}/ + install -m 0755 gobject/.libs/glib-genmarshal ${STAGING_BINDIR}/ + install -m 0755 glib-gettextize ${STAGING_BINDIR}/ + oe_libinstall -so -C glib libglib-2.0 ${STAGING_LIBDIR} + oe_libinstall -so -C gmodule libgmodule-2.0 ${STAGING_LIBDIR} + oe_libinstall -so -C gthread libgthread-2.0 ${STAGING_LIBDIR} + oe_libinstall -so -C gobject libgobject-2.0 ${STAGING_LIBDIR} + autotools_stage_includes + install -d ${STAGING_INCDIR}/glib-2.0/glib + install -m 0755 ${S}/glibconfig.h ${STAGING_INCDIR}/glib-2.0/glibconfig.h + install -d ${STAGING_DATADIR}/aclocal + install -m 0644 ${S}/m4macros/glib-2.0.m4 ${STAGING_DATADIR}/aclocal/glib-2.0.m4 + install -m 0644 ${S}/m4macros/glib-gettext.m4 ${STAGING_DATADIR}/aclocal/glib-gettext.m4 + install -d ${STAGING_DATADIR}/glib-2.0/gettext/po + install -m 0755 mkinstalldirs ${STAGING_DATADIR}/glib-2.0/gettext/ + install -m 0644 po/Makefile.in.in ${STAGING_DATADIR}/glib-2.0/gettext/po/ +} + +do_install () { + : +} diff --git a/openembedded/packages/glib-2.0/glib-2.0_2.6.4.bb b/openembedded/packages/glib-2.0/glib-2.0_2.6.4.bb new file mode 100644 index 0000000000..2765cc0a63 --- /dev/null +++ b/openembedded/packages/glib-2.0/glib-2.0_2.6.4.bb @@ -0,0 +1,49 @@ +DESCRIPTION = "GLib is a general-purpose utility library, \ +which provides many useful data types, macros, \ +type conversions, string utilities, file utilities, a main \ +loop abstraction, and so on. It works on many \ +UNIX-like platforms, Windows, OS/2 and BeOS." +LICENSE = "LGPL" +SECTION = "libs" +PRIORITY = "optional" +MAINTAINER = "Philip Blundell " +DEPENDS += "glib-2.0-native gtk-doc" +DEPENDS += "virtual/libiconv virtual/libintl" +PACKAGES =+ "glib-2.0-utils " +PR = "r0" + +LEAD_SONAME = "libglib-2.0.*" +FILES_glib-2.0-utils = "${bindir}/*" + +EXTRA_OECONF = "--disable-debug" + +SRC_URI = "ftp://ftp.gtk.org/pub/gtk/v2.6/glib-${PV}.tar.bz2 \ + file://glibinclude.patch;patch=1;pnum=2 \ + file://glibconfig-sysdefs.h" + +S = "${WORKDIR}/glib-${PV}" + +inherit autotools pkgconfig gettext + +python () { + if bb.data.getVar("USE_NLS", d, 1) == "no": + raise bb.parse.SkipPackage("${PN} requires native language support.") +} + +acpaths = "" +do_configure_prepend () { + install -m 0644 ${WORKDIR}/glibconfig-sysdefs.h . +} + +do_stage () { + oe_libinstall -so -C glib libglib-2.0 ${STAGING_LIBDIR} + oe_libinstall -so -C gmodule libgmodule-2.0 ${STAGING_LIBDIR} + oe_libinstall -so -C gthread libgthread-2.0 ${STAGING_LIBDIR} + oe_libinstall -so -C gobject libgobject-2.0 ${STAGING_LIBDIR} + autotools_stage_includes + install -d ${STAGING_INCDIR}/glib-2.0/glib + install -m 0755 ${S}/glibconfig.h ${STAGING_INCDIR}/glib-2.0/glibconfig.h + install -d ${STAGING_DATADIR}/aclocal + install -m 0644 ${S}/m4macros/glib-2.0.m4 ${STAGING_DATADIR}/aclocal/glib-2.0.m4 + install -m 0644 ${S}/m4macros/glib-gettext.m4 ${STAGING_DATADIR}/aclocal/glib-gettext.m4 +} diff --git a/openembedded/packages/glib-2.0/glib-2.0_2.8.1.bb b/openembedded/packages/glib-2.0/glib-2.0_2.8.1.bb new file mode 100644 index 0000000000..d377a0aeae --- /dev/null +++ b/openembedded/packages/glib-2.0/glib-2.0_2.8.1.bb @@ -0,0 +1,48 @@ +DESCRIPTION = "GLib is a general-purpose utility library, \ +which provides many useful data types, macros, \ +type conversions, string utilities, file utilities, a main \ +loop abstraction, and so on. It works on many \ +UNIX-like platforms, Windows, OS/2 and BeOS." +LICENSE = "LGPL" +SECTION = "libs" +PRIORITY = "optional" +MAINTAINER = "Philip Blundell " +DEPENDS += "glib-2.0-native gtk-doc" +DEPENDS += "virtual/libiconv virtual/libintl" +PACKAGES =+ "glib-2.0-utils " +PR = "r0" + +LEAD_SONAME = "libglib-2.0.*" +FILES_glib-2.0-utils = "${bindir}/*" + +EXTRA_OECONF = "--disable-debug" + +SRC_URI = "ftp://ftp.gtk.org/pub/gtk/v2.8/glib-${PV}.tar.bz2 \ + file://glibconfig-sysdefs.h" + +S = "${WORKDIR}/glib-${PV}" + +inherit autotools pkgconfig gettext + +python () { + if bb.data.getVar("USE_NLS", d, 1) == "no": + raise bb.parse.SkipPackage("${PN} requires native language support.") +} + +acpaths = "" +do_configure_prepend () { + install -m 0644 ${WORKDIR}/glibconfig-sysdefs.h . +} + +do_stage () { + oe_libinstall -so -C glib libglib-2.0 ${STAGING_LIBDIR} + oe_libinstall -so -C gmodule libgmodule-2.0 ${STAGING_LIBDIR} + oe_libinstall -so -C gthread libgthread-2.0 ${STAGING_LIBDIR} + oe_libinstall -so -C gobject libgobject-2.0 ${STAGING_LIBDIR} + autotools_stage_includes + install -d ${STAGING_INCDIR}/glib-2.0/glib + install -m 0755 ${S}/glibconfig.h ${STAGING_INCDIR}/glib-2.0/glibconfig.h + install -d ${STAGING_DATADIR}/aclocal + install -m 0644 ${S}/m4macros/glib-2.0.m4 ${STAGING_DATADIR}/aclocal/glib-2.0.m4 + install -m 0644 ${S}/m4macros/glib-gettext.m4 ${STAGING_DATADIR}/aclocal/glib-gettext.m4 +} diff --git a/openembedded/packages/glibc/files/etc/ld.so.conf b/openembedded/packages/glibc/files/etc/ld.so.conf new file mode 100644 index 0000000000..3f9b41aabb --- /dev/null +++ b/openembedded/packages/glibc/files/etc/ld.so.conf @@ -0,0 +1,3 @@ +/usr/local/lib +/opt/QtPalmtop/lib + diff --git a/openembedded/packages/glibc/files/fhs-linux-paths.patch b/openembedded/packages/glibc/files/fhs-linux-paths.patch new file mode 100644 index 0000000000..1f32f6d7f2 --- /dev/null +++ b/openembedded/packages/glibc/files/fhs-linux-paths.patch @@ -0,0 +1,11 @@ +--- glibc-2.1.1/sysdeps/unix/sysv/linux/paths.h~ Thu May 27 13:16:33 1999 ++++ glibc-2.1.1/sysdeps/unix/sysv/linux/paths.h Thu May 27 13:17:55 1999 +@@ -71,7 +71,7 @@ + /* Provide trailing slash, since mostly used for building pathnames. */ + #define _PATH_DEV "/dev/" + #define _PATH_TMP "/tmp/" +-#define _PATH_VARDB "/var/db/" ++#define _PATH_VARDB "/var/lib/misc/" + #define _PATH_VARRUN "/var/run/" + #define _PATH_VARTMP "/var/tmp/" + diff --git a/openembedded/packages/glibc/files/generate-supported.mk b/openembedded/packages/glibc/files/generate-supported.mk new file mode 100644 index 0000000000..d2a28c2dc6 --- /dev/null +++ b/openembedded/packages/glibc/files/generate-supported.mk @@ -0,0 +1,11 @@ +#!/usr/bin/make + +include $(IN) + +all: + rm -f $(OUT) + touch $(OUT) + for locale in $(SUPPORTED-LOCALES); do \ + [ $$locale = true ] && continue; \ + echo $$locale | sed 's,/, ,' >> $(OUT); \ + done diff --git a/openembedded/packages/glibc/glibc-cvs-2.3.5/arm-audit.patch b/openembedded/packages/glibc/glibc-cvs-2.3.5/arm-audit.patch new file mode 100644 index 0000000000..2404f755e7 --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs-2.3.5/arm-audit.patch @@ -0,0 +1,58 @@ +2005-05-09 Daniel Jacobowitz + Mark Mitchell + + * sysdeps/generic/ldsodefs.h (struct audit_ifaces): Add ARM entries. + * elf/tst-auditmod1.c: Add ARM definitions. + +Index: glibc/sysdeps/generic/ldsodefs.h +=================================================================== +--- glibc.orig/sysdeps/generic/ldsodefs.h 2005-04-05 17:36:52.000000000 -0400 ++++ glibc/sysdeps/generic/ldsodefs.h 2005-05-06 15:54:44.000000000 -0400 +@@ -203,6 +203,8 @@ struct La_sparc32_regs; + struct La_sparc32_retval; + struct La_sparc64_regs; + struct La_sparc64_retval; ++struct La_arm_regs; ++struct La_arm_retval; + + struct audit_ifaces + { +@@ -284,6 +286,10 @@ struct audit_ifaces + const struct La_sparc64_regs *, + unsigned int *, const char *name, + long int *framesizep); ++ Elf32_Addr (*arm_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *, ++ uintptr_t *, struct La_arm_regs *, ++ unsigned int *, const char *name, ++ long int *framesizep); + }; + union + { +@@ -352,6 +358,9 @@ struct audit_ifaces + const struct La_sparc32_regs *, + struct La_sparc32_retval *, + const char *); ++ unsigned int (*arm_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *, ++ uintptr_t *, const struct La_arm_regs *, ++ struct La_arm_retval *, const char *); + }; + unsigned int (*objclose) (uintptr_t *); + +Index: glibc/elf/tst-auditmod1.c +=================================================================== +--- glibc.orig/elf/tst-auditmod1.c 2005-04-05 17:36:53.000000000 -0400 ++++ glibc/elf/tst-auditmod1.c 2005-05-06 15:53:28.000000000 -0400 +@@ -192,6 +192,12 @@ la_symbind64 (Elf64_Sym *sym, unsigned i + # define La_regs La_sparc64_regs + # define La_retval La_sparc64_retval + # define int_retval lrv_reg[0] ++#elif __arm__ ++# define pltenter la_arm_gnu_pltenter ++# define pltext la_arm_gnu_pltexit ++# define La_regs La_arm_regs ++# define La_retval La_arm_retval ++# define int_retval lrv_reg[0] + #else + # error "architecture specific code needed" + #endif + diff --git a/openembedded/packages/glibc/glibc-cvs-2.3.5/arm-audit2.patch b/openembedded/packages/glibc/glibc-cvs-2.3.5/arm-audit2.patch new file mode 100644 index 0000000000..855632c53e --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs-2.3.5/arm-audit2.patch @@ -0,0 +1,18 @@ +Index: ports/sysdeps/arm/dl-machine.h +=================================================================== +RCS file: /cvs/glibc/ports/sysdeps/arm/dl-machine.h,v +retrieving revision 1.53 +diff -u -r1.53 dl-machine.h +--- libc/ports/sysdeps/arm/dl-machine.h 10 Jun 2005 11:33:52 -0000 1.53 ++++ libc/ports/sysdeps/arm/dl-machine.h 11 Jun 2005 08:58:04 -0000 +@@ -243,6 +243,10 @@ + Prelinked libraries may use Elf32_Rela though. */ + #define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP + ++/* Names of the architecture-specific auditing callback functions. */ ++#define ARCH_LA_PLTENTER arm_gnu_pltenter ++#define ARCH_LA_PLTEXIT arm_gnu_pltexit ++ + #ifdef RESOLVE_MAP + + /* Deal with an out-of-range PC24 reloc. */ diff --git a/openembedded/packages/glibc/glibc-cvs-2.3.5/arm-longlong.patch b/openembedded/packages/glibc/glibc-cvs-2.3.5/arm-longlong.patch new file mode 100644 index 0000000000..a0b2ed0039 --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs-2.3.5/arm-longlong.patch @@ -0,0 +1,59 @@ +--- stdlib/longlong.h~ 2002-09-29 18:45:58.000000000 +0100 ++++ stdlib/longlong.h 2004-03-20 19:16:44.000000000 +0000 +@@ -210,6 +210,14 @@ + "rI" ((USItype) (bh)), \ + "r" ((USItype) (al)), \ + "rI" ((USItype) (bl))) ++/* v3m and all higher arches have long multiply support. */ ++#if !defined(__ARM_ARCH_2__) && !defined(__ARM_ARCH_3__) ++#define umul_ppmm(xh, xl, a, b) \ ++ __asm__ ("umull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b)) ++#define UMUL_TIME 5 ++#define smul_ppmm(xh, xl, a, b) \ ++ __asm__ ("smull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b)) ++#else + #define umul_ppmm(xh, xl, a, b) \ + {register USItype __t0, __t1, __t2; \ + __asm__ ("%@ Inlined umul_ppmm\n" \ +@@ -231,7 +239,14 @@ + : "r" ((USItype) (a)), \ + "r" ((USItype) (b)));} + #define UMUL_TIME 20 ++#endif + #define UDIV_TIME 100 ++ ++#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__) ++#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X)) ++#define COUNT_LEADING_ZEROS_0 32 ++#endif ++ + #endif /* __arm__ */ + + #if defined (__hppa) && W_TYPE_SIZE == 32 +--- /dev/null 2004-02-02 20:32:13.000000000 +0000 ++++ ports/sysdeps/arm/mp_clz_tab.c 2004-03-20 19:24:26.000000000 +0000 +@@ -0,0 +1,24 @@ ++/* __clz_tab -- support for longlong.h ++ Copyright (C) 2004 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__) ++/* Nothing required. */ ++#else ++#include ++#endif diff --git a/openembedded/packages/glibc/glibc-cvs-2.3.5/arm-memcpy.patch b/openembedded/packages/glibc/glibc-cvs-2.3.5/arm-memcpy.patch new file mode 100644 index 0000000000..db1120058b --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs-2.3.5/arm-memcpy.patch @@ -0,0 +1,758 @@ +--- /dev/null 2004-02-02 20:32:13.000000000 +0000 ++++ libc/ports/sysdeps/arm/memmove.S 2004-03-20 18:37:23.000000000 +0000 +@@ -0,0 +1,251 @@ ++/* ++ * Optimized memmove implementation for ARM processors ++ * ++ * Author: Nicolas Pitre ++ * Created: Dec 23, 2003 ++ * Copyright: (C) MontaVista Software, Inc. ++ * ++ * This file is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This file is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ */ ++ ++#include ++ ++ ++/* ++ * Endian independent macros for shifting bytes within registers. ++ */ ++#ifndef __ARMEB__ ++#define pull lsr ++#define push lsl ++#else ++#define pull lsl ++#define push lsr ++#endif ++ ++/* ++ * Enable data preload for architectures that support it (ARMv5 and above) ++ */ ++#if defined(__ARM_ARCH_5__) || \ ++ defined(__ARM_ARCH_5T__) || \ ++ defined(__ARM_ARCH_5TE__) ++#define PLD(code...) code ++#else ++#define PLD(code...) ++#endif ++ ++ ++/* char * memmove (char *dst, const char *src) */ ++ENTRY(memmove) ++ subs ip, r0, r1 ++ cmphi r2, ip ++ bls memcpy(PLT) ++ ++ stmfd sp!, {r0, r4, lr} ++ add r1, r1, r2 ++ add r0, r0, r2 ++ subs r2, r2, #4 ++ blt 25f ++ ands ip, r0, #3 ++ PLD( pld [r1, #-4] ) ++ bne 26f ++ ands ip, r1, #3 ++ bne 27f ++ ++19: subs r2, r2, #4 ++ blt 24f ++ subs r2, r2, #8 ++ blt 23f ++ subs r2, r2, #16 ++ blt 22f ++ ++ PLD( pld [r1, #-32] ) ++ PLD( subs r2, r2, #96 ) ++ stmfd sp!, {r5 - r8} ++ PLD( blt 21f ) ++ ++ PLD( @ cache alignment ) ++ PLD( ands ip, r1, #31 ) ++ PLD( pld [r1, #-64] ) ++ PLD( beq 20f ) ++ PLD( cmp r2, ip ) ++ PLD( pld [r1, #-96] ) ++ PLD( blt 20f ) ++ PLD( cmp ip, #16 ) ++ PLD( sub r2, r2, ip ) ++ PLD( ldmgedb r1!, {r3 - r6} ) ++ PLD( stmgedb r0!, {r3 - r6} ) ++ PLD( beq 20f ) ++ PLD( and ip, ip, #15 ) ++ PLD( cmp ip, #8 ) ++ PLD( ldr r3, [r1, #-4]! ) ++ PLD( ldrge r4, [r1, #-4]! ) ++ PLD( ldrgt r5, [r1, #-4]! ) ++ PLD( str r3, [r0, #-4]! ) ++ PLD( strge r4, [r0, #-4]! ) ++ PLD( strgt r5, [r0, #-4]! ) ++ ++20: PLD( pld [r1, #-96] ) ++ PLD( pld [r1, #-128] ) ++21: ldmdb r1!, {r3, r4, ip, lr} ++ subs r2, r2, #32 ++ stmdb r0!, {r3, r4, ip, lr} ++ ldmdb r1!, {r3, r4, ip, lr} ++ stmgedb r0!, {r3, r4, ip, lr} ++ ldmgedb r1!, {r3, r4, ip, lr} ++ stmgedb r0!, {r3, r4, ip, lr} ++ ldmgedb r1!, {r3, r4, ip, lr} ++ subges r2, r2, #32 ++ stmdb r0!, {r3, r4, ip, lr} ++ bge 20b ++ PLD( cmn r2, #96 ) ++ PLD( bge 21b ) ++ PLD( add r2, r2, #96 ) ++ tst r2, #31 ++ ldmfd sp!, {r5 - r8} ++ ldmeqfd sp!, {r0, r4, pc} ++ ++ tst r2, #16 ++22: ldmnedb r1!, {r3, r4, ip, lr} ++ stmnedb r0!, {r3, r4, ip, lr} ++ ++ tst r2, #8 ++23: ldmnedb r1!, {r3, r4} ++ stmnedb r0!, {r3, r4} ++ ++ tst r2, #4 ++24: ldrne r3, [r1, #-4]! ++ strne r3, [r0, #-4]! ++ ++25: ands r2, r2, #3 ++ ldmeqfd sp!, {r0, r4, pc} ++ ++ cmp r2, #2 ++ ldrb r3, [r1, #-1] ++ ldrgeb r4, [r1, #-2] ++ ldrgtb ip, [r1, #-3] ++ strb r3, [r0, #-1] ++ strgeb r4, [r0, #-2] ++ strgtb ip, [r0, #-3] ++ ldmfd sp!, {r0, r4, pc} ++ ++26: cmp ip, #2 ++ ldrb r3, [r1, #-1]! ++ ldrgeb r4, [r1, #-1]! ++ ldrgtb lr, [r1, #-1]! ++ strb r3, [r0, #-1]! ++ strgeb r4, [r0, #-1]! ++ strgtb lr, [r0, #-1]! ++ subs r2, r2, ip ++ blt 25b ++ ands ip, r1, #3 ++ beq 19b ++ ++27: bic r1, r1, #3 ++ cmp ip, #2 ++ ldr r3, [r1] ++ beq 35f ++ blt 36f ++ ++ ++ .macro backward_copy_shift push pull ++ ++ cmp r2, #12 ++ PLD( pld [r1, #-4] ) ++ blt 33f ++ subs r2, r2, #28 ++ stmfd sp!, {r5 - r9} ++ blt 31f ++ ++ PLD( subs r2, r2, #96 ) ++ PLD( pld [r1, #-32] ) ++ PLD( blt 30f ) ++ PLD( pld [r1, #-64] ) ++ ++ PLD( @ cache alignment ) ++ PLD( ands ip, r1, #31 ) ++ PLD( pld [r1, #-96] ) ++ PLD( beq 29f ) ++ PLD( cmp r2, ip ) ++ PLD( pld [r1, #-128] ) ++ PLD( blt 29f ) ++ PLD( sub r2, r2, ip ) ++28: PLD( mov r4, r3, push #\push ) ++ PLD( ldr r3, [r1, #-4]! ) ++ PLD( subs ip, ip, #4 ) ++ PLD( orr r4, r4, r3, pull #\pull ) ++ PLD( str r4, [r0, #-4]! ) ++ PLD( bgt 28b ) ++ ++29: PLD( pld [r1, #-128] ) ++30: mov lr, r3, push #\push ++ ldmdb r1!, {r3 - r9, ip} ++ subs r2, r2, #32 ++ orr lr, lr, ip, pull #\pull ++ mov ip, ip, push #\push ++ orr ip, ip, r9, pull #\pull ++ mov r9, r9, push #\push ++ orr r9, r9, r8, pull #\pull ++ mov r8, r8, push #\push ++ orr r8, r8, r7, pull #\pull ++ mov r7, r7, push #\push ++ orr r7, r7, r6, pull #\pull ++ mov r6, r6, push #\push ++ orr r6, r6, r5, pull #\pull ++ mov r5, r5, push #\push ++ orr r5, r5, r4, pull #\pull ++ mov r4, r4, push #\push ++ orr r4, r4, r3, pull #\pull ++ stmdb r0!, {r4 - r9, ip, lr} ++ bge 29b ++ PLD( cmn r2, #96 ) ++ PLD( bge 30b ) ++ PLD( add r2, r2, #96 ) ++ cmn r2, #16 ++ blt 32f ++31: mov r7, r3, push #\push ++ ldmdb r1!, {r3 - r6} ++ sub r2, r2, #16 ++ orr r7, r7, r6, pull #\pull ++ mov r6, r6, push #\push ++ orr r6, r6, r5, pull #\pull ++ mov r5, r5, push #\push ++ orr r5, r5, r4, pull #\pull ++ mov r4, r4, push #\push ++ orr r4, r4, r3, pull #\pull ++ stmdb r0!, {r4 - r7} ++32: adds r2, r2, #28 ++ ldmfd sp!, {r5 - r9} ++ blt 34f ++33: mov r4, r3, push #\push ++ ldr r3, [r1, #-4]! ++ subs r2, r2, #4 ++ orr r4, r4, r3, pull #\pull ++ str r4, [r0, #-4]! ++ bge 33b ++34: ++ .endm ++ ++ ++ backward_copy_shift push=8 pull=24 ++ add r1, r1, #3 ++ b 25b ++ ++35: backward_copy_shift push=16 pull=16 ++ add r1, r1, #2 ++ b 25b ++ ++36: backward_copy_shift push=24 pull=8 ++ add r1, r1, #1 ++ b 25b ++ ++ .size memmove, . - memmove ++END(memmove) ++libc_hidden_builtin_def (memmove) +--- /dev/null 2004-02-02 20:32:13.000000000 +0000 ++++ libc/ports/sysdeps/arm/bcopy.S 2004-03-20 18:37:48.000000000 +0000 +@@ -0,0 +1,255 @@ ++/* ++ * Optimized memmove implementation for ARM processors ++ * ++ * Author: Nicolas Pitre ++ * Created: Dec 23, 2003 ++ * Copyright: (C) MontaVista Software, Inc. ++ * ++ * This file is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This file is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ */ ++ ++#include ++ ++ ++/* ++ * Endian independent macros for shifting bytes within registers. ++ */ ++#ifndef __ARMEB__ ++#define pull lsr ++#define push lsl ++#else ++#define pull lsl ++#define push lsr ++#endif ++ ++/* ++ * Enable data preload for architectures that support it (ARMv5 and above) ++ */ ++#if defined(__ARM_ARCH_5__) || \ ++ defined(__ARM_ARCH_5T__) || \ ++ defined(__ARM_ARCH_5TE__) ++#define PLD(code...) code ++#else ++#define PLD(code...) ++#endif ++ ++dst .req r1 ++src .req r0 ++ ++/* void *bcopy (const char *src, char *dst, size_t size) */ ++ENTRY(bcopy) ++ subs ip, dst, src ++ cmphi r2, ip ++ movls r3, r0 ++ movls r0, r1 ++ movls r1, r3 ++ bls memcpy(PLT) ++ ++ stmfd sp!, {r4, lr} ++ add src, src, r2 ++ add dst, dst, r2 ++ subs r2, r2, #4 ++ blt 25f ++ ands ip, dst, #3 ++ PLD( pld [src, #-4] ) ++ bne 26f ++ ands ip, src, #3 ++ bne 27f ++ ++19: subs r2, r2, #4 ++ blt 24f ++ subs r2, r2, #8 ++ blt 23f ++ subs r2, r2, #16 ++ blt 22f ++ ++ PLD( pld [src, #-32] ) ++ PLD( subs r2, r2, #96 ) ++ stmfd sp!, {r5 - r8} ++ PLD( blt 21f ) ++ ++ PLD( @ cache alignment ) ++ PLD( ands ip, src, #31 ) ++ PLD( pld [src, #-64] ) ++ PLD( beq 20f ) ++ PLD( cmp r2, ip ) ++ PLD( pld [src, #-96] ) ++ PLD( blt 20f ) ++ PLD( cmp ip, #16 ) ++ PLD( sub r2, r2, ip ) ++ PLD( ldmgedb src!, {r3 - r6} ) ++ PLD( stmgedb dst!, {r3 - r6} ) ++ PLD( beq 20f ) ++ PLD( and ip, ip, #15 ) ++ PLD( cmp ip, #8 ) ++ PLD( ldr r3, [src, #-4]! ) ++ PLD( ldrge r4, [src, #-4]! ) ++ PLD( ldrgt r5, [src, #-4]! ) ++ PLD( str r3, [dst, #-4]! ) ++ PLD( strge r4, [dst, #-4]! ) ++ PLD( strgt r5, [dst, #-4]! ) ++ ++20: PLD( pld [src, #-96] ) ++ PLD( pld [src, #-128] ) ++21: ldmdb src!, {r3, r4, ip, lr} ++ subs r2, r2, #32 ++ stmdb dst!, {r3, r4, ip, lr} ++ ldmdb src!, {r3, r4, ip, lr} ++ stmgedb dst!, {r3, r4, ip, lr} ++ ldmgedb src!, {r3, r4, ip, lr} ++ stmgedb dst!, {r3, r4, ip, lr} ++ ldmgedb src!, {r3, r4, ip, lr} ++ subges r2, r2, #32 ++ stmdb dst!, {r3, r4, ip, lr} ++ bge 20b ++ PLD( cmn r2, #96 ) ++ PLD( bge 21b ) ++ PLD( add r2, r2, #96 ) ++ tst r2, #31 ++ ldmfd sp!, {r5 - r8} ++ ldmeqfd sp!, {r4, pc} ++ ++ tst r2, #16 ++22: ldmnedb src!, {r3, r4, ip, lr} ++ stmnedb dst!, {r3, r4, ip, lr} ++ ++ tst r2, #8 ++23: ldmnedb src!, {r3, r4} ++ stmnedb dst!, {r3, r4} ++ ++ tst r2, #4 ++24: ldrne r3, [src, #-4]! ++ strne r3, [dst, #-4]! ++ ++25: ands r2, r2, #3 ++ ldmeqfd sp!, {dst, r4, pc} ++ ++ cmp r2, #2 ++ ldrb r3, [src, #-1] ++ ldrgeb r4, [src, #-2] ++ ldrgtb ip, [src, #-3] ++ strb r3, [dst, #-1] ++ strgeb r4, [dst, #-2] ++ strgtb ip, [dst, #-3] ++ ldmfd sp!, {dst, r4, pc} ++ ++26: cmp ip, #2 ++ ldrb r3, [src, #-1]! ++ ldrgeb r4, [src, #-1]! ++ ldrgtb lr, [src, #-1]! ++ strb r3, [dst, #-1]! ++ strgeb r4, [dst, #-1]! ++ strgtb lr, [dst, #-1]! ++ subs r2, r2, ip ++ blt 25b ++ ands ip, src, #3 ++ beq 19b ++ ++27: bic src, src, #3 ++ cmp ip, #2 ++ ldr r3, [src] ++ beq 35f ++ blt 36f ++ ++ ++ .macro backward_copy_shift push pull ++ ++ cmp r2, #12 ++ PLD( pld [src, #-4] ) ++ blt 33f ++ subs r2, r2, #28 ++ stmfd sp!, {r5 - r9} ++ blt 31f ++ ++ PLD( subs r2, r2, #96 ) ++ PLD( pld [src, #-32] ) ++ PLD( blt 30f ) ++ PLD( pld [src, #-64] ) ++ ++ PLD( @ cache alignment ) ++ PLD( ands ip, src, #31 ) ++ PLD( pld [src, #-96] ) ++ PLD( beq 29f ) ++ PLD( cmp r2, ip ) ++ PLD( pld [src, #-128] ) ++ PLD( blt 29f ) ++ PLD( sub r2, r2, ip ) ++28: PLD( mov r4, r3, push #\push ) ++ PLD( ldr r3, [src, #-4]! ) ++ PLD( subs ip, ip, #4 ) ++ PLD( orr r4, r4, r3, pull #\pull ) ++ PLD( str r4, [dst, #-4]! ) ++ PLD( bgt 28b ) ++ ++29: PLD( pld [src, #-128] ) ++30: mov lr, r3, push #\push ++ ldmdb src!, {r3 - r9, ip} ++ subs r2, r2, #32 ++ orr lr, lr, ip, pull #\pull ++ mov ip, ip, push #\push ++ orr ip, ip, r9, pull #\pull ++ mov r9, r9, push #\push ++ orr r9, r9, r8, pull #\pull ++ mov r8, r8, push #\push ++ orr r8, r8, r7, pull #\pull ++ mov r7, r7, push #\push ++ orr r7, r7, r6, pull #\pull ++ mov r6, r6, push #\push ++ orr r6, r6, r5, pull #\pull ++ mov r5, r5, push #\push ++ orr r5, r5, r4, pull #\pull ++ mov r4, r4, push #\push ++ orr r4, r4, r3, pull #\pull ++ stmdb dst!, {r4 - r9, ip, lr} ++ bge 29b ++ PLD( cmn r2, #96 ) ++ PLD( bge 30b ) ++ PLD( add r2, r2, #96 ) ++ cmn r2, #16 ++ blt 32f ++31: mov r7, r3, push #\push ++ ldmdb src!, {r3 - r6} ++ sub r2, r2, #16 ++ orr r7, r7, r6, pull #\pull ++ mov r6, r6, push #\push ++ orr r6, r6, r5, pull #\pull ++ mov r5, r5, push #\push ++ orr r5, r5, r4, pull #\pull ++ mov r4, r4, push #\push ++ orr r4, r4, r3, pull #\pull ++ stmdb dst!, {r4 - r7} ++32: adds r2, r2, #28 ++ ldmfd sp!, {r5 - r9} ++ blt 34f ++33: mov r4, r3, push #\push ++ ldr r3, [src, #-4]! ++ subs r2, r2, #4 ++ orr r4, r4, r3, pull #\pull ++ str r4, [dst, #-4]! ++ bge 33b ++34: ++ .endm ++ ++ ++ backward_copy_shift push=8 pull=24 ++ add src, src, #3 ++ b 25b ++ ++35: backward_copy_shift push=16 pull=16 ++ add src, src, #2 ++ b 25b ++ ++36: backward_copy_shift push=24 pull=8 ++ add src, src, #1 ++ b 25b ++ ++ .size bcopy, . - bcopy ++END(bcopy) + +--- /dev/null 2004-02-02 20:32:13.000000000 +0000 ++++ libc/ports/sysdeps/arm/memcpy.S 2004-05-02 14:33:22.000000000 +0100 +@@ -0,0 +1,242 @@ ++/* ++ * Optimized memcpy implementation for ARM processors ++ * ++ * Author: Nicolas Pitre ++ * Created: Dec 23, 2003 ++ * Copyright: (C) MontaVista Software, Inc. ++ * ++ * This file is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This file is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ */ ++ ++#include ++ ++ ++/* ++ * Endian independent macros for shifting bytes within registers. ++ */ ++#ifndef __ARMEB__ ++#define pull lsr ++#define push lsl ++#else ++#define pull lsl ++#define push lsr ++#endif ++ ++/* ++ * Enable data preload for architectures that support it (ARMv5 and above) ++ */ ++#if defined(__ARM_ARCH_5__) || \ ++ defined(__ARM_ARCH_5T__) || \ ++ defined(__ARM_ARCH_5TE__) ++#define PLD(code...) code ++#else ++#define PLD(code...) ++#endif ++ ++ ++/* char * memcpy (char *dst, const char *src) */ ++ ++ENTRY(memcpy) ++ subs r2, r2, #4 ++ stmfd sp!, {r0, r4, lr} ++ blt 7f ++ ands ip, r0, #3 ++ PLD( pld [r1, #0] ) ++ bne 8f ++ ands ip, r1, #3 ++ bne 9f ++ ++1: subs r2, r2, #4 ++ blt 6f ++ subs r2, r2, #8 ++ blt 5f ++ subs r2, r2, #16 ++ blt 4f ++ ++ PLD( subs r2, r2, #65 ) ++ stmfd sp!, {r5 - r8} ++ PLD( blt 3f ) ++ PLD( pld [r1, #32] ) ++ ++ PLD( @ cache alignment ) ++ PLD( ands ip, r1, #31 ) ++ PLD( pld [r1, #64] ) ++ PLD( beq 2f ) ++ PLD( rsb ip, ip, #32 ) ++ PLD( cmp r2, ip ) ++ PLD( pld [r1, #96] ) ++ PLD( blt 2f ) ++ PLD( cmp ip, #16 ) ++ PLD( sub r2, r2, ip ) ++ PLD( ldmgeia r1!, {r3 - r6} ) ++ PLD( stmgeia r0!, {r3 - r6} ) ++ PLD( beq 2f ) ++ PLD( and ip, ip, #15 ) ++ PLD( cmp ip, #8 ) ++ PLD( ldr r3, [r1], #4 ) ++ PLD( ldrge r4, [r1], #4 ) ++ PLD( ldrgt r5, [r1], #4 ) ++ PLD( str r3, [r0], #4 ) ++ PLD( strge r4, [r0], #4 ) ++ PLD( strgt r5, [r0], #4 ) ++ ++2: PLD( pld [r1, #96] ) ++3: ldmia r1!, {r3 - r8, ip, lr} ++ subs r2, r2, #32 ++ stmia r0!, {r3 - r8, ip, lr} ++ bge 2b ++ PLD( cmn r2, #65 ) ++ PLD( bge 3b ) ++ PLD( add r2, r2, #65 ) ++ tst r2, #31 ++ ldmfd sp!, {r5 - r8} ++ ldmeqfd sp!, {r0, r4, pc} ++ ++ tst r2, #16 ++4: ldmneia r1!, {r3, r4, ip, lr} ++ stmneia r0!, {r3, r4, ip, lr} ++ ++ tst r2, #8 ++5: ldmneia r1!, {r3, r4} ++ stmneia r0!, {r3, r4} ++ ++ tst r2, #4 ++6: ldrne r3, [r1], #4 ++ strne r3, [r0], #4 ++ ++7: ands r2, r2, #3 ++ ldmeqfd sp!, {r0, r4, pc} ++ ++ cmp r2, #2 ++ ldrb r3, [r1], #1 ++ ldrgeb r4, [r1], #1 ++ ldrgtb ip, [r1] ++ strb r3, [r0], #1 ++ strgeb r4, [r0], #1 ++ strgtb ip, [r0] ++ ldmfd sp!, {r0, r4, pc} ++ ++8: rsb ip, ip, #4 ++ cmp ip, #2 ++ ldrb r3, [r1], #1 ++ ldrgeb r4, [r1], #1 ++ ldrgtb lr, [r1], #1 ++ strb r3, [r0], #1 ++ strgeb r4, [r0], #1 ++ strgtb lr, [r0], #1 ++ subs r2, r2, ip ++ blt 7b ++ ands ip, r1, #3 ++ beq 1b ++ ++9: bic r1, r1, #3 ++ cmp ip, #2 ++ ldr lr, [r1], #4 ++ beq 17f ++ bgt 18f ++ ++ ++ .macro forward_copy_shift pull push ++ ++ cmp r2, #12 ++ PLD( pld [r1, #0] ) ++ blt 15f ++ subs r2, r2, #28 ++ stmfd sp!, {r5 - r9} ++ blt 13f ++ ++ PLD( subs r2, r2, #97 ) ++ PLD( blt 12f ) ++ PLD( pld [r1, #32] ) ++ ++ PLD( @ cache alignment ) ++ PLD( rsb ip, r1, #36 ) ++ PLD( pld [r1, #64] ) ++ PLD( ands ip, ip, #31 ) ++ PLD( pld [r1, #96] ) ++ PLD( beq 11f ) ++ PLD( cmp r2, ip ) ++ PLD( pld [r1, #128] ) ++ PLD( blt 11f ) ++ PLD( sub r2, r2, ip ) ++10: PLD( mov r3, lr, pull #\pull ) ++ PLD( ldr lr, [r1], #4 ) ++ PLD( subs ip, ip, #4 ) ++ PLD( orr r3, r3, lr, push #\push ) ++ PLD( str r3, [r0], #4 ) ++ PLD( bgt 10b ) ++ ++11: PLD( pld [r1, #128] ) ++12: mov r3, lr, pull #\pull ++ ldmia r1!, {r4 - r9, ip, lr} ++ subs r2, r2, #32 ++ orr r3, r3, r4, push #\push ++ mov r4, r4, pull #\pull ++ orr r4, r4, r5, push #\push ++ mov r5, r5, pull #\pull ++ orr r5, r5, r6, push #\push ++ mov r6, r6, pull #\pull ++ orr r6, r6, r7, push #\push ++ mov r7, r7, pull #\pull ++ orr r7, r7, r8, push #\push ++ mov r8, r8, pull #\pull ++ orr r8, r8, r9, push #\push ++ mov r9, r9, pull #\pull ++ orr r9, r9, ip, push #\push ++ mov ip, ip, pull #\pull ++ orr ip, ip, lr, push #\push ++ stmia r0!, {r3 - r9, ip} ++ bge 11b ++ PLD( cmn r2, #97 ) ++ PLD( bge 12b ) ++ PLD( add r2, r2, #97 ) ++ cmn r2, #16 ++ blt 14f ++13: mov r3, lr, pull #\pull ++ ldmia r1!, {r4 - r6, lr} ++ sub r2, r2, #16 ++ orr r3, r3, r4, push #\push ++ mov r4, r4, pull #\pull ++ orr r4, r4, r5, push #\push ++ mov r5, r5, pull #\pull ++ orr r5, r5, r6, push #\push ++ mov r6, r6, pull #\pull ++ orr r6, r6, lr, push #\push ++ stmia r0!, {r3 - r6} ++14: adds r2, r2, #28 ++ ldmfd sp!, {r5 - r9} ++ blt 16f ++15: mov r3, lr, pull #\pull ++ ldr lr, [r1], #4 ++ subs r2, r2, #4 ++ orr r3, r3, lr, push #\push ++ str r3, [r0], #4 ++ bge 15b ++16: ++ .endm ++ ++ ++ forward_copy_shift pull=8 push=24 ++ sub r1, r1, #3 ++ b 7b ++ ++17: forward_copy_shift pull=16 push=16 ++ sub r1, r1, #2 ++ b 7b ++ ++18: forward_copy_shift pull=24 push=8 ++ sub r1, r1, #1 ++ b 7b ++ ++ .size memcpy, . - memcpy ++END(memcpy) ++libc_hidden_builtin_def (memcpy) ++ diff --git a/openembedded/packages/glibc/glibc-cvs-2.3.5/dl-cache-libcmp.patch b/openembedded/packages/glibc/glibc-cvs-2.3.5/dl-cache-libcmp.patch new file mode 100644 index 0000000000..c74ebf6c09 --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs-2.3.5/dl-cache-libcmp.patch @@ -0,0 +1,10 @@ +--- libc/elf/Versions.old 2005-06-27 13:38:25.000000000 +0100 ++++ libc/elf/Versions 2005-06-27 14:03:54.000000000 +0100 +@@ -56,5 +56,7 @@ + _dl_make_stack_executable; + # Only here for gdb while a better method is developed. + _dl_debug_state; ++ # for ldconfig ++ _dl_cache_libcmp; + } + } diff --git a/openembedded/packages/glibc/glibc-cvs-2.3.5/dyn-ldconfig-20041128.patch b/openembedded/packages/glibc/glibc-cvs-2.3.5/dyn-ldconfig-20041128.patch new file mode 100644 index 0000000000..451b6d4afc --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs-2.3.5/dyn-ldconfig-20041128.patch @@ -0,0 +1,22 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- libc/elf/Makefile~dyn-ldconfig-20041128 ++++ libc/elf/Makefile +@@ -118,12 +118,13 @@ + + ifeq (yes,$(use-ldconfig)) + ifeq (yes,$(build-shared)) +-others-static += ldconfig ++#others-static += ldconfig + others += ldconfig + install-rootsbin += ldconfig + + ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon + extra-objs += $(ldconfig-modules:=.o) ++CPPFLAGS-readlib.c = -DNOT_IN_libc=1 + + # To find xmalloc.c and xstrdup.c + vpath %.c ../locale/programs diff --git a/openembedded/packages/glibc/glibc-cvs-2.3.5/ldsocache-varrun.patch b/openembedded/packages/glibc/glibc-cvs-2.3.5/ldsocache-varrun.patch new file mode 100644 index 0000000000..9994d4f879 --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs-2.3.5/ldsocache-varrun.patch @@ -0,0 +1,18 @@ +This patch moves ld.so.cache from /etc to /var/run. This is for devices +where /etc is JFFS2 or CRAMFS but /var is a ramdisk. + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- libc/sysdeps/generic/dl-cache.h~ldsocache-varrun ++++ libc/sysdeps/generic/dl-cache.h +@@ -29,7 +29,7 @@ + #endif + + #ifndef LD_SO_CACHE +-# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache" ++# define LD_SO_CACHE "/var/run/ld.so.cache" + #endif + + #ifndef add_system_dir diff --git a/openembedded/packages/glibc/glibc-cvs/arm-ioperm.patch b/openembedded/packages/glibc/glibc-cvs/arm-ioperm.patch new file mode 100644 index 0000000000..ae9423ef55 --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs/arm-ioperm.patch @@ -0,0 +1,13 @@ +--- sysdeps/unix/sysv/linux/arm/ioperm.c 20 Feb 2003 22:22:35 -0000 1.6 ++++ sysdeps/unix/sysv/linux/arm/ioperm.c 24 Oct 2003 20:59:38 -0000 +@@ -100,8 +100,8 @@ + { + char systype[256]; + int i, n; +- static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE }; +- static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT }; ++ static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE }; ++ static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT }; + size_t len = sizeof(io.base); + + if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0) diff --git a/openembedded/packages/glibc/glibc-cvs/arm-longlong.patch b/openembedded/packages/glibc/glibc-cvs/arm-longlong.patch new file mode 100644 index 0000000000..dfb9309b7b --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs/arm-longlong.patch @@ -0,0 +1,59 @@ +--- stdlib/longlong.h~ 2002-09-29 18:45:58.000000000 +0100 ++++ stdlib/longlong.h 2004-03-20 19:16:44.000000000 +0000 +@@ -210,6 +210,14 @@ + "rI" ((USItype) (bh)), \ + "r" ((USItype) (al)), \ + "rI" ((USItype) (bl))) ++/* v3m and all higher arches have long multiply support. */ ++#if !defined(__ARM_ARCH_2__) && !defined(__ARM_ARCH_3__) ++#define umul_ppmm(xh, xl, a, b) \ ++ __asm__ ("umull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b)) ++#define UMUL_TIME 5 ++#define smul_ppmm(xh, xl, a, b) \ ++ __asm__ ("smull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b)) ++#else + #define umul_ppmm(xh, xl, a, b) \ + {register USItype __t0, __t1, __t2; \ + __asm__ ("%@ Inlined umul_ppmm\n" \ +@@ -231,7 +239,14 @@ + : "r" ((USItype) (a)), \ + "r" ((USItype) (b)));} + #define UMUL_TIME 20 ++#endif + #define UDIV_TIME 100 ++ ++#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__) ++#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X)) ++#define COUNT_LEADING_ZEROS_0 32 ++#endif ++ + #endif /* __arm__ */ + + #if defined (__hppa) && W_TYPE_SIZE == 32 +--- /dev/null 2004-02-02 20:32:13.000000000 +0000 ++++ sysdeps/arm/mp_clz_tab.c 2004-03-20 19:24:26.000000000 +0000 +@@ -0,0 +1,24 @@ ++/* __clz_tab -- support for longlong.h ++ Copyright (C) 2004 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__) ++/* Nothing required. */ ++#else ++#include ++#endif diff --git a/openembedded/packages/glibc/glibc-cvs/arm-machine-gmon.patch b/openembedded/packages/glibc/glibc-cvs/arm-machine-gmon.patch new file mode 100644 index 0000000000..0fa789d86b --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs/arm-machine-gmon.patch @@ -0,0 +1,11 @@ +--- sysdeps/arm/machine-gmon.h~ 2001-07-06 00:55:48.000000000 -0400 ++++ sysdeps/arm/machine-gmon.h 2004-04-25 03:56:20.000000000 -0400 +@@ -35,7 +35,7 @@ + static void mcount_internal (u_long frompc, u_long selfpc); + + #define _MCOUNT_DECL(frompc, selfpc) \ +-static void mcount_internal (u_long frompc, u_long selfpc) ++static __attribute__((used)) void mcount_internal (u_long frompc, u_long selfpc) + + /* This macro/func MUST save r0, r1 because the compiler inserts + blind calls to _mount(), ignoring the fact that _mcount may diff --git a/openembedded/packages/glibc/glibc-cvs/arm-memcpy.patch b/openembedded/packages/glibc/glibc-cvs/arm-memcpy.patch new file mode 100644 index 0000000000..bc2b3dab84 --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs/arm-memcpy.patch @@ -0,0 +1,758 @@ +--- /dev/null 2004-02-02 20:32:13.000000000 +0000 ++++ sysdeps/arm/memmove.S 2004-03-20 18:37:23.000000000 +0000 +@@ -0,0 +1,251 @@ ++/* ++ * Optimized memmove implementation for ARM processors ++ * ++ * Author: Nicolas Pitre ++ * Created: Dec 23, 2003 ++ * Copyright: (C) MontaVista Software, Inc. ++ * ++ * This file is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This file is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ */ ++ ++#include ++ ++ ++/* ++ * Endian independent macros for shifting bytes within registers. ++ */ ++#ifndef __ARMEB__ ++#define pull lsr ++#define push lsl ++#else ++#define pull lsl ++#define push lsr ++#endif ++ ++/* ++ * Enable data preload for architectures that support it (ARMv5 and above) ++ */ ++#if defined(__ARM_ARCH_5__) || \ ++ defined(__ARM_ARCH_5T__) || \ ++ defined(__ARM_ARCH_5TE__) ++#define PLD(code...) code ++#else ++#define PLD(code...) ++#endif ++ ++ ++/* char * memmove (char *dst, const char *src) */ ++ENTRY(memmove) ++ subs ip, r0, r1 ++ cmphi r2, ip ++ bls memcpy(PLT) ++ ++ stmfd sp!, {r0, r4, lr} ++ add r1, r1, r2 ++ add r0, r0, r2 ++ subs r2, r2, #4 ++ blt 25f ++ ands ip, r0, #3 ++ PLD( pld [r1, #-4] ) ++ bne 26f ++ ands ip, r1, #3 ++ bne 27f ++ ++19: subs r2, r2, #4 ++ blt 24f ++ subs r2, r2, #8 ++ blt 23f ++ subs r2, r2, #16 ++ blt 22f ++ ++ PLD( pld [r1, #-32] ) ++ PLD( subs r2, r2, #96 ) ++ stmfd sp!, {r5 - r8} ++ PLD( blt 21f ) ++ ++ PLD( @ cache alignment ) ++ PLD( ands ip, r1, #31 ) ++ PLD( pld [r1, #-64] ) ++ PLD( beq 20f ) ++ PLD( cmp r2, ip ) ++ PLD( pld [r1, #-96] ) ++ PLD( blt 20f ) ++ PLD( cmp ip, #16 ) ++ PLD( sub r2, r2, ip ) ++ PLD( ldmgedb r1!, {r3 - r6} ) ++ PLD( stmgedb r0!, {r3 - r6} ) ++ PLD( beq 20f ) ++ PLD( and ip, ip, #15 ) ++ PLD( cmp ip, #8 ) ++ PLD( ldr r3, [r1, #-4]! ) ++ PLD( ldrge r4, [r1, #-4]! ) ++ PLD( ldrgt r5, [r1, #-4]! ) ++ PLD( str r3, [r0, #-4]! ) ++ PLD( strge r4, [r0, #-4]! ) ++ PLD( strgt r5, [r0, #-4]! ) ++ ++20: PLD( pld [r1, #-96] ) ++ PLD( pld [r1, #-128] ) ++21: ldmdb r1!, {r3, r4, ip, lr} ++ subs r2, r2, #32 ++ stmdb r0!, {r3, r4, ip, lr} ++ ldmdb r1!, {r3, r4, ip, lr} ++ stmgedb r0!, {r3, r4, ip, lr} ++ ldmgedb r1!, {r3, r4, ip, lr} ++ stmgedb r0!, {r3, r4, ip, lr} ++ ldmgedb r1!, {r3, r4, ip, lr} ++ subges r2, r2, #32 ++ stmdb r0!, {r3, r4, ip, lr} ++ bge 20b ++ PLD( cmn r2, #96 ) ++ PLD( bge 21b ) ++ PLD( add r2, r2, #96 ) ++ tst r2, #31 ++ ldmfd sp!, {r5 - r8} ++ ldmeqfd sp!, {r0, r4, pc} ++ ++ tst r2, #16 ++22: ldmnedb r1!, {r3, r4, ip, lr} ++ stmnedb r0!, {r3, r4, ip, lr} ++ ++ tst r2, #8 ++23: ldmnedb r1!, {r3, r4} ++ stmnedb r0!, {r3, r4} ++ ++ tst r2, #4 ++24: ldrne r3, [r1, #-4]! ++ strne r3, [r0, #-4]! ++ ++25: ands r2, r2, #3 ++ ldmeqfd sp!, {r0, r4, pc} ++ ++ cmp r2, #2 ++ ldrb r3, [r1, #-1] ++ ldrgeb r4, [r1, #-2] ++ ldrgtb ip, [r1, #-3] ++ strb r3, [r0, #-1] ++ strgeb r4, [r0, #-2] ++ strgtb ip, [r0, #-3] ++ ldmfd sp!, {r0, r4, pc} ++ ++26: cmp ip, #2 ++ ldrb r3, [r1, #-1]! ++ ldrgeb r4, [r1, #-1]! ++ ldrgtb lr, [r1, #-1]! ++ strb r3, [r0, #-1]! ++ strgeb r4, [r0, #-1]! ++ strgtb lr, [r0, #-1]! ++ subs r2, r2, ip ++ blt 25b ++ ands ip, r1, #3 ++ beq 19b ++ ++27: bic r1, r1, #3 ++ cmp ip, #2 ++ ldr r3, [r1] ++ beq 35f ++ blt 36f ++ ++ ++ .macro backward_copy_shift push pull ++ ++ cmp r2, #12 ++ PLD( pld [r1, #-4] ) ++ blt 33f ++ subs r2, r2, #28 ++ stmfd sp!, {r5 - r9} ++ blt 31f ++ ++ PLD( subs r2, r2, #96 ) ++ PLD( pld [r1, #-32] ) ++ PLD( blt 30f ) ++ PLD( pld [r1, #-64] ) ++ ++ PLD( @ cache alignment ) ++ PLD( ands ip, r1, #31 ) ++ PLD( pld [r1, #-96] ) ++ PLD( beq 29f ) ++ PLD( cmp r2, ip ) ++ PLD( pld [r1, #-128] ) ++ PLD( blt 29f ) ++ PLD( sub r2, r2, ip ) ++28: PLD( mov r4, r3, push #\push ) ++ PLD( ldr r3, [r1, #-4]! ) ++ PLD( subs ip, ip, #4 ) ++ PLD( orr r4, r4, r3, pull #\pull ) ++ PLD( str r4, [r0, #-4]! ) ++ PLD( bgt 28b ) ++ ++29: PLD( pld [r1, #-128] ) ++30: mov lr, r3, push #\push ++ ldmdb r1!, {r3 - r9, ip} ++ subs r2, r2, #32 ++ orr lr, lr, ip, pull #\pull ++ mov ip, ip, push #\push ++ orr ip, ip, r9, pull #\pull ++ mov r9, r9, push #\push ++ orr r9, r9, r8, pull #\pull ++ mov r8, r8, push #\push ++ orr r8, r8, r7, pull #\pull ++ mov r7, r7, push #\push ++ orr r7, r7, r6, pull #\pull ++ mov r6, r6, push #\push ++ orr r6, r6, r5, pull #\pull ++ mov r5, r5, push #\push ++ orr r5, r5, r4, pull #\pull ++ mov r4, r4, push #\push ++ orr r4, r4, r3, pull #\pull ++ stmdb r0!, {r4 - r9, ip, lr} ++ bge 29b ++ PLD( cmn r2, #96 ) ++ PLD( bge 30b ) ++ PLD( add r2, r2, #96 ) ++ cmn r2, #16 ++ blt 32f ++31: mov r7, r3, push #\push ++ ldmdb r1!, {r3 - r6} ++ sub r2, r2, #16 ++ orr r7, r7, r6, pull #\pull ++ mov r6, r6, push #\push ++ orr r6, r6, r5, pull #\pull ++ mov r5, r5, push #\push ++ orr r5, r5, r4, pull #\pull ++ mov r4, r4, push #\push ++ orr r4, r4, r3, pull #\pull ++ stmdb r0!, {r4 - r7} ++32: adds r2, r2, #28 ++ ldmfd sp!, {r5 - r9} ++ blt 34f ++33: mov r4, r3, push #\push ++ ldr r3, [r1, #-4]! ++ subs r2, r2, #4 ++ orr r4, r4, r3, pull #\pull ++ str r4, [r0, #-4]! ++ bge 33b ++34: ++ .endm ++ ++ ++ backward_copy_shift push=8 pull=24 ++ add r1, r1, #3 ++ b 25b ++ ++35: backward_copy_shift push=16 pull=16 ++ add r1, r1, #2 ++ b 25b ++ ++36: backward_copy_shift push=24 pull=8 ++ add r1, r1, #1 ++ b 25b ++ ++ .size memmove, . - memmove ++END(memmove) ++libc_hidden_builtin_def (memmove) +--- /dev/null 2004-02-02 20:32:13.000000000 +0000 ++++ sysdeps/arm/bcopy.S 2004-03-20 18:37:48.000000000 +0000 +@@ -0,0 +1,255 @@ ++/* ++ * Optimized memmove implementation for ARM processors ++ * ++ * Author: Nicolas Pitre ++ * Created: Dec 23, 2003 ++ * Copyright: (C) MontaVista Software, Inc. ++ * ++ * This file is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This file is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ */ ++ ++#include ++ ++ ++/* ++ * Endian independent macros for shifting bytes within registers. ++ */ ++#ifndef __ARMEB__ ++#define pull lsr ++#define push lsl ++#else ++#define pull lsl ++#define push lsr ++#endif ++ ++/* ++ * Enable data preload for architectures that support it (ARMv5 and above) ++ */ ++#if defined(__ARM_ARCH_5__) || \ ++ defined(__ARM_ARCH_5T__) || \ ++ defined(__ARM_ARCH_5TE__) ++#define PLD(code...) code ++#else ++#define PLD(code...) ++#endif ++ ++dst .req r1 ++src .req r0 ++ ++/* void *bcopy (const char *src, char *dst, size_t size) */ ++ENTRY(bcopy) ++ subs ip, dst, src ++ cmphi r2, ip ++ movls r3, r0 ++ movls r0, r1 ++ movls r1, r3 ++ bls memcpy(PLT) ++ ++ stmfd sp!, {r4, lr} ++ add src, src, r2 ++ add dst, dst, r2 ++ subs r2, r2, #4 ++ blt 25f ++ ands ip, dst, #3 ++ PLD( pld [src, #-4] ) ++ bne 26f ++ ands ip, src, #3 ++ bne 27f ++ ++19: subs r2, r2, #4 ++ blt 24f ++ subs r2, r2, #8 ++ blt 23f ++ subs r2, r2, #16 ++ blt 22f ++ ++ PLD( pld [src, #-32] ) ++ PLD( subs r2, r2, #96 ) ++ stmfd sp!, {r5 - r8} ++ PLD( blt 21f ) ++ ++ PLD( @ cache alignment ) ++ PLD( ands ip, src, #31 ) ++ PLD( pld [src, #-64] ) ++ PLD( beq 20f ) ++ PLD( cmp r2, ip ) ++ PLD( pld [src, #-96] ) ++ PLD( blt 20f ) ++ PLD( cmp ip, #16 ) ++ PLD( sub r2, r2, ip ) ++ PLD( ldmgedb src!, {r3 - r6} ) ++ PLD( stmgedb dst!, {r3 - r6} ) ++ PLD( beq 20f ) ++ PLD( and ip, ip, #15 ) ++ PLD( cmp ip, #8 ) ++ PLD( ldr r3, [src, #-4]! ) ++ PLD( ldrge r4, [src, #-4]! ) ++ PLD( ldrgt r5, [src, #-4]! ) ++ PLD( str r3, [dst, #-4]! ) ++ PLD( strge r4, [dst, #-4]! ) ++ PLD( strgt r5, [dst, #-4]! ) ++ ++20: PLD( pld [src, #-96] ) ++ PLD( pld [src, #-128] ) ++21: ldmdb src!, {r3, r4, ip, lr} ++ subs r2, r2, #32 ++ stmdb dst!, {r3, r4, ip, lr} ++ ldmdb src!, {r3, r4, ip, lr} ++ stmgedb dst!, {r3, r4, ip, lr} ++ ldmgedb src!, {r3, r4, ip, lr} ++ stmgedb dst!, {r3, r4, ip, lr} ++ ldmgedb src!, {r3, r4, ip, lr} ++ subges r2, r2, #32 ++ stmdb dst!, {r3, r4, ip, lr} ++ bge 20b ++ PLD( cmn r2, #96 ) ++ PLD( bge 21b ) ++ PLD( add r2, r2, #96 ) ++ tst r2, #31 ++ ldmfd sp!, {r5 - r8} ++ ldmeqfd sp!, {r4, pc} ++ ++ tst r2, #16 ++22: ldmnedb src!, {r3, r4, ip, lr} ++ stmnedb dst!, {r3, r4, ip, lr} ++ ++ tst r2, #8 ++23: ldmnedb src!, {r3, r4} ++ stmnedb dst!, {r3, r4} ++ ++ tst r2, #4 ++24: ldrne r3, [src, #-4]! ++ strne r3, [dst, #-4]! ++ ++25: ands r2, r2, #3 ++ ldmeqfd sp!, {dst, r4, pc} ++ ++ cmp r2, #2 ++ ldrb r3, [src, #-1] ++ ldrgeb r4, [src, #-2] ++ ldrgtb ip, [src, #-3] ++ strb r3, [dst, #-1] ++ strgeb r4, [dst, #-2] ++ strgtb ip, [dst, #-3] ++ ldmfd sp!, {dst, r4, pc} ++ ++26: cmp ip, #2 ++ ldrb r3, [src, #-1]! ++ ldrgeb r4, [src, #-1]! ++ ldrgtb lr, [src, #-1]! ++ strb r3, [dst, #-1]! ++ strgeb r4, [dst, #-1]! ++ strgtb lr, [dst, #-1]! ++ subs r2, r2, ip ++ blt 25b ++ ands ip, src, #3 ++ beq 19b ++ ++27: bic src, src, #3 ++ cmp ip, #2 ++ ldr r3, [src] ++ beq 35f ++ blt 36f ++ ++ ++ .macro backward_copy_shift push pull ++ ++ cmp r2, #12 ++ PLD( pld [src, #-4] ) ++ blt 33f ++ subs r2, r2, #28 ++ stmfd sp!, {r5 - r9} ++ blt 31f ++ ++ PLD( subs r2, r2, #96 ) ++ PLD( pld [src, #-32] ) ++ PLD( blt 30f ) ++ PLD( pld [src, #-64] ) ++ ++ PLD( @ cache alignment ) ++ PLD( ands ip, src, #31 ) ++ PLD( pld [src, #-96] ) ++ PLD( beq 29f ) ++ PLD( cmp r2, ip ) ++ PLD( pld [src, #-128] ) ++ PLD( blt 29f ) ++ PLD( sub r2, r2, ip ) ++28: PLD( mov r4, r3, push #\push ) ++ PLD( ldr r3, [src, #-4]! ) ++ PLD( subs ip, ip, #4 ) ++ PLD( orr r4, r4, r3, pull #\pull ) ++ PLD( str r4, [dst, #-4]! ) ++ PLD( bgt 28b ) ++ ++29: PLD( pld [src, #-128] ) ++30: mov lr, r3, push #\push ++ ldmdb src!, {r3 - r9, ip} ++ subs r2, r2, #32 ++ orr lr, lr, ip, pull #\pull ++ mov ip, ip, push #\push ++ orr ip, ip, r9, pull #\pull ++ mov r9, r9, push #\push ++ orr r9, r9, r8, pull #\pull ++ mov r8, r8, push #\push ++ orr r8, r8, r7, pull #\pull ++ mov r7, r7, push #\push ++ orr r7, r7, r6, pull #\pull ++ mov r6, r6, push #\push ++ orr r6, r6, r5, pull #\pull ++ mov r5, r5, push #\push ++ orr r5, r5, r4, pull #\pull ++ mov r4, r4, push #\push ++ orr r4, r4, r3, pull #\pull ++ stmdb dst!, {r4 - r9, ip, lr} ++ bge 29b ++ PLD( cmn r2, #96 ) ++ PLD( bge 30b ) ++ PLD( add r2, r2, #96 ) ++ cmn r2, #16 ++ blt 32f ++31: mov r7, r3, push #\push ++ ldmdb src!, {r3 - r6} ++ sub r2, r2, #16 ++ orr r7, r7, r6, pull #\pull ++ mov r6, r6, push #\push ++ orr r6, r6, r5, pull #\pull ++ mov r5, r5, push #\push ++ orr r5, r5, r4, pull #\pull ++ mov r4, r4, push #\push ++ orr r4, r4, r3, pull #\pull ++ stmdb dst!, {r4 - r7} ++32: adds r2, r2, #28 ++ ldmfd sp!, {r5 - r9} ++ blt 34f ++33: mov r4, r3, push #\push ++ ldr r3, [src, #-4]! ++ subs r2, r2, #4 ++ orr r4, r4, r3, pull #\pull ++ str r4, [dst, #-4]! ++ bge 33b ++34: ++ .endm ++ ++ ++ backward_copy_shift push=8 pull=24 ++ add src, src, #3 ++ b 25b ++ ++35: backward_copy_shift push=16 pull=16 ++ add src, src, #2 ++ b 25b ++ ++36: backward_copy_shift push=24 pull=8 ++ add src, src, #1 ++ b 25b ++ ++ .size bcopy, . - bcopy ++END(bcopy) + +--- /dev/null 2004-02-02 20:32:13.000000000 +0000 ++++ sysdeps/arm/memcpy.S 2004-05-02 14:33:22.000000000 +0100 +@@ -0,0 +1,242 @@ ++/* ++ * Optimized memcpy implementation for ARM processors ++ * ++ * Author: Nicolas Pitre ++ * Created: Dec 23, 2003 ++ * Copyright: (C) MontaVista Software, Inc. ++ * ++ * This file is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This file is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ */ ++ ++#include ++ ++ ++/* ++ * Endian independent macros for shifting bytes within registers. ++ */ ++#ifndef __ARMEB__ ++#define pull lsr ++#define push lsl ++#else ++#define pull lsl ++#define push lsr ++#endif ++ ++/* ++ * Enable data preload for architectures that support it (ARMv5 and above) ++ */ ++#if defined(__ARM_ARCH_5__) || \ ++ defined(__ARM_ARCH_5T__) || \ ++ defined(__ARM_ARCH_5TE__) ++#define PLD(code...) code ++#else ++#define PLD(code...) ++#endif ++ ++ ++/* char * memcpy (char *dst, const char *src) */ ++ ++ENTRY(memcpy) ++ subs r2, r2, #4 ++ stmfd sp!, {r0, r4, lr} ++ blt 7f ++ ands ip, r0, #3 ++ PLD( pld [r1, #0] ) ++ bne 8f ++ ands ip, r1, #3 ++ bne 9f ++ ++1: subs r2, r2, #4 ++ blt 6f ++ subs r2, r2, #8 ++ blt 5f ++ subs r2, r2, #16 ++ blt 4f ++ ++ PLD( subs r2, r2, #65 ) ++ stmfd sp!, {r5 - r8} ++ PLD( blt 3f ) ++ PLD( pld [r1, #32] ) ++ ++ PLD( @ cache alignment ) ++ PLD( ands ip, r1, #31 ) ++ PLD( pld [r1, #64] ) ++ PLD( beq 2f ) ++ PLD( rsb ip, ip, #32 ) ++ PLD( cmp r2, ip ) ++ PLD( pld [r1, #96] ) ++ PLD( blt 2f ) ++ PLD( cmp ip, #16 ) ++ PLD( sub r2, r2, ip ) ++ PLD( ldmgeia r1!, {r3 - r6} ) ++ PLD( stmgeia r0!, {r3 - r6} ) ++ PLD( beq 2f ) ++ PLD( and ip, ip, #15 ) ++ PLD( cmp ip, #8 ) ++ PLD( ldr r3, [r1], #4 ) ++ PLD( ldrge r4, [r1], #4 ) ++ PLD( ldrgt r5, [r1], #4 ) ++ PLD( str r3, [r0], #4 ) ++ PLD( strge r4, [r0], #4 ) ++ PLD( strgt r5, [r0], #4 ) ++ ++2: PLD( pld [r1, #96] ) ++3: ldmia r1!, {r3 - r8, ip, lr} ++ subs r2, r2, #32 ++ stmia r0!, {r3 - r8, ip, lr} ++ bge 2b ++ PLD( cmn r2, #65 ) ++ PLD( bge 3b ) ++ PLD( add r2, r2, #65 ) ++ tst r2, #31 ++ ldmfd sp!, {r5 - r8} ++ ldmeqfd sp!, {r0, r4, pc} ++ ++ tst r2, #16 ++4: ldmneia r1!, {r3, r4, ip, lr} ++ stmneia r0!, {r3, r4, ip, lr} ++ ++ tst r2, #8 ++5: ldmneia r1!, {r3, r4} ++ stmneia r0!, {r3, r4} ++ ++ tst r2, #4 ++6: ldrne r3, [r1], #4 ++ strne r3, [r0], #4 ++ ++7: ands r2, r2, #3 ++ ldmeqfd sp!, {r0, r4, pc} ++ ++ cmp r2, #2 ++ ldrb r3, [r1], #1 ++ ldrgeb r4, [r1], #1 ++ ldrgtb ip, [r1] ++ strb r3, [r0], #1 ++ strgeb r4, [r0], #1 ++ strgtb ip, [r0] ++ ldmfd sp!, {r0, r4, pc} ++ ++8: rsb ip, ip, #4 ++ cmp ip, #2 ++ ldrb r3, [r1], #1 ++ ldrgeb r4, [r1], #1 ++ ldrgtb lr, [r1], #1 ++ strb r3, [r0], #1 ++ strgeb r4, [r0], #1 ++ strgtb lr, [r0], #1 ++ subs r2, r2, ip ++ blt 7b ++ ands ip, r1, #3 ++ beq 1b ++ ++9: bic r1, r1, #3 ++ cmp ip, #2 ++ ldr lr, [r1], #4 ++ beq 17f ++ bgt 18f ++ ++ ++ .macro forward_copy_shift pull push ++ ++ cmp r2, #12 ++ PLD( pld [r1, #0] ) ++ blt 15f ++ subs r2, r2, #28 ++ stmfd sp!, {r5 - r9} ++ blt 13f ++ ++ PLD( subs r2, r2, #97 ) ++ PLD( blt 12f ) ++ PLD( pld [r1, #32] ) ++ ++ PLD( @ cache alignment ) ++ PLD( rsb ip, r1, #36 ) ++ PLD( pld [r1, #64] ) ++ PLD( ands ip, ip, #31 ) ++ PLD( pld [r1, #96] ) ++ PLD( beq 11f ) ++ PLD( cmp r2, ip ) ++ PLD( pld [r1, #128] ) ++ PLD( blt 11f ) ++ PLD( sub r2, r2, ip ) ++10: PLD( mov r3, lr, pull #\pull ) ++ PLD( ldr lr, [r1], #4 ) ++ PLD( subs ip, ip, #4 ) ++ PLD( orr r3, r3, lr, push #\push ) ++ PLD( str r3, [r0], #4 ) ++ PLD( bgt 10b ) ++ ++11: PLD( pld [r1, #128] ) ++12: mov r3, lr, pull #\pull ++ ldmia r1!, {r4 - r9, ip, lr} ++ subs r2, r2, #32 ++ orr r3, r3, r4, push #\push ++ mov r4, r4, pull #\pull ++ orr r4, r4, r5, push #\push ++ mov r5, r5, pull #\pull ++ orr r5, r5, r6, push #\push ++ mov r6, r6, pull #\pull ++ orr r6, r6, r7, push #\push ++ mov r7, r7, pull #\pull ++ orr r7, r7, r8, push #\push ++ mov r8, r8, pull #\pull ++ orr r8, r8, r9, push #\push ++ mov r9, r9, pull #\pull ++ orr r9, r9, ip, push #\push ++ mov ip, ip, pull #\pull ++ orr ip, ip, lr, push #\push ++ stmia r0!, {r3 - r9, ip} ++ bge 11b ++ PLD( cmn r2, #97 ) ++ PLD( bge 12b ) ++ PLD( add r2, r2, #97 ) ++ cmn r2, #16 ++ blt 14f ++13: mov r3, lr, pull #\pull ++ ldmia r1!, {r4 - r6, lr} ++ sub r2, r2, #16 ++ orr r3, r3, r4, push #\push ++ mov r4, r4, pull #\pull ++ orr r4, r4, r5, push #\push ++ mov r5, r5, pull #\pull ++ orr r5, r5, r6, push #\push ++ mov r6, r6, pull #\pull ++ orr r6, r6, lr, push #\push ++ stmia r0!, {r3 - r6} ++14: adds r2, r2, #28 ++ ldmfd sp!, {r5 - r9} ++ blt 16f ++15: mov r3, lr, pull #\pull ++ ldr lr, [r1], #4 ++ subs r2, r2, #4 ++ orr r3, r3, lr, push #\push ++ str r3, [r0], #4 ++ bge 15b ++16: ++ .endm ++ ++ ++ forward_copy_shift pull=8 push=24 ++ sub r1, r1, #3 ++ b 7b ++ ++17: forward_copy_shift pull=16 push=16 ++ sub r1, r1, #2 ++ b 7b ++ ++18: forward_copy_shift pull=24 push=8 ++ sub r1, r1, #1 ++ b 7b ++ ++ .size memcpy, . - memcpy ++END(memcpy) ++libc_hidden_builtin_def (memcpy) ++ diff --git a/openembedded/packages/glibc/glibc-cvs/arm-no-hwcap.patch b/openembedded/packages/glibc/glibc-cvs/arm-no-hwcap.patch new file mode 100644 index 0000000000..17bfdcd125 --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs/arm-no-hwcap.patch @@ -0,0 +1,11 @@ +--- sysdeps/unix/sysv/linux/arm/dl-procinfo.h Mon Jul 23 12:57:23 2001 ++++ sysdeps/unix/sysv/linux/arm/dl-procinfo.h Sun Feb 10 06:37:00 2002 +@@ -67,7 +67,7 @@ + HWCAP_ARM_VFP = 1 << 6, + HWCAP_ARM_EDSP = 1 << 7, + +- HWCAP_IMPORTANT = (HWCAP_ARM_HALF | HWCAP_ARM_FAST_MULT) ++ HWCAP_IMPORTANT = HWCAP_ARM_FAST_MULT + }; + + static inline int diff --git a/openembedded/packages/glibc/glibc-cvs/dyn-ldconfig-20041128.patch b/openembedded/packages/glibc/glibc-cvs/dyn-ldconfig-20041128.patch new file mode 100644 index 0000000000..451b6d4afc --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs/dyn-ldconfig-20041128.patch @@ -0,0 +1,22 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- libc/elf/Makefile~dyn-ldconfig-20041128 ++++ libc/elf/Makefile +@@ -118,12 +118,13 @@ + + ifeq (yes,$(use-ldconfig)) + ifeq (yes,$(build-shared)) +-others-static += ldconfig ++#others-static += ldconfig + others += ldconfig + install-rootsbin += ldconfig + + ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon + extra-objs += $(ldconfig-modules:=.o) ++CPPFLAGS-readlib.c = -DNOT_IN_libc=1 + + # To find xmalloc.c and xstrdup.c + vpath %.c ../locale/programs diff --git a/openembedded/packages/glibc/glibc-cvs/dyn-ldconfig.patch b/openembedded/packages/glibc/glibc-cvs/dyn-ldconfig.patch new file mode 100644 index 0000000000..1041965d05 --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs/dyn-ldconfig.patch @@ -0,0 +1,62 @@ +--- elf/Makefile 13 Mar 2003 21:50:57 -0000 1.258 ++++ elf/Makefile 27 Mar 2003 20:36:07 -0000 +@@ -109,12 +109,13 @@ + + ifeq (yes,$(use-ldconfig)) + ifeq (yes,$(build-shared)) +-others-static += ldconfig ++#others-static += ldconfig + others += ldconfig + install-rootsbin += ldconfig + + ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon + extra-objs += $(ldconfig-modules:=.o) ++CPPFLAGS-readlib.c = -DNOT_IN_libc=1 + + # To find xmalloc.c and xstrdup.c + vpath %.c ../locale/programs +--- elf/ldconfig.c 13 Jan 2003 08:53:14 -0000 1.31 ++++ elf/ldconfig.c 27 Mar 2003 20:36:09 -0000 +@@ -149,6 +149,9 @@ + static int + is_hwcap_platform (const char *name) + { ++#if 1 ++ return 0; ++#else + int hwcap_idx = _dl_string_hwcap (name); + + if (hwcap_idx != -1 && ((1 << hwcap_idx) & hwcap_mask)) +@@ -164,6 +167,7 @@ + #endif + + return 0; ++#endif + } + + /* Get hwcap (including platform) encoding of path. */ +@@ -175,6 +179,7 @@ + uint64_t hwcap = 0; + uint64_t h; + ++#if 0 + size_t len; + + len = strlen (str); +@@ -210,6 +215,7 @@ + *ptr = '\0'; + } + ++#endif + free (str); + return hwcap; + } +--- elf/Versions.old 2004-06-26 13:18:35.000000000 +0100 ++++ elf/Versions 2004-06-26 14:41:09.000000000 +0100 +@@ -54,5 +54,6 @@ + _dl_get_tls_static_info; _dl_allocate_tls_init; + _dl_tls_setup; _dl_rtld_di_serinfo; + _dl_make_stack_executable; ++ _dl_cache_libcmp; + } + } diff --git a/openembedded/packages/glibc/glibc-cvs/eabi-patch-1 b/openembedded/packages/glibc/glibc-cvs/eabi-patch-1 new file mode 100644 index 0000000000..9b1fd408da --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs/eabi-patch-1 @@ -0,0 +1,88 @@ +From libc-alpha-return-17227-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com Tue Mar 22 15:57:25 2005 +Return-Path: +Delivered-To: listarch-libc-alpha at sources dot redhat dot com +Received: (qmail 12343 invoked by alias); 22 Mar 2005 15:57:24 -0000 +Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm +Precedence: bulk +List-Subscribe: +List-Archive: +List-Post: +List-Help: , +Sender: libc-alpha-owner at sources dot redhat dot com +Delivered-To: mailing list libc-alpha at sources dot redhat dot com +Received: (qmail 12264 invoked from network); 22 Mar 2005 15:57:19 -0000 +Received: from unknown (HELO nevyn.them.org) (66.93.172.17) + by sourceware dot org with SMTP; 22 Mar 2005 15:57:19 -0000 +Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian)) + id 1DDll5-0006ip-R3; Tue, 22 Mar 2005 10:57:31 -0500 +Date: Tue, 22 Mar 2005 10:57:31 -0500 +From: Daniel Jacobowitz +To: libc-alpha at sources dot redhat dot com +Cc: Phil Blundell +Subject: Common bits for the ARM EABI port +Message-ID: <20050322155731.GA25613@nevyn.them.org> +Mail-Followup-To: libc-alpha at sources dot redhat dot com, + Phil Blundell +Mime-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +User-Agent: Mutt/1.5.6+20040907i + +The changes to common files for the ARM EABI port; search the new directory, +use GLIBC_2.4 as a base version, and generate ld-linux.so.3 (so that old and +new ABI libraries can be installed on the same system, in case someone needs +to do that). Generic ARM changes coming up next. + +I noticed that the "configure: Regenerated" messages are often left out of +glibc changelogs; should I skip them? + +-- +Daniel Jacobowitz +CodeSourcery, LLC + +2005-03-22 Daniel Jacobowitz + + * configure.in: Add arm*-*-linux-gnueabi support. Remove + unused arm32 entry from $machine. + * configure: Regenerated. + * shlib-versions: Add arm*-*-linux-gnueabi. + +Index: glibc/configure.in +=================================================================== +--- glibc.orig/configure.in 2005-03-18 17:10:34.000000000 -0500 ++++ glibc/configure.in 2005-03-21 10:04:41.000000000 -0500 +@@ -423,7 +423,12 @@ changequote(,)dnl + test -n "$base_machine" || case "$machine" in + a29k | am29000) base_machine=a29k machine=a29k ;; + alpha*) base_machine=alpha machine=alpha/$machine ;; +-arm*) base_machine=arm machine=arm/arm32/$machine ;; ++arm*) base_machine=arm ++ case $config_os in ++ linux-gnueabi) machine=arm/eabi/$machine ;; ++ *) machine=arm/$machine ;; ++ esac ++ ;; + c3[012]) base_machine=cx0 machine=cx0/c30 ;; + c4[04]) base_machine=cx0 machine=cx0/c40 ;; + hppa*64*) base_machine=hppa machine=hppa/hppa64 ;; +Index: glibc/shlib-versions +=================================================================== +--- glibc.orig/shlib-versions 2005-02-13 21:53:05.000000000 -0500 ++++ glibc/shlib-versions 2005-03-21 10:06:54.000000000 -0500 +@@ -31,6 +31,7 @@ cris-.*-linux.* DEFAULT GLIBC_2.2 + x86_64-.*-linux.* DEFAULT GLIBC_2.2.5 + powerpc64-.*-linux.* DEFAULT GLIBC_2.3 + .*-.*-gnu-gnu.* DEFAULT GLIBC_2.2.6 ++arm.*-.*-linux-gnueabi DEFAULT GLIBC_2.4 + + # Configuration WORDSIZE[32|64] Alternate configuration + # ------------- ---------- ----------------------- +@@ -80,6 +81,7 @@ i.86-.*-linux.* ld=ld-linux.so.2 + sparc64-.*-linux.* ld=ld-linux.so.2 GLIBC_2.2 + sparc.*-.*-linux.* ld=ld-linux.so.2 + alpha.*-.*-linux.* ld=ld-linux.so.2 ++arm.*-.*-linux-gnueabi ld=ld-linux.so.3 + arm.*-.*-linux.* ld=ld-linux.so.2 + sh.*-.*-linux.* ld=ld-linux.so.2 GLIBC_2.2 + ia64-.*-linux.* ld=ld-linux-ia64.so.2 GLIBC_2.2 + diff --git a/openembedded/packages/glibc/glibc-cvs/eabi-patch-2 b/openembedded/packages/glibc/glibc-cvs/eabi-patch-2 new file mode 100644 index 0000000000..955a9bb51f --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs/eabi-patch-2 @@ -0,0 +1,2446 @@ +From libc-alpha-return-17231-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com Tue Mar 22 17:39:38 2005 +Return-Path: +Delivered-To: listarch-libc-alpha at sources dot redhat dot com +Received: (qmail 15063 invoked by alias); 22 Mar 2005 17:39:38 -0000 +Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm +Precedence: bulk +List-Subscribe: +List-Archive: +List-Post: +List-Help: , +Sender: libc-alpha-owner at sources dot redhat dot com +Delivered-To: mailing list libc-alpha at sources dot redhat dot com +Received: (qmail 13714 invoked from network); 22 Mar 2005 17:38:53 -0000 +Received: from unknown (HELO nevyn.them.org) (66.93.172.17) + by sourceware dot org with SMTP; 22 Mar 2005 17:38:53 -0000 +Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian)) + id 1DDnLP-00007R-0B; Tue, 22 Mar 2005 12:39:07 -0500 +Date: Tue, 22 Mar 2005 12:39:06 -0500 +From: Daniel Jacobowitz +To: libc-alpha at sources dot redhat dot com, Phil Blundell +Subject: Re: Remainder of ARM EABI support +Message-ID: <20050322173906.GA316@nevyn.them.org> +Mail-Followup-To: libc-alpha at sources dot redhat dot com, + Phil Blundell +References: <20050322162137.GA26662@nevyn.them.org> +Mime-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <20050322162137 dot GA26662 at nevyn dot them dot org> +User-Agent: Mutt/1.5.6+20040907i + +On Tue, Mar 22, 2005 at 11:21:37AM -0500, Daniel Jacobowitz wrote: +> This patch is the remaining pieces of ARM EABI support, the +> arm*-*-linux-gnueabi target. +> +> Highlights of the new ABI compared to the old one: +> - Eight byte stack alignment instead of four. +> - VFP floating point support instead of FPA; there's actually hardware +> which supports VFP... +> - More standard structure layout. The old ABI (APCS) always rounded +> structures up to 32-bit alignment even if they contained only chars; +> it also aligned 64-bit fields to four bytes. +> - Some types have been grown to accomodate modern ARM cores, particularly +> jmp_buf. +> +> The EABI also defines some additional symbols that a C library has to +> define, which allow "portable" ARM objects to be linked to multiple C +> libraries even if certain implementation-defined constants differ. +> They're added to ARM-specific files in libc_nonshared.a. +> +> Most of the contents of sysdeps/unix/sysv/linux/arm/eabi are wrappers for +> syscalls whose types have changed between the old and new ABI. The kernel +> developers are discussing an EABI syscall interface, but for now the swi +> based syscalls take the same argument types they used to for APCS. Only +> a handful of syscalls are affected. + +My track record is not very good this morning; I apologize. I sent the +wrong version of the patch. This one includes a couple of VFP fixes +left out of the last posting, and a complete changelog. + +-- +Daniel Jacobowitz +CodeSourcery, LLC + +2005-03-22 Daniel Jacobowitz + Mark Mitchell + Paul Brook + + * sysdeps/arm/eabi/Makefile, sysdeps/arm/eabi/Versions, + sysdeps/arm/eabi/aeabi_assert.c, sysdeps/arm/eabi/aeabi_atexit.c, + sysdeps/arm/eabi/aeabi_errno_addr.c, sysdeps/arm/eabi/aeabi_lcsts.c, + sysdeps/arm/eabi/aeabi_localeconv.c, sysdeps/arm/eabi/aeabi_math.c, + sysdeps/arm/eabi/aeabi_mb_cur_max.c, + sysdeps/arm/eabi/aeabi_sighandlers.S, + sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c, + sysdeps/arm/eabi/bits/huge_val.h, sysdeps/arm/eabi/bits/setjmp.h, + sysdeps/arm/eabi/find_exidx.c, sysdeps/arm/eabi/fpu/__longjmp.S, + sysdeps/arm/eabi/fpu/bits/fenv.h, sysdeps/arm/eabi/fpu/fclrexcpt.c, + sysdeps/arm/eabi/fpu/fegetround.c, sysdeps/arm/eabi/fpu/fesetenv.c, + sysdeps/arm/eabi/fpu/fesetround.c, sysdeps/arm/eabi/fpu/fpu_control.h, + sysdeps/arm/eabi/fpu/feholdexcpt.c, + sysdeps/arm/eabi/fpu/fraiseexcpt.c, + sysdeps/arm/eabi/fpu/setjmp.S, + sysdeps/unix/sysv/linux/arm/eabi/configure, + sysdeps/unix/sysv/linux/arm/eabi/configure.in, + sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c, + sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c, + sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c, + sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c, + sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h, + sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c, + sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c, + sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c, + sysdeps/unix/sysv/linux/arm/eabi/semop.c, + sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c, + sysdeps/unix/sysv/linux/arm/eabi/statfs64.c, + sysdeps/unix/sysv/linux/arm/eabi/uname.c, + sysdeps/unix/sysv/linux/arm/eabi/xstat64.c, + sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c, + sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h: New files. + + +Index: glibc/sysdeps/arm/eabi/Makefile +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/Makefile 2005-03-22 11:53:10.049703870 -0500 +@@ -0,0 +1,15 @@ ++ifeq ($(subdir),csu) ++aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math ++aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \ ++ aeabi_mb_cur_max aeabi_atexit ++ ++sysdep_routines += $(aeabi_constants) $(aeabi_routines) ++static-only-routines += $(aeabi_constants) $(aeabi_routines) ++endif ++ ++ifeq ($(subdir),elf) ++sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx ++shared-only-routines += aeabi_unwind_cpp_pr1 ++sysdep-rtld-routines += aeabi_unwind_cpp_pr1 ++endif ++ +Index: glibc/sysdeps/arm/eabi/Versions +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/Versions 2005-03-22 11:53:10.049703870 -0500 +@@ -0,0 +1,6 @@ ++libc { ++ GLIBC_2.4 { ++ # Helper routines ++ __gnu_Unwind_Find_exidx; ++ } ++} +Index: glibc/sysdeps/arm/eabi/aeabi_assert.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/aeabi_assert.c 2005-03-22 11:53:10.049703870 -0500 +@@ -0,0 +1,27 @@ ++/* Copyright (C) 2004 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++ ++void attribute_hidden ++__aeabi_assert (const char *assertion, const char *file, ++ unsigned int line) ++{ ++ __assert_fail (assertion, file, line, NULL); ++} +Index: glibc/sysdeps/arm/eabi/aeabi_atexit.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/aeabi_atexit.c 2005-03-22 11:53:10.050703627 -0500 +@@ -0,0 +1,28 @@ ++/* Copyright (C) 2005 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++ ++/* Register a function to be called by exit or when a shared library ++ is unloaded. This routine is like __cxa_atexit, but uses the ++ calling sequence required by the ARM EABI. */ ++int attribute_hidden ++__aeabi_atexit (void *arg, void (*func) (void *), void *d) ++{ ++ return __cxa_atexit (func, arg, d); ++} +Index: glibc/sysdeps/arm/eabi/aeabi_errno_addr.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/aeabi_errno_addr.c 2005-03-22 11:53:10.050703627 -0500 +@@ -0,0 +1,26 @@ ++/* Copyright (C) 2004 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++ ++attribute_hidden ++volatile int * ++__aeabi_errno_addr (void) ++{ ++ return &errno; ++} +Index: glibc/sysdeps/arm/eabi/aeabi_lcsts.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/aeabi_lcsts.c 2005-03-22 11:53:10.050703627 -0500 +@@ -0,0 +1,67 @@ ++/* Link-time constants for ARM EABI. ++ Copyright (C) 2005 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++/* The ARM EABI requires that we provide ISO compile-time constants as ++ link-time constants. Some portable applications may reference these. */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define eabi_constant2(X,Y) const int __aeabi_##X attribute_hidden = Y ++#define eabi_constant(X) const int __aeabi_##X attribute_hidden = X ++ ++eabi_constant (EDOM); ++eabi_constant (ERANGE); ++eabi_constant (EILSEQ); ++ ++eabi_constant (MB_LEN_MAX); ++ ++eabi_constant (LC_COLLATE); ++eabi_constant (LC_CTYPE); ++eabi_constant (LC_MONETARY); ++eabi_constant (LC_NUMERIC); ++eabi_constant (LC_TIME); ++eabi_constant (LC_ALL); ++ ++/* The value of __aeabi_JMP_BUF_SIZE is the number of doublewords in a ++ jmp_buf. */ ++eabi_constant2 (JMP_BUF_SIZE, sizeof (jmp_buf) / 8); ++ ++eabi_constant (SIGABRT); ++eabi_constant (SIGFPE); ++eabi_constant (SIGILL); ++eabi_constant (SIGINT); ++eabi_constant (SIGSEGV); ++eabi_constant (SIGTERM); ++ ++eabi_constant2 (IOFBF, _IOFBF); ++eabi_constant2 (IOLBF, _IOLBF); ++eabi_constant2 (IONBF, _IONBF); ++eabi_constant (BUFSIZ); ++eabi_constant (FOPEN_MAX); ++eabi_constant (TMP_MAX); ++eabi_constant (FILENAME_MAX); ++eabi_constant (L_tmpnam); ++ ++eabi_constant (CLOCKS_PER_SEC); +Index: glibc/sysdeps/arm/eabi/aeabi_localeconv.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/aeabi_localeconv.c 2005-03-22 11:53:10.050703627 -0500 +@@ -0,0 +1,26 @@ ++/* Copyright (C) 2004 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++ ++attribute_hidden ++struct lconv * ++__aeabi_localeconv (void) ++{ ++ return localeconv (); ++} +Index: glibc/sysdeps/arm/eabi/aeabi_math.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/aeabi_math.c 2005-03-22 11:53:10.050703627 -0500 +@@ -0,0 +1,25 @@ ++/* Copyright (C) 2004 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++ ++const double __aeabi_HUGE_VAL attribute_hidden = HUGE_VAL; ++const long double __aeabi_HUGE_VALL attribute_hidden = HUGE_VALL; ++const float __aeabi_HUGE_VALF attribute_hidden = HUGE_VALF; ++const float __aeabi_INFINITY attribute_hidden = INFINITY; ++const float __aeabi_NAN attribute_hidden = NAN; +Index: glibc/sysdeps/arm/eabi/aeabi_mb_cur_max.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/aeabi_mb_cur_max.c 2005-03-22 11:53:10.051703385 -0500 +@@ -0,0 +1,28 @@ ++/* Copyright (C) 2004 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++ ++int attribute_hidden ++__aeabi_MB_CUR_MAX (void) ++{ ++ return MB_CUR_MAX; ++} +Index: glibc/sysdeps/arm/eabi/aeabi_sighandlers.S +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/aeabi_sighandlers.S 2005-03-22 11:53:10.051703385 -0500 +@@ -0,0 +1,37 @@ ++/* Link-time constants for ARM EABI - signal handlers. ++ Copyright (C) 2005 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++/* The ARM EABI defines these as "functions". */ ++ ++#include ++ ++ .global __aeabi_SIG_DFL ++ .hidden __aeabi_SIG_DFL ++ .type __aeabi_SIG_DFL, %function ++ .set __aeabi_SIG_DFL, 0 ++ ++ .global __aeabi_SIG_IGN ++ .hidden __aeabi_SIG_IGN ++ .type __aeabi_SIG_IGN, %function ++ .set __aeabi_SIG_IGN, 1 ++ ++ .global __aeabi_SIG_ERR ++ .hidden __aeabi_SIG_ERR ++ .type __aeabi_SIG_ERR, %function ++ .set __aeabi_SIG_ERR, -1 +Index: glibc/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c 2005-03-22 11:53:10.051703385 -0500 +@@ -0,0 +1,28 @@ ++/* Copyright (C) 2005 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++/* Because some objects in ld.so and libc.so are built with ++ -fexceptions, we end up with references to this personality ++ routine. However, these libraries are not linked against ++ libgcc_eh.a, so we need a dummy definition. This routine will ++ never actually be called. */ ++ ++void ++__aeabi_unwind_cpp_pr1 (void) ++{ ++} +Index: glibc/sysdeps/arm/eabi/bits/huge_val.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/bits/huge_val.h 2005-03-22 11:53:10.051703385 -0500 +@@ -0,0 +1,55 @@ ++/* `HUGE_VAL' constant for IEEE 754 machines (where it is infinity). ++ Used by and functions for overflow. ++ Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000, 2004 ++ Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#ifndef _MATH_H ++# error "Never use directly; include instead." ++#endif ++ ++/* IEEE positive infinity (-HUGE_VAL is negative infinity). */ ++ ++#if __GNUC_PREREQ(3,3) ++# define HUGE_VAL (__builtin_huge_val()) ++#elif __GNUC_PREREQ(2,96) ++# define HUGE_VAL (__extension__ 0x1.0p2047) ++#elif defined __GNUC__ ++ ++# define HUGE_VAL \ ++ (__extension__ \ ++ ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \ ++ { __l: 0x7ff0000000000000ULL }).__d) ++ ++#else /* not GCC */ ++ ++# include ++ ++typedef union { unsigned char __c[8]; double __d; } __huge_val_t; ++ ++# if __BYTE_ORDER == __BIG_ENDIAN ++# define __HUGE_VAL_bytes { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } ++# endif ++# if __BYTE_ORDER == __LITTLE_ENDIAN ++# define __HUGE_VAL_bytes { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } ++# endif ++ ++static __huge_val_t __huge_val = { __HUGE_VAL_bytes }; ++# define HUGE_VAL (__huge_val.__d) ++ ++#endif /* GCC. */ +Index: glibc/sysdeps/arm/eabi/bits/setjmp.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/bits/setjmp.h 2005-03-22 11:53:10.052703143 -0500 +@@ -0,0 +1,45 @@ ++/* Copyright (C) 2004 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++/* Define the machine-dependent type `jmp_buf'. ARM EABI version. */ ++ ++#ifndef _BITS_SETJMP_H ++#define _BITS_SETJMP_H 1 ++ ++#if !defined _SETJMP_H && !defined _PTHREAD_H ++# error "Never include directly; use instead." ++#endif ++ ++#ifndef _ASM ++/* The exact set of registers saved may depend on the particular core ++ in use, as some coprocessor registers may need to be saved. The C ++ Library ABI requires that the buffer be 8-byte aligned, and ++ recommends that the buffer contain 64 words. The first 28 words ++ are occupied by v1-v6, sl, fp, sp, pc, d8-d15, and fpscr. (Note ++ that d8-15 require 17 words, due to the use of fstmx.) */ ++typedef int __jmp_buf[64] __attribute__((aligned (8))); ++#endif ++ ++#define __JMP_BUF_SP 8 ++ ++/* Test if longjmp to JMPBUF would unwind the frame ++ containing a local variable at ADDRESS. */ ++#define _JMPBUF_UNWINDS(jmpbuf, address) \ ++ ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP])) ++ ++#endif +Index: glibc/sysdeps/arm/eabi/find_exidx.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/find_exidx.c 2005-03-22 11:53:10.052703143 -0500 +@@ -0,0 +1,80 @@ ++/* Copyright (C) 2005 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++ ++struct unw_eh_callback_data ++{ ++ _Unwind_Ptr pc; ++ _Unwind_Ptr exidx_start; ++ int exidx_len; ++}; ++ ++ ++/* Callback to determins if the PC lies within an object, and remember the ++ location of the exception index table if it does. */ ++ ++static int ++find_exidx_callback (struct dl_phdr_info * info, size_t size, void * ptr) ++{ ++ struct unw_eh_callback_data * data; ++ const ElfW(Phdr) *phdr; ++ int i; ++ int match; ++ _Unwind_Ptr load_base; ++ ++ data = (struct unw_eh_callback_data *) ptr; ++ load_base = info->dlpi_addr; ++ phdr = info->dlpi_phdr; ++ ++ match = 0; ++ for (i = info->dlpi_phnum; i > 0; i--, phdr++) ++ { ++ if (phdr->p_type == PT_LOAD) ++ { ++ _Unwind_Ptr vaddr = phdr->p_vaddr + load_base; ++ if (data->pc >= vaddr && data->pc < vaddr + phdr->p_memsz) ++ match = 1; ++ } ++ else if (phdr->p_type == PT_ARM_EXIDX) ++ { ++ data->exidx_start = (_Unwind_Ptr) (phdr->p_vaddr + load_base); ++ data->exidx_len = phdr->p_memsz; ++ } ++ } ++ ++ return match; ++} ++ ++ ++/* Find the exception index table containing PC. */ ++ ++_Unwind_Ptr ++__gnu_Unwind_Find_exidx (_Unwind_Ptr pc, int * pcount) ++{ ++ struct unw_eh_callback_data data; ++ ++ data.pc = pc; ++ data.exidx_start = 0; ++ if (dl_iterate_phdr (find_exidx_callback, &data) <= 0) ++ return 0; ++ ++ *pcount = data.exidx_len / 8; ++ return data.exidx_start; ++} +Index: glibc/sysdeps/arm/eabi/fpu/__longjmp.S +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/fpu/__longjmp.S 2005-03-22 11:53:10.052703143 -0500 +@@ -0,0 +1,43 @@ ++/* longjmp for ARM. ++ Copyright (C) 2004 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#define _SETJMP_H ++#define _ASM ++#include ++ ++/* __longjmp(jmpbuf, val) */ ++ ++ENTRY (__longjmp) ++ mov ip, r0 /* save jmp_buf pointer */ ++ ++ movs r0, r1 /* get the return value in place */ ++ moveq r0, #1 /* can't let setjmp() return zero! */ ++ ++ /* Restore the integer registers. */ ++ LOADREGS(ia, ip!, {v1-v6, sl, fp, sp, lr}) ++ ++ /* Restore the VFP registers. */ ++ fldmiax ip!, {d8-d15} ++ /* Restore the floating-point status register. */ ++ ldr r1, [ip], #4 ++ fmxr fpscr, r1 ++ ++ DO_RET(lr) ++END (__longjmp) +Index: glibc/sysdeps/arm/eabi/fpu/bits/fenv.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/fpu/bits/fenv.h 2005-03-22 12:34:55.511467536 -0500 +@@ -0,0 +1,74 @@ ++/* Copyright (C) 2004 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#ifndef _FENV_H ++# error "Never use directly; include instead." ++#endif ++ ++/* Define bits representing exceptions in the FPU status word. */ ++enum ++ { ++ FE_INVALID = 1, ++#define FE_INVALID FE_INVALID ++ FE_DIVBYZERO = 2, ++#define FE_DIVBYZERO FE_DIVBYZERO ++ FE_OVERFLOW = 4, ++#define FE_OVERFLOW FE_OVERFLOW ++ FE_UNDERFLOW = 8, ++#define FE_UNDERFLOW FE_UNDERFLOW ++ FE_INEXACT = 16, ++#define FE_INEXACT FE_INEXACT ++ }; ++ ++/* Amount to shift by to convert an exception to a mask bit. */ ++#define FE_EXCEPT_SHIFT 8 ++ ++/* All supported exceptions. */ ++#define FE_ALL_EXCEPT \ ++ (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) ++ ++/* VFP supports all of the four defined rounding modes. */ ++enum ++ { ++ FE_TONEAREST = 0, ++#define FE_TONEAREST FE_TONEAREST ++ FE_UPWARD = 0x400000, ++#define FE_UPWARD FE_UPWARD ++ FE_DOWNWARD = 0x800000, ++#define FE_DOWNWARD FE_DOWNWARD ++ FE_TOWARDZERO = 0xc00000 ++#define FE_TOWARDZERO FE_TOWARDZERO ++ }; ++ ++/* Type representing exception flags. */ ++typedef unsigned int fexcept_t; ++ ++/* Type representing floating-point environment. */ ++typedef struct ++ { ++ unsigned int __cw; ++ } ++fenv_t; ++ ++/* If the default argument is used we use this value. */ ++#define FE_DFL_ENV ((fenv_t *) -1l) ++ ++#ifdef __USE_GNU ++/* Floating-point environment where none of the exceptions are masked. */ ++# define FE_NOMASK_ENV ((__const fenv_t *) -2) ++#endif +Index: glibc/sysdeps/arm/eabi/fpu/fclrexcpt.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/fpu/fclrexcpt.c 2005-03-22 11:53:10.053702900 -0500 +@@ -0,0 +1,50 @@ ++/* Clear given exceptions in current floating-point environment. ++ Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++ ++int ++__feclearexcept (int excepts) ++{ ++ unsigned long int temp; ++ ++ /* Mask out unsupported bits/exceptions. */ ++ excepts &= FE_ALL_EXCEPT; ++ ++ /* Get the current floating point status. */ ++ _FPU_GETCW (temp); ++ ++ /* Clear the relevant bits. */ ++ temp = (temp & ~FE_ALL_EXCEPT) | (temp & FE_ALL_EXCEPT & ~excepts); ++ ++ /* Put the new data in effect. */ ++ _FPU_SETCW (temp); ++ ++ /* Success. */ ++ return 0; ++} ++ ++#include ++#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) ++strong_alias (__feclearexcept, __old_feclearexcept) ++compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1); ++#endif ++ ++versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2); +Index: glibc/sysdeps/arm/eabi/fpu/fegetround.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/fpu/fegetround.c 2005-03-22 11:53:10.053702900 -0500 +@@ -0,0 +1,32 @@ ++/* Return current rounding direction. ++ Copyright (C) 2004 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++ ++int ++fegetround (void) ++{ ++ unsigned int temp; ++ ++ /* Get the current environment. */ ++ _FPU_GETCW (temp); ++ ++ return temp & FE_TOWARDZERO; ++} +Index: glibc/sysdeps/arm/eabi/fpu/fesetenv.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/fpu/fesetenv.c 2005-03-22 12:34:55.521465156 -0500 +@@ -0,0 +1,46 @@ ++/* Install given floating-point environment. ++ Copyright (C) 2004 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++ ++int ++__fesetenv (const fenv_t *envp) ++{ ++ unsigned int temp; ++ ++ _FPU_GETCW (temp); ++ temp &= _FPU_RESERVED; ++ ++ if (envp == FE_DFL_ENV) ++ temp |= _FPU_DEFAULT; ++ else if (envp == FE_NOMASK_ENV) ++ temp |= _FPU_IEEE; ++ else ++ temp |= envp->__cw & ~_FPU_RESERVED; ++ ++ _FPU_SETCW (temp); ++ ++ /* Success. */ ++ return 0; ++} ++ ++#include ++libm_hidden_ver (__fesetenv, fesetenv) ++versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); +Index: glibc/sysdeps/arm/eabi/fpu/fesetround.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/fpu/fesetround.c 2005-03-22 11:53:10.053702900 -0500 +@@ -0,0 +1,41 @@ ++/* Set current rounding direction. ++ Copyright (C) 2004 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++ ++int ++fesetround (int round) ++{ ++ fpu_control_t temp; ++ ++ switch (round) ++ { ++ case FE_TONEAREST: ++ case FE_UPWARD: ++ case FE_DOWNWARD: ++ case FE_TOWARDZERO: ++ _FPU_GETCW (temp); ++ temp = (temp & ~FE_TOWARDZERO) | round; ++ _FPU_SETCW (temp); ++ return 0; ++ default: ++ return 1; ++ } ++} +Index: glibc/sysdeps/arm/eabi/fpu/fpu_control.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/fpu/fpu_control.h 2005-03-22 12:34:55.521465156 -0500 +@@ -0,0 +1,47 @@ ++/* FPU control word definitions. ARM VFP version. ++ Copyright (C) 2004 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#ifndef _FPU_CONTROL_H ++#define _FPU_CONTROL_H ++ ++/* masking of interrupts */ ++#define _FPU_MASK_IM 0x00000100 /* invalid operation */ ++#define _FPU_MASK_ZM 0x00000200 /* divide by zero */ ++#define _FPU_MASK_OM 0x00000400 /* overflow */ ++#define _FPU_MASK_UM 0x00000800 /* underflow */ ++#define _FPU_MASK_PM 0x00001000 /* inexact */ ++ ++/* Some bits in the FPSCR are not yet defined. They must be preserved when ++ modifying the contents. */ ++#define _FPU_RESERVED 0x0e08e0e0 ++#define _FPU_DEFAULT 0x00000000 ++/* Default + exceptions enabled. */ ++#define _FPU_IEEE (_FPU_DEFAULT | 0x00001f00) ++ ++/* Type of the control word. */ ++typedef unsigned int fpu_control_t; ++ ++/* Macros for accessing the hardware control word. */ ++#define _FPU_GETCW(cw) __asm__ __volatile__ ("fmrx %0, fpscr" : "=r" (cw)) ++#define _FPU_SETCW(cw) __asm__ __volatile__ ("fmxr fpscr, %0" : : "r" (cw)) ++ ++/* Default control word set at startup. */ ++extern fpu_control_t __fpu_control; ++ ++#endif /* _FPU_CONTROL_H */ +Index: glibc/sysdeps/arm/eabi/fpu/setjmp.S +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/fpu/setjmp.S 2005-03-22 11:53:10.054702658 -0500 +@@ -0,0 +1,39 @@ ++/* setjmp for ARM. ++ Copyright (C) 2004 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#define _SETJMP_H ++#define _ASM ++#include ++ ++ENTRY (__sigsetjmp) ++ mov ip, r0 ++ ++ /* Store the integer registers. */ ++ stmia ip!, {v1-v6, sl, fp, sp, lr} ++ ++ /* Store the VFP registers. */ ++ fstmiax ip!, {d8-d15} ++ /* Store the floating-point status register. */ ++ fmrx r2, fpscr ++ str r2, [ip], #4 ++ ++ /* Make a tail call to __sigjmp_save; it takes the same args. */ ++ B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) ++END (__sigsetjmp) +Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/configure +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/configure 2005-03-22 11:53:10.054702658 -0500 +@@ -0,0 +1,5 @@ ++# This file is generated from configure.in by Autoconf. DO NOT EDIT! ++ # Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi. ++ ++arch_minimum_kernel=2.4.17 ++libc_cv_gcc_unwind_find_fde=no +Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/configure.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/configure.in 2005-03-22 11:53:10.054702658 -0500 +@@ -0,0 +1,5 @@ ++GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. ++# Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi. ++ ++arch_minimum_kernel=2.4.17 ++libc_cv_gcc_unwind_find_fde=no +Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c 2005-03-22 11:53:10.054702658 -0500 +@@ -0,0 +1,37 @@ ++/* epoll_ctl wrapper for ARM EABI. ++ Copyright (C) 2005 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++ ++#include ++ ++int ++epoll_ctl (int __epfd, int __op, int __fd, struct epoll_event *__event) ++{ ++ struct kernel_epoll_event k_event; ++ ++ k_event.events = __event->events; ++ memcpy (&k_event.data, &__event->data, sizeof (k_event.data)); ++ ++ return INLINE_SYSCALL (epoll_ctl, 4, __epfd, __op, __fd, &k_event); ++} ++ ++libc_hidden_def (epoll_ctl) +Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c 2005-03-22 11:53:10.055702416 -0500 +@@ -0,0 +1,54 @@ ++/* epoll_ctl wrapper for ARM EABI. ++ Copyright (C) 2005 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++int ++epoll_wait (int __epfd, struct epoll_event *__events, ++ int __maxevents, int __timeout); ++{ ++ struct kernel_epoll_event *k_events; ++ int result; ++ ++ k_events = malloc (sizeof (struct kernel_epoll_event) * __maxevents); ++ if (k_events == NULL) ++ { ++ __set_errno (ENOMEM); ++ return -1; ++ } ++ ++ result = INLINE_SYSCALL (epoll_wait, 4, __epfd, __events, k_events, ++ __timeout); ++ ++ for (i = 0; i < result; i++) ++ { ++ __events[i].events = k_events[i].events; ++ memcpy (&__events[i].data, &k_events[i].data, sizeof (k_events[i].data)); ++ } ++ ++ free (k_events); ++ return result; ++} ++ ++libc_hidden_def (epoll_wait) +Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c 2005-03-22 11:53:10.055702416 -0500 +@@ -0,0 +1,76 @@ ++/* Return information about the filesystem on which FD resides. ++ Copyright (C) 1996,1997,1998,1999,2000,2003,2005 ++ Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++/* Defined in statfs64.c. */ ++extern int __no_statfs64 attribute_hidden; ++ ++/* Return information about the filesystem on which FD resides. */ ++int ++__fstatfs64 (int fd, struct statfs64 *buf) ++{ ++#ifdef __NR_fstatfs64 ++# if __ASSUME_STATFS64 == 0 ++ if (! __no_statfs64) ++# endif ++ { ++ /* The EABI structure is the same as the old ABI structure, except ++ that it has four additional bytes of padding - at the end. We can ++ ignore them. */ ++ int result = INLINE_SYSCALL (fstatfs64, 3, fd, sizeof (*buf) - 4, buf); ++ ++# if __ASSUME_STATFS64 == 0 ++ if (result == 0 || errno != ENOSYS) ++# endif ++ return result; ++ ++# if __ASSUME_STATFS64 == 0 ++ __no_statfs64 = 1; ++# endif ++ } ++#endif ++ ++#if __ASSUME_STATFS64 == 0 ++ struct statfs buf32; ++ ++ if (__fstatfs (fd, &buf32) < 0) ++ return -1; ++ ++ buf->f_type = buf32.f_type; ++ buf->f_bsize = buf32.f_bsize; ++ buf->f_blocks = buf32.f_blocks; ++ buf->f_bfree = buf32.f_bfree; ++ buf->f_bavail = buf32.f_bavail; ++ buf->f_files = buf32.f_files; ++ buf->f_ffree = buf32.f_ffree; ++ buf->f_fsid = buf32.f_fsid; ++ buf->f_namelen = buf32.f_namelen; ++ buf->f_frsize = buf32.f_frsize; ++ memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare)); ++ ++ return 0; ++#endif ++} ++weak_alias (__fstatfs64, fstatfs64) +Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c 2005-03-22 11:53:10.055702416 -0500 +@@ -0,0 +1,100 @@ ++/* fxstat64 using old-style Unix fstat system call. ++ Copyright (C) 1997-2002, 2003, 2005 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include "kernel-features.h" ++ ++#if __ASSUME_STAT64_SYSCALL == 0 ++# include ++#endif ++ ++#ifdef __NR_fstat64 ++# if __ASSUME_STAT64_SYSCALL == 0 ++/* The variable is shared between all wrappers around *stat64 calls. */ ++extern int __have_no_stat64; ++# endif ++#endif ++ ++/* Get information about the file FD in BUF. */ ++ ++int ++___fxstat64 (int vers, int fd, struct stat64 *buf) ++{ ++ int result; ++ struct kernel_stat64 kbuf64; ++ ++#if __ASSUME_STAT64_SYSCALL > 0 ++ result = INLINE_SYSCALL (fstat64, 2, fd, CHECK_1 (&kbuf64)); ++ if (result == 0) ++ result = __xstat64_kernel64_conv (vers, &kbuf64, buf); ++# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0 ++ if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino) ++ buf->st_ino = buf->__st_ino; ++# endif ++ return result; ++#else ++ struct kernel_stat kbuf; ++# if defined __NR_fstat64 ++ if (! __have_no_stat64) ++ { ++ int saved_errno = errno; ++ result = INLINE_SYSCALL (fstat64, 2, fd, CHECK_1 (&kbuf64)); ++ ++ if (result != -1 || errno != ENOSYS) ++ { ++ if (result == 0) ++ result = __xstat64_kernel64_conv (vers, &kbuf64, buf); ++# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0 ++ if (!result && buf->__st_ino != (__ino_t)buf->st_ino) ++ buf->st_ino = buf->__st_ino; ++# endif ++ return result; ++ } ++ ++ __set_errno (saved_errno); ++ __have_no_stat64 = 1; ++ } ++# endif ++ result = INLINE_SYSCALL (fstat, 2, fd, __ptrvalue (&kbuf)); ++ if (result == 0) ++ result = __xstat64_conv (vers, &kbuf, buf); ++ ++ return result; ++#endif ++} ++ ++#include ++ ++#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2) ++versioned_symbol (libc, ___fxstat64, __fxstat64, GLIBC_2_2); ++strong_alias (___fxstat64, __old__fxstat64) ++compat_symbol (libc, __old__fxstat64, __fxstat64, GLIBC_2_1); ++hidden_ver (___fxstat64, __fxstat64) ++#else ++strong_alias (___fxstat64, __fxstat64) ++hidden_def (__fxstat64) ++#endif +Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h 2005-03-22 11:53:10.056702174 -0500 +@@ -0,0 +1,59 @@ ++/* Copyright (C) 2005 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++ ++/* kernel_stat64 is just like stat64, except packed. The EABI aligns ++ st_size to an eight byte boundary but the old ABI only aligns it to ++ four. Similarly st_blocks. */ ++struct kernel_stat64 ++ { ++ __dev_t st_dev; /* Device. */ ++ unsigned int __pad1; ++ ++ __ino_t __st_ino; /* 32bit file serial number. */ ++ __mode_t st_mode; /* File mode. */ ++ __nlink_t st_nlink; /* Link count. */ ++ __uid_t st_uid; /* User ID of the file's owner. */ ++ __gid_t st_gid; /* Group ID of the file's group.*/ ++ __dev_t st_rdev; /* Device number, if device. */ ++ unsigned int __pad2; ++ __off64_t st_size; /* Size of file, in bytes. */ ++ __blksize_t st_blksize; /* Optimal block size for I/O. */ ++ ++ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ ++#ifdef __USE_MISC ++ /* Nanosecond resolution timestamps are stored in a format ++ equivalent to 'struct timespec'. This is the type used ++ whenever possible but the Unix namespace rules do not allow the ++ identifier 'timespec' to appear in the header. ++ Therefore we have to handle the use of this header in strictly ++ standard-compliant sources special. */ ++ struct timespec st_atim; /* Time of last access. */ ++ struct timespec st_mtim; /* Time of last modification. */ ++ struct timespec st_ctim; /* Time of last status change. */ ++#else ++ __time_t st_atime; /* Time of last access. */ ++ unsigned long int st_atimensec; /* Nscecs of last access. */ ++ __time_t st_mtime; /* Time of last modification. */ ++ unsigned long int st_mtimensec; /* Nsecs of last modification. */ ++ __time_t st_ctime; /* Time of last status change. */ ++ unsigned long int st_ctimensec; /* Nsecs of last status change. */ ++#endif ++ __ino64_t st_ino; /* File serial number. */ ++ } __attribute__ ((packed,aligned(4))); +Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c 2005-03-22 11:53:10.056702174 -0500 +@@ -0,0 +1,99 @@ ++/* lxstat64 using old-style Unix lstat system call. ++ Copyright (C) 1997-2002, 2003, 2005 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include "kernel-features.h" ++ ++#if __ASSUME_STAT64_SYSCALL == 0 ++# include ++#endif ++ ++#ifdef __NR_lstat64 ++# if __ASSUME_STAT64_SYSCALL == 0 ++/* The variable is shared between all wrappers around *stat64 calls. */ ++extern int __have_no_stat64; ++# endif ++#endif ++ ++/* Get information about the file NAME in BUF. */ ++int ++___lxstat64 (int vers, const char *name, struct stat64 *buf) ++{ ++ int result; ++ struct kernel_stat64 kbuf64; ++ ++#ifdef __ASSUME_STAT64_SYSCALL ++ result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64)); ++ if (result == 0) ++ result = __xstat64_kernel64_conv (vers, &kbuf64, buf); ++# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0 ++ if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino) ++ buf->st_ino = buf->__st_ino; ++# endif ++ return result; ++#else ++ struct kernel_stat kbuf; ++# ifdef __NR_lstat64 ++ if (! __have_no_stat64) ++ { ++ int saved_errno = errno; ++ result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64)); ++ ++ if (result != -1 || errno != ENOSYS) ++ { ++ if (result == 0) ++ result = __xstat64_kernel64_conv (vers, &kbuf64, buf); ++# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0 ++ if (!result && buf->__st_ino != (__ino_t) buf->st_ino) ++ buf->st_ino = buf->__st_ino; ++# endif ++ return result; ++ } ++ ++ __set_errno (saved_errno); ++ __have_no_stat64 = 1; ++ } ++# endif ++ result = INLINE_SYSCALL (lstat, 2, CHECK_STRING (name), __ptrvalue (&kbuf)); ++ if (result == 0) ++ result = __xstat64_conv (vers, &kbuf, buf); ++ ++ return result; ++#endif ++} ++ ++#include ++ ++#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2) ++versioned_symbol (libc, ___lxstat64, __lxstat64, GLIBC_2_2); ++strong_alias (___lxstat64, __old__lxstat64) ++compat_symbol (libc, __old__lxstat64, __lxstat64, GLIBC_2_1); ++hidden_ver (___lxstat64, __lxstat64) ++#else ++strong_alias (___lxstat64, __lxstat64); ++hidden_def (__lxstat64) ++#endif +Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c 2005-03-22 11:53:10.056702174 -0500 +@@ -0,0 +1 @@ ++/* Empty. */ +Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c 2005-03-22 11:53:10.056702174 -0500 +@@ -0,0 +1 @@ ++/* Empty. */ +Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/semop.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/semop.c 2005-03-22 11:53:10.056702174 -0500 +@@ -0,0 +1,67 @@ ++/* Copyright (C) 1995, 1997, 1998, 1999, 2000, 2005 ++ Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ Contributed by Ulrich Drepper , August 1995. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++struct kernel_sembuf ++{ ++ unsigned short int sem_num; /* semaphore number */ ++ short int sem_op; /* semaphore operation */ ++ short int sem_flg; /* operation flag */ ++ short int __pad1; ++}; ++ ++/* Perform user-defined atomical operation of array of semaphores. */ ++ ++int ++semop (semid, sops, nsops) ++ int semid; ++ struct sembuf *sops; ++ size_t nsops; ++{ ++ struct kernel_sembuf *ksops = alloca (sizeof (sops[0]) * nsops); ++ size_t i; ++ int result; ++ ++ for (i = 0; i < nsops; i++) ++ { ++ ksops[i].sem_num = sops[i].sem_num; ++ ksops[i].sem_op = sops[i].sem_op; ++ ksops[i].sem_flg = sops[i].sem_flg; ++ } ++ ++ result = INLINE_SYSCALL (ipc, 5, IPCOP_semop, ++ semid, (int) nsops, 0, CHECK_N (ksops, nsops)); ++ ++ for (i = 0; i < nsops; i++) ++ { ++ sops[i].sem_num = ksops[i].sem_num; ++ sops[i].sem_op = ksops[i].sem_op; ++ sops[i].sem_flg = ksops[i].sem_flg; ++ } ++ ++ return result; ++} +Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c 2005-03-22 11:53:10.057701931 -0500 +@@ -0,0 +1,69 @@ ++/* Copyright (C) 1995, 1997, 1998, 1999, 2000, 2005 ++ Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ Contributed by Ulrich Drepper , August 1995. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++struct kernel_sembuf ++{ ++ unsigned short int sem_num; /* semaphore number */ ++ short int sem_op; /* semaphore operation */ ++ short int sem_flg; /* operation flag */ ++ short int __pad1; ++}; ++ ++/* Perform user-defined atomical operation of array of semaphores. */ ++ ++int ++semtimedop (semid, sops, nsops, timeout) ++ int semid; ++ struct sembuf *sops; ++ size_t nsops; ++ const struct timespec *timeout; ++{ ++ struct kernel_sembuf *ksops = alloca (sizeof (sops[0]) * nsops); ++ size_t i; ++ int result; ++ ++ for (i = 0; i < nsops; i++) ++ { ++ ksops[i].sem_num = sops[i].sem_num; ++ ksops[i].sem_op = sops[i].sem_op; ++ ksops[i].sem_flg = sops[i].sem_flg; ++ } ++ ++ result = INLINE_SYSCALL (ipc, 6, IPCOP_semtimedop, ++ semid, (int) nsops, 0, CHECK_N (sops, nsops), ++ timeout); ++ ++ for (i = 0; i < nsops; i++) ++ { ++ sops[i].sem_num = ksops[i].sem_num; ++ sops[i].sem_op = ksops[i].sem_op; ++ sops[i].sem_flg = ksops[i].sem_flg; ++ } ++ ++ return result; ++} +Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/statfs64.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/statfs64.c 2005-03-22 11:53:10.057701931 -0500 +@@ -0,0 +1,77 @@ ++/* Return information about the filesystem on which FILE resides. ++ Copyright (C) 1996-2000,2003,2004,2005 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++ ++# if __ASSUME_STATFS64 == 0 ++int __no_statfs64 attribute_hidden; ++#endif ++ ++/* Return information about the filesystem on which FILE resides. */ ++int ++__statfs64 (const char *file, struct statfs64 *buf) ++{ ++#ifdef __NR_statfs64 ++# if __ASSUME_STATFS64 == 0 ++ if (! __no_statfs64) ++# endif ++ { ++ /* The EABI structure is the same as the old ABI structure, except ++ that it has four additional bytes of padding - at the end. We can ++ ignore them. */ ++ int result = INLINE_SYSCALL (statfs64, 3, file, sizeof (*buf) - 4, buf); ++ ++# if __ASSUME_STATFS64 == 0 ++ if (result == 0 || errno != ENOSYS) ++# endif ++ return result; ++ ++# if __ASSUME_STATFS64 == 0 ++ __no_statfs64 = 1; ++# endif ++ } ++#endif ++ ++#if __ASSUME_STATFS64 == 0 ++ struct statfs buf32; ++ ++ if (__statfs (file, &buf32) < 0) ++ return -1; ++ ++ buf->f_type = buf32.f_type; ++ buf->f_bsize = buf32.f_bsize; ++ buf->f_blocks = buf32.f_blocks; ++ buf->f_bfree = buf32.f_bfree; ++ buf->f_bavail = buf32.f_bavail; ++ buf->f_files = buf32.f_files; ++ buf->f_ffree = buf32.f_ffree; ++ buf->f_fsid = buf32.f_fsid; ++ buf->f_namelen = buf32.f_namelen; ++ buf->f_frsize = buf32.f_frsize; ++ memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare)); ++ ++ return 0; ++#endif ++} ++weak_alias (__statfs64, statfs64) +Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/uname.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/uname.c 2005-03-22 11:53:10.057701931 -0500 +@@ -0,0 +1,43 @@ ++/* Copyright (C) 2005 ++ Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++/* The kernel's struct utsname is two bytes larger than a userland struct ++ utsname due to the APCS structure size boundary. */ ++ ++int ++__uname (struct utsname *__name) ++{ ++ char buf[sizeof (struct utsname) + 2]; ++ int result = INLINE_SYSCALL (uname, 1, buf); ++ ++ if (result == 0) ++ memcpy (__name, buf, sizeof (struct utsname)); ++ ++ return result; ++} ++ ++libc_hidden_def (__uname) ++strong_alias (__uname, uname) ++libc_hidden_weak (uname) +Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/xstat64.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/xstat64.c 2005-03-22 11:53:10.058701689 -0500 +@@ -0,0 +1,103 @@ ++/* xstat64 using old-style Unix stat system call. ++ Copyright (C) 1991, 1995-2002, 2003, 2005 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include "kernel-features.h" ++ ++#if __ASSUME_STAT64_SYSCALL == 0 ++# include ++#endif ++ ++#ifdef __NR_stat64 ++# if __ASSUME_STAT64_SYSCALL == 0 ++/* The variable is shared between all wrappers around *stat64 calls. ++ This is the definition. */ ++int __have_no_stat64; ++# endif ++#endif ++ ++/* Get information about the file NAME in BUF. */ ++ ++int ++___xstat64 (int vers, const char *name, struct stat64 *buf) ++{ ++ int result; ++ struct kernel_stat64 kbuf64; ++ ++#if __ASSUME_STAT64_SYSCALL > 0 ++ result = INLINE_SYSCALL (stat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64)); ++ if (result == 0) ++ result = __xstat64_kernel64_conv (vers, &kbuf64, buf); ++# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0 ++ if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino) ++ buf->st_ino = buf->__st_ino; ++# endif ++ return result; ++#else ++ struct kernel_stat kbuf; ++# if defined __NR_stat64 ++ if (! __have_no_stat64) ++ { ++ int saved_errno = errno; ++ result = INLINE_SYSCALL (stat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64)); ++ ++ if (result != -1 || errno != ENOSYS) ++ { ++ if (result == 0) ++ result = __xstat64_kernel64_conv (vers, &kbuf64, buf); ++# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0 ++ if (!result && buf->__st_ino != (__ino_t) buf->st_ino) ++ buf->st_ino = buf->__st_ino; ++# endif ++ return result; ++ } ++ ++ __set_errno (saved_errno); ++ __have_no_stat64 = 1; ++ } ++# endif ++ ++ result = INLINE_SYSCALL (stat, 2, CHECK_STRING (name), __ptrvalue (&kbuf)); ++ if (result == 0) ++ result = __xstat64_conv (vers, &kbuf, buf); ++ ++ return result; ++#endif ++} ++ ++ ++#include ++ ++#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2) ++versioned_symbol (libc, ___xstat64, __xstat64, GLIBC_2_2); ++strong_alias (___xstat64, __old__xstat64) ++compat_symbol (libc, __old__xstat64, __xstat64, GLIBC_2_1); ++hidden_ver (___xstat64, __xstat64) ++#else ++strong_alias (___xstat64, __xstat64) ++hidden_def (__xstat64) ++#endif +Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c 2005-03-22 11:53:10.058701689 -0500 +@@ -0,0 +1,341 @@ ++/* Convert between the kernel's `struct stat' format, and libc's. ++ Copyright (C) 1991,1995-1997,2000,2002,2003 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++ ++#ifdef STAT_IS_KERNEL_STAT ++ ++/* Dummy. */ ++struct kernel_stat; ++ ++#else ++ ++#include ++ ++ ++#if !defined __ASSUME_STAT64_SYSCALL || defined XSTAT_IS_XSTAT64 ++int ++__xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) ++{ ++ switch (vers) ++ { ++ case _STAT_VER_KERNEL: ++ /* Nothing to do. The struct is in the form the kernel expects. ++ We should have short-circuted before we got here, but for ++ completeness... */ ++ *(struct kernel_stat *) ubuf = *kbuf; ++ break; ++ ++ case _STAT_VER_LINUX: ++ { ++ struct stat *buf = ubuf; ++ ++ /* Convert to current kernel version of `struct stat'. */ ++ buf->st_dev = kbuf->st_dev; ++#ifdef _HAVE_STAT___PAD1 ++ buf->__pad1 = 0; ++#endif ++ buf->st_ino = kbuf->st_ino; ++ buf->st_mode = kbuf->st_mode; ++ buf->st_nlink = kbuf->st_nlink; ++ buf->st_uid = kbuf->st_uid; ++ buf->st_gid = kbuf->st_gid; ++ buf->st_rdev = kbuf->st_rdev; ++#ifdef _HAVE_STAT___PAD2 ++ buf->__pad2 = 0; ++#endif ++ buf->st_size = kbuf->st_size; ++ buf->st_blksize = kbuf->st_blksize; ++ buf->st_blocks = kbuf->st_blocks; ++#ifdef _HAVE_STAT_NSEC ++ buf->st_atim.tv_sec = kbuf->st_atim.tv_sec; ++ buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec; ++ buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec; ++ buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec; ++ buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec; ++ buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec; ++#else ++ buf->st_atime = kbuf->st_atime; ++ buf->st_mtime = kbuf->st_mtime; ++ buf->st_ctime = kbuf->st_ctime; ++#endif ++#ifdef _HAVE_STAT___UNUSED1 ++ buf->__unused1 = 0; ++#endif ++#ifdef _HAVE_STAT___UNUSED2 ++ buf->__unused2 = 0; ++#endif ++#ifdef _HAVE_STAT___UNUSED3 ++ buf->__unused3 = 0; ++#endif ++#ifdef _HAVE_STAT___UNUSED4 ++ buf->__unused4 = 0; ++#endif ++#ifdef _HAVE_STAT___UNUSED5 ++ buf->__unused5 = 0; ++#endif ++ } ++ break; ++ ++ default: ++ __set_errno (EINVAL); ++ return -1; ++ } ++ ++ return 0; ++} ++#endif ++ ++int ++__xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf) ++{ ++#ifdef XSTAT_IS_XSTAT64 ++ return __xstat_conv (vers, kbuf, ubuf); ++#else ++ switch (vers) ++ { ++ case _STAT_VER_LINUX: ++ { ++ struct stat64 *buf = ubuf; ++ ++ /* Convert to current kernel version of `struct stat64'. */ ++ buf->st_dev = kbuf->st_dev; ++#ifdef _HAVE_STAT64___PAD1 ++ buf->__pad1 = 0; ++#endif ++ buf->st_ino = kbuf->st_ino; ++#ifdef _HAVE_STAT64___ST_INO ++ buf->__st_ino = kbuf->st_ino; ++#endif ++ buf->st_mode = kbuf->st_mode; ++ buf->st_nlink = kbuf->st_nlink; ++ buf->st_uid = kbuf->st_uid; ++ buf->st_gid = kbuf->st_gid; ++ buf->st_rdev = kbuf->st_rdev; ++#ifdef _HAVE_STAT64___PAD2 ++ buf->__pad2 = 0; ++#endif ++ buf->st_size = kbuf->st_size; ++ buf->st_blksize = kbuf->st_blksize; ++ buf->st_blocks = kbuf->st_blocks; ++#ifdef _HAVE_STAT64_NSEC ++ buf->st_atim.tv_sec = kbuf->st_atim.tv_sec; ++ buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec; ++ buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec; ++ buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec; ++ buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec; ++ buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec; ++#else ++ buf->st_atime = kbuf->st_atime; ++ buf->st_mtime = kbuf->st_mtime; ++ buf->st_ctime = kbuf->st_ctime; ++#endif ++#ifdef _HAVE_STAT64___UNUSED1 ++ buf->__unused1 = 0; ++#endif ++#ifdef _HAVE_STAT64___UNUSED2 ++ buf->__unused2 = 0; ++#endif ++#ifdef _HAVE_STAT64___UNUSED3 ++ buf->__unused3 = 0; ++#endif ++#ifdef _HAVE_STAT64___UNUSED4 ++ buf->__unused4 = 0; ++#endif ++#ifdef _HAVE_STAT64___UNUSED5 ++ buf->__unused5 = 0; ++#endif ++ } ++ break; ++ ++ /* If struct stat64 is different from struct stat then ++ _STAT_VER_KERNEL does not make sense. */ ++ case _STAT_VER_KERNEL: ++ default: ++ __set_errno (EINVAL); ++ return -1; ++ } ++ ++ return 0; ++#endif ++} ++ ++int ++__xstat32_conv (int vers, void *kbuf_, struct stat *buf) ++{ ++ struct kernel_stat64 *kbuf = kbuf_; ++ ++ switch (vers) ++ { ++ case _STAT_VER_LINUX: ++ { ++ /* Convert current kernel version of `struct stat64' to ++ `struct stat'. */ ++ buf->st_dev = kbuf->st_dev; ++#ifdef _HAVE_STAT___PAD1 ++ buf->__pad1 = 0; ++#endif ++#ifdef _HAVE_STAT64___ST_INO ++# if __ASSUME_ST_INO_64_BIT == 0 ++ if (kbuf->st_ino == 0) ++ buf->st_ino = kbuf->__st_ino; ++ else ++# endif ++ { ++ buf->st_ino = kbuf->st_ino; ++ if (sizeof (buf->st_ino) != sizeof (kbuf->st_ino) ++ && buf->st_ino != kbuf->st_ino) ++ { ++ __set_errno (EOVERFLOW); ++ return -1; ++ } ++ } ++#else ++ buf->st_ino = kbuf->st_ino; ++ if (sizeof (buf->st_ino) != sizeof (kbuf->st_ino) ++ && buf->st_ino != kbuf->st_ino) ++ { ++ __set_errno (EOVERFLOW); ++ return -1; ++ } ++#endif ++ buf->st_mode = kbuf->st_mode; ++ buf->st_nlink = kbuf->st_nlink; ++ buf->st_uid = kbuf->st_uid; ++ buf->st_gid = kbuf->st_gid; ++ buf->st_rdev = kbuf->st_rdev; ++#ifdef _HAVE_STAT___PAD2 ++ buf->__pad2 = 0; ++#endif ++ buf->st_size = kbuf->st_size; ++ /* Check for overflow. */ ++ if (sizeof (buf->st_size) != sizeof (kbuf->st_size) ++ && buf->st_size != kbuf->st_size) ++ { ++ __set_errno (EOVERFLOW); ++ return -1; ++ } ++ buf->st_blksize = kbuf->st_blksize; ++ buf->st_blocks = kbuf->st_blocks; ++ /* Check for overflow. */ ++ if (sizeof (buf->st_blocks) != sizeof (kbuf->st_blocks) ++ && buf->st_blocks != kbuf->st_blocks) ++ { ++ __set_errno (EOVERFLOW); ++ return -1; ++ } ++#ifdef _HAVE_STAT_NSEC ++ buf->st_atim.tv_sec = kbuf->st_atim.tv_sec; ++ buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec; ++ buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec; ++ buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec; ++ buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec; ++ buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec; ++#else ++ buf->st_atime = kbuf->st_atime; ++ buf->st_mtime = kbuf->st_mtime; ++ buf->st_ctime = kbuf->st_ctime; ++#endif ++ ++#ifdef _HAVE_STAT___UNUSED1 ++ buf->__unused1 = 0; ++#endif ++#ifdef _HAVE_STAT___UNUSED2 ++ buf->__unused2 = 0; ++#endif ++#ifdef _HAVE_STAT___UNUSED3 ++ buf->__unused3 = 0; ++#endif ++#ifdef _HAVE_STAT___UNUSED4 ++ buf->__unused4 = 0; ++#endif ++#ifdef _HAVE_STAT___UNUSED5 ++ buf->__unused5 = 0; ++#endif ++ } ++ break; ++ ++ /* If struct stat64 is different from struct stat then ++ _STAT_VER_KERNEL does not make sense. */ ++ case _STAT_VER_KERNEL: ++ default: ++ __set_errno (EINVAL); ++ return -1; ++ } ++ ++ return 0; ++} ++ ++int ++__xstat64_kernel64_conv (int vers, void *kbuf_, struct stat64 *buf) ++{ ++ struct kernel_stat64 *kbuf = kbuf_; ++ ++ switch (vers) ++ { ++ case _STAT_VER_LINUX: ++ { ++ /* Convert current kernel version of `struct stat64' to ++ user version of `struct stat64'. */ ++ buf->st_dev = kbuf->st_dev; ++#ifdef _HAVE_STAT64___PAD1 ++ buf->__pad1 = kbuf->__pad1; ++#endif ++#ifdef _HAVE_STAT64___ST_INO ++ buf->__st_ino = kbuf->__st_ino; ++#endif ++ buf->st_mode = kbuf->st_mode; ++ buf->st_nlink = kbuf->st_nlink; ++ buf->st_uid = kbuf->st_uid; ++ buf->st_gid = kbuf->st_gid; ++ buf->st_rdev = kbuf->st_rdev; ++#ifdef _HAVE_STAT64___PAD2 ++ buf->__pad2 = kbuf->__pad2; ++#endif ++ buf->st_size = kbuf->st_size; ++ buf->st_blksize = kbuf->st_blksize; ++ buf->st_blocks = kbuf->st_blocks; ++#ifdef _HAVE_STAT64_NSEC ++ buf->st_atim.tv_sec = kbuf->st_atim.tv_sec; ++ buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec; ++ buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec; ++ buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec; ++ buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec; ++ buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec; ++#else ++ buf->st_atime = kbuf->st_atime; ++ buf->st_mtime = kbuf->st_mtime; ++ buf->st_ctime = kbuf->st_ctime; ++#endif ++ buf->st_ino = kbuf->st_ino; ++ } ++ break; ++ ++ case _STAT_VER_KERNEL: ++ default: ++ __set_errno (EINVAL); ++ return -1; ++ } ++ ++ return 0; ++} ++ ++#endif +Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h 2005-03-22 11:53:10.058701689 -0500 +@@ -0,0 +1,28 @@ ++/* Convert between the kernel's `struct stat' format, and libc's. ++ Copyright (C) 1991,1995-1997,2000,2002,2003 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include "kernel-features.h" ++ ++#ifndef STAT_IS_KERNEL_STAT ++extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf); ++extern int __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf); ++#endif ++extern int __xstat32_conv (int vers, void *kbuf, struct stat *buf); ++extern int __xstat64_kernel64_conv (int vers, struct kernel_stat64 *kbuf, ++ struct stat64 *buf); +Index: glibc/sysdeps/arm/eabi/fpu/fraiseexcpt.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/fpu/fraiseexcpt.c 2005-03-22 12:34:55.522464918 -0500 +@@ -0,0 +1,67 @@ ++/* Raise given exceptions. ++ Copyright (C) 2004 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++ ++int ++feraiseexcept (int excepts) ++{ ++ float dummy; ++ int fpscr; ++ ++ /* Raise exceptions represented by EXPECTS. But we must raise only ++ one signal at a time. It is important that if the overflow/underflow ++ exception and the inexact exception are given at the same time, ++ the overflow/underflow exception follows the inexact exception. After ++ each exception we read from the fpscr, to force the exception to be ++ raised immediately. */ ++ ++ /* First: invalid exception. */ ++ if (FE_INVALID & excepts) ++ __asm__ __volatile__ ("fdivs %0,%2,%3\n\tfmrx %1, fpscr" ++ : "=w" (dummy), "=r" (fpscr) : "w" (0.0f), "w" (0.0f) ); ++ ++ /* Next: division by zero. */ ++ if (FE_DIVBYZERO & excepts) ++ __asm__ __volatile__ ("fdivs %0,%2,%3\n\tfmrx %1, fpscr" ++ : "=w" (dummy), "=r" (fpscr) : "w" (1.0f), "w" (0.0f) ); ++ ++ /* Next: overflow. */ ++ if (FE_OVERFLOW & excepts) ++ /* There's no way to raise overflow without also raising inexact. */ ++ __asm__ __volatile__ ("fadds %0,%2,%3\n\tfmrx %1, fpscr" ++ : "=w" (dummy), "=r" (fpscr) : "w" (FLT_MAX), "w" (1.0e32f) ); ++ ++ /* Next: underflow. */ ++ if (FE_UNDERFLOW & excepts) ++ __asm__ __volatile__ ("fdivs %0,%2,%3\n\tfmrx %1, fpscr" ++ : "=w" (dummy), "=r" (fpscr) : "w" (FLT_MIN), "w" (3.0f) ); ++ ++ /* Last: inexact. */ ++ if (FE_INEXACT & excepts) ++ __asm__ __volatile__ ("fdivs %0,%2,%3\n\tfmrx %1, fpscr" ++ : "=w" (dummy), "=r" (fpscr) : "w" (2.0f), "w" (3.0f) ); ++ ++ /* Success. */ ++ return 0; ++} ++ ++libm_hidden_def (feraiseexcept) +Index: glibc/sysdeps/arm/eabi/fpu/feholdexcpt.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/eabi/fpu/feholdexcpt.c 2005-03-22 12:34:55.521465156 -0500 +@@ -0,0 +1,41 @@ ++/* Store current floating-point environment and clear exceptions. ++ Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++ ++int ++feholdexcept (fenv_t *envp) ++{ ++ unsigned long int temp; ++ ++ /* Store the environment. */ ++ _FPU_GETCW(temp); ++ envp->__cw = temp; ++ ++ /* Now set all exceptions to non-stop. */ ++ temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT); ++ ++ /* And clear all exception flags. */ ++ temp &= ~FE_ALL_EXCEPT; ++ ++ _FPU_SETCW(temp); ++ ++ return 0; ++} + diff --git a/openembedded/packages/glibc/glibc-cvs/eabi-patch-3 b/openembedded/packages/glibc/glibc-cvs/eabi-patch-3 new file mode 100644 index 0000000000..9bd549ec2b --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs/eabi-patch-3 @@ -0,0 +1,430 @@ +From libc-alpha-return-17228-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com Tue Mar 22 16:08:31 2005 +Return-Path: +Delivered-To: listarch-libc-alpha at sources dot redhat dot com +Received: (qmail 20972 invoked by alias); 22 Mar 2005 16:08:29 -0000 +Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm +Precedence: bulk +List-Subscribe: +List-Archive: +List-Post: +List-Help: , +Sender: libc-alpha-owner at sources dot redhat dot com +Delivered-To: mailing list libc-alpha at sources dot redhat dot com +Received: (qmail 20165 invoked from network); 22 Mar 2005 16:08:06 -0000 +Received: from unknown (HELO nevyn.them.org) (66.93.172.17) + by sourceware dot org with SMTP; 22 Mar 2005 16:08:06 -0000 +Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian)) + id 1DDlvX-0006tE-Bh; Tue, 22 Mar 2005 11:08:19 -0500 +Date: Tue, 22 Mar 2005 11:08:19 -0500 +From: Daniel Jacobowitz +To: libc-alpha at sources dot redhat dot com +Cc: Phil Blundell +Subject: ARM EABI support - changes to existing ARM code +Message-ID: <20050322160819.GA26216@nevyn.them.org> +Mail-Followup-To: libc-alpha at sources dot redhat dot com, + Phil Blundell +Mime-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +User-Agent: Mutt/1.5.6+20040907i + +This patch updates the common ARM files for EABI support. The changes are: + - Old ARM ABI targets always use FPA (mixed-endian) byte ordering. EABI + targets always use VFP byte ordering for doubles, which is standard + ieee754 layout. Removing the arm-specific ieee754.h doesn't break FPA; + it was a specialized version of the common header, which handles FPA + but also handles VFP. + - The stack needs to be aligned to eight bytes instead of just four, + including in mmap2 and when shifting _dl_argv. + - We need some markers around _start to indicate end-of-stack for the + unwinder - ARM EABI does not use either SJLJ exceptions or DWARF-2 + exceptions. It uses a table based format which seems to be not + quite completely unlike DWARF-2. + +Do these changes look OK? + +-- +Daniel Jacobowitz +CodeSourcery, LLC + +2005-03-22 Daniel Jacobowitz + + * sysdeps/arm/bits/endian.h (__FLOAT_WORD_ORDER): Handle VFP. + * sysdeps/arm/gmp-mparam.h (IEEE_DOUBLE_BIG_ENDIAN, + IEEE_DOUBLE_MIXED_ENDIAN): Handle big-endian and VFP. + * sysdeps/arm/ieee754.h: Remove. + + * sysdeps/arm/dl-machine.h (_dl_start_user): Align the stack to eight + bytes even when shifting arguments. + * sysdeps/arm/dl-sysdep.h: New file. + + * sysdeps/arm/elf/start.S (_start): If not using SJLJ exceptions, include + EABI unwind markers to terminate unwinding. + + * sysdeps/unix/sysv/linux/arm/mmap64.S: Handle big-endian byte ordering + and EABI stack layout. + +Index: glibc/sysdeps/arm/bits/endian.h +=================================================================== +--- glibc.orig/sysdeps/arm/bits/endian.h 2005-03-22 10:26:27.092978200 -0500 ++++ glibc/sysdeps/arm/bits/endian.h 2005-03-22 10:27:39.457490903 -0500 +@@ -9,4 +9,9 @@ + #else + #define __BYTE_ORDER __LITTLE_ENDIAN + #endif ++ ++#ifdef __VFP_FP__ ++#define __FLOAT_WORD_ORDER __BYTE_ORDER ++#else + #define __FLOAT_WORD_ORDER __BIG_ENDIAN ++#endif +Index: glibc/sysdeps/arm/dl-machine.h +=================================================================== +--- glibc.orig/sysdeps/arm/dl-machine.h 2005-03-22 10:26:27.092978200 -0500 ++++ glibc/sysdeps/arm/dl-machine.h 2005-03-22 10:27:39.457490903 -0500 +@@ -156,22 +156,19 @@ _dl_start_user:\n\ + add sl, pc, sl\n\ + .L_GOT_GOT:\n\ + ldr r4, [sl, r4]\n\ +- @ get the original arg count\n\ +- ldr r1, [sp]\n\ + @ save the entry point in another register\n\ + mov r6, r0\n\ +- @ adjust the stack pointer to skip the extra args\n\ +- add sp, sp, r4, lsl #2\n\ +- @ subtract _dl_skip_args from original arg count\n\ +- sub r1, r1, r4\n\ ++ @ get the original arg count\n\ ++ ldr r1, [sp]\n\ + @ get the argv address\n\ + add r2, sp, #4\n\ +- @ store the new argc in the new stack location\n\ +- str r1, [sp]\n\ ++ @ Fix up the stack if necessary.\n\ ++ cmp r4, #0\n\ ++ bne .L_fixup_stack\n\ ++.L_done_fixup:\n\ + @ compute envp\n\ + add r3, r2, r1, lsl #2\n\ + add r3, r3, #4\n\ +-\n\ + @ now we call _dl_init\n\ + ldr r0, .L_LOADED\n\ + ldr r0, [sl, r0]\n\ +@@ -182,12 +179,45 @@ _dl_start_user:\n\ + add r0, sl, r0\n\ + @ jump to the user_s entry point\n\ + " BX(r6) "\n\ ++\n\ ++ @ iWMMXt and EABI targets require the stack to be eight byte\n\ ++ @ aligned - shuffle arguments etc.\n\ ++.L_fixup_stack:\n\ ++ @ subtract _dl_skip_args from original arg count\n\ ++ sub r1, r1, r4\n\ ++ @ store the new argc in the new stack location\n\ ++ str r1, [sp]\n\ ++ @ find the first unskipped argument\n\ ++ mov r3, r2\n\ ++ add r4, r2, r4, lsl #2\n\ ++ @ shuffle argv down\n\ ++1: ldr r5, [r4], #4\n\ ++ str r5, [r3], #4\n\ ++ cmp r5, #0\n\ ++ bne 1b\n\ ++ @ shuffle envp down\n\ ++1: ldr r5, [r4], #4\n\ ++ str r5, [r3], #4\n\ ++ cmp r5, #0\n\ ++ bne 1b\n\ ++ @ shuffle auxv down\n\ ++1: ldmia r4!, {r0, r5}\n\ ++ stmia r3!, {r0, r5}\n\ ++ cmp r0, #0\n\ ++ bne 1b\n\ ++ @ Update _dl_argv\n\ ++ ldr r3, .L_ARGV\n\ ++ str r2, [sl, r3]\n\ ++ b .L_done_fixup\n\ ++\n\ + .L_GET_GOT:\n\ + .word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4\n\ + .L_SKIP_ARGS:\n\ + .word _dl_skip_args(GOTOFF)\n\ + .L_FINI_PROC:\n\ + .word _dl_fini(GOTOFF)\n\ ++.L_ARGV:\n\ ++ .word _dl_argv(GOTOFF)\n\ + .L_LOADED:\n\ + .word _rtld_local(GOTOFF)\n\ + .previous\n\ +Index: glibc/sysdeps/arm/dl-sysdep.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ glibc/sysdeps/arm/dl-sysdep.h 2005-03-22 10:27:39.458490675 -0500 +@@ -0,0 +1,41 @@ ++/* System-specific settings for dynamic linker code. ARM version. ++ Copyright (C) 2004, 2005 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#ifndef _DL_SYSDEP_H ++#define _DL_SYSDEP_H 1 ++ ++/* This macro must be defined to either 0 or 1. ++ ++ If 1, then an errno global variable hidden in ld.so will work right with ++ all the errno-using libc code compiled for ld.so, and there is never a ++ need to share the errno location with libc. This is appropriate only if ++ all the libc functions that ld.so uses are called without PLT and always ++ get the versions linked into ld.so rather than the libc ones. */ ++ ++#ifdef IS_IN_rtld ++# define RTLD_PRIVATE_ERRNO 1 ++#else ++# define RTLD_PRIVATE_ERRNO 0 ++#endif ++ ++/* _dl_argv cannot be attribute_relro, because _dl_start_user ++ might write into it after _dl_start returns. */ ++#define DL_ARGV_NOT_RELRO 1 ++ ++#endif /* dl-sysdep.h */ +Index: glibc/sysdeps/arm/elf/start.S +=================================================================== +--- glibc.orig/sysdeps/arm/elf/start.S 2005-03-22 10:26:27.096977288 -0500 ++++ glibc/sysdeps/arm/elf/start.S 2005-03-22 11:00:35.178522707 -0500 +@@ -1,5 +1,6 @@ + /* Startup code for ARM & ELF +- Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002 Free Software Foundation, Inc. ++ Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002, 2005 ++ Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -62,6 +63,10 @@ + .globl _start + .type _start,#function + _start: ++#if !defined(__USING_SJLJ_EXCEPTIONS__) ++ /* Protect against unhandled exceptions. */ ++ .fnstart ++#endif + /* Fetch address of fini */ + ldr ip, =__libc_csu_fini + +@@ -93,6 +98,11 @@ _start: + /* should never get here....*/ + bl abort + ++#if !defined(__USING_SJLJ_EXCEPTIONS__) ++ .cantunwind ++ .fnend ++#endif ++ + /* Define a symbol for the first piece of initialized data. */ + .data + .globl __data_start +Index: glibc/sysdeps/arm/gmp-mparam.h +=================================================================== +--- glibc.orig/sysdeps/arm/gmp-mparam.h 2005-03-22 10:26:27.092978200 -0500 ++++ glibc/sysdeps/arm/gmp-mparam.h 2005-03-22 11:00:42.795683773 -0500 +@@ -1,6 +1,6 @@ + /* gmp-mparam.h -- Compiler/machine parameter header file. + +-Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc. ++Copyright (C) 1991, 1993, 1994, 1995, 2005 Free Software Foundation, Inc. + + This file is part of the GNU MP Library. + +@@ -26,5 +26,13 @@ MA 02111-1307, USA. */ + #define BITS_PER_SHORTINT 16 + #define BITS_PER_CHAR 8 + +-#define IEEE_DOUBLE_BIG_ENDIAN 0 +-#define IEEE_DOUBLE_MIXED_ENDIAN 1 ++#if defined(__ARMEB__) ++# define IEEE_DOUBLE_MIXED_ENDIAN 0 ++# define IEEE_DOUBLE_BIG_ENDIAN 1 ++#elif defined(__VFP_FP__) ++# define IEEE_DOUBLE_MIXED_ENDIAN 0 ++# define IEEE_DOUBLE_BIG_ENDIAN 0 ++#else ++# define IEEE_DOUBLE_BIG_ENDIAN 0 ++# define IEEE_DOUBLE_MIXED_ENDIAN 1 ++#endif +Index: glibc/sysdeps/arm/ieee754.h +=================================================================== +--- glibc.orig/sysdeps/arm/ieee754.h 2005-03-22 10:26:27.092978200 -0500 ++++ /dev/null 1970-01-01 00:00:00.000000000 +0000 +@@ -1,115 +0,0 @@ +-/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#ifndef _IEEE754_H +- +-#define _IEEE754_H 1 +-#include +- +-#include +- +-__BEGIN_DECLS +- +-union ieee754_float +- { +- float f; +- +- /* This is the IEEE 754 single-precision format. */ +- struct +- { +- unsigned int mantissa:23; +- unsigned int exponent:8; +- unsigned int negative:1; +- } ieee; +- +- /* This format makes it easier to see if a NaN is a signalling NaN. */ +- struct +- { +- unsigned int mantissa:22; +- unsigned int quiet_nan:1; +- unsigned int exponent:8; +- unsigned int negative:1; +- } ieee_nan; +- }; +- +-#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */ +- +- +-union ieee754_double +- { +- double d; +- +- /* This is the IEEE 754 double-precision format. */ +- struct +- { +- unsigned int mantissa0:20; +- unsigned int exponent:11; +- unsigned int negative:1; +- unsigned int mantissa1:32; +- } ieee; +- +- /* This format makes it easier to see if a NaN is a signalling NaN. */ +- struct +- { +- unsigned int mantissa0:19; +- unsigned int quiet_nan:1; +- unsigned int exponent:11; +- unsigned int negative:1; +- unsigned int mantissa1:32; +- } ieee_nan; +- }; +- +-#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ +- +- +-/* The following two structures are correct for `new' floating point systems but +- wrong for the old FPPC. The only solution seems to be to avoid their use on +- old hardware. */ +- +-union ieee854_long_double +- { +- long double d; +- +- /* This is the IEEE 854 double-extended-precision format. */ +- struct +- { +- unsigned int exponent:15; +- unsigned int empty:16; +- unsigned int negative:1; +- unsigned int mantissa1:32; +- unsigned int mantissa0:32; +- } ieee; +- +- /* This is for NaNs in the IEEE 854 double-extended-precision format. */ +- struct +- { +- unsigned int exponent:15; +- unsigned int empty:16; +- unsigned int negative:1; +- unsigned int mantissa1:32; +- unsigned int mantissa0:30; +- unsigned int quiet_nan:1; +- unsigned int one:1; +- } ieee_nan; +- }; +- +-#define IEEE854_LONG_DOUBLE_BIAS 0x3fff +- +-__END_DECLS +- +-#endif /* ieee754.h */ +Index: glibc/sysdeps/unix/sysv/linux/arm/mmap64.S +=================================================================== +--- glibc.orig/sysdeps/unix/sysv/linux/arm/mmap64.S 2005-03-22 10:26:27.097977060 -0500 ++++ glibc/sysdeps/unix/sysv/linux/arm/mmap64.S 2005-03-22 11:00:53.051209928 -0500 +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. ++/* Copyright (C) 2000, 2003, 2005 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -23,13 +23,28 @@ + + #include "kernel-features.h" + ++#ifdef __ARM_EABI__ ++# define INITIAL_OFFSET 8 ++#else ++# define INITIAL_OFFSET 4 ++#endif ++ ++#ifdef __ARMEB__ ++# define LOW_OFFSET INITIAL_OFFSET + 4 ++/* The initial + 4 is for the stack postdecrement. */ ++# define HIGH_OFFSET 4 + INITIAL_OFFSET + 0 ++#else ++# define LOW_OFFSET INITIAL_OFFSET + 0 ++# define HIGH_OFFSET 4 + INITIAL_OFFSET + 4 ++#endif ++ + /* The mmap2 system call takes six arguments, all in registers. */ + .text + ENTRY (__mmap64) + #ifdef __NR_mmap2 +- ldr ip, [sp, $4] @ offset low part ++ ldr ip, [sp, $LOW_OFFSET] @ offset low part + str r5, [sp, #-4]! +- ldr r5, [sp, $12] @ offset high part ++ ldr r5, [sp, $HIGH_OFFSET] @ offset high part + str r4, [sp, #-4]! + movs r4, ip, lsl $20 @ check that offset is page-aligned + mov ip, ip, lsr $12 + diff --git a/openembedded/packages/glibc/glibc-cvs/eabi-patch-4 b/openembedded/packages/glibc/glibc-cvs/eabi-patch-4 new file mode 100644 index 0000000000..45166ef960 --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs/eabi-patch-4 @@ -0,0 +1,64 @@ +From libc-alpha-return-17230-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com Tue Mar 22 16:25:01 2005 +Return-Path: +Delivered-To: listarch-libc-alpha at sources dot redhat dot com +Received: (qmail 7764 invoked by alias); 22 Mar 2005 16:24:20 -0000 +Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm +Precedence: bulk +List-Subscribe: +List-Archive: +List-Post: +List-Help: , +Sender: libc-alpha-owner at sources dot redhat dot com +Delivered-To: mailing list libc-alpha at sources dot redhat dot com +Received: (qmail 7316 invoked from network); 22 Mar 2005 16:23:45 -0000 +Received: from unknown (HELO nevyn.them.org) (66.93.172.17) + by sourceware dot org with SMTP; 22 Mar 2005 16:23:45 -0000 +Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian)) + id 1DDmAg-000798-P7 + for ; Tue, 22 Mar 2005 11:23:58 -0500 +Date: Tue, 22 Mar 2005 11:23:58 -0500 +From: Daniel Jacobowitz +To: libc-alpha at sources dot redhat dot com +Subject: Re: Define PT_ARM_EXIDX +Message-ID: <20050322162358.GA27424@nevyn.them.org> +Mail-Followup-To: libc-alpha at sources dot redhat dot com +References: <20050322155140.GA25312@nevyn.them.org> +Mime-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <20050322155140 dot GA25312 at nevyn dot them dot org> +User-Agent: Mutt/1.5.6+20040907i + +On Tue, Mar 22, 2005 at 10:51:40AM -0500, Daniel Jacobowitz wrote: +> The ARM EABI uses a program header to locate exception tables for shared +> objects, just like PT_GNU_EH_FRAME. But the format is a little different, +> and the header is above PT_LOPROC because it was assigned by a processor +> vendor. This just adds the constant to elf/elf.h. + +Oops, Ulrich pointed out that I put the constant in the wrong place. + +-- +Daniel Jacobowitz +CodeSourcery, LLC + +2005-03-22 Daniel Jacobowitz + + * elf/elf.h (PT_ARM_EXIDX): Define. + +Index: glibc/elf/elf.h +=================================================================== +--- glibc.orig/elf/elf.h 2005-03-22 11:21:34.961464117 -0500 ++++ glibc/elf/elf.h 2005-03-22 11:22:49.872172922 -0500 +@@ -2138,7 +2138,11 @@ typedef Elf32_Addr Elf32_Conflict; + #define PF_ARM_SB 0x10000000 /* Segment contains the location + addressed by the static base */ + ++/* Processor specific values for the Phdr p_type field. */ ++#define PT_ARM_EXIDX 0x70000001 /* .ARM.exidx segment */ ++ + /* ARM relocs. */ ++ + #define R_ARM_NONE 0 /* No reloc */ + #define R_ARM_PC24 1 /* PC relative 26 bit branch */ + #define R_ARM_ABS32 2 /* Direct 32 bit */ + diff --git a/openembedded/packages/glibc/glibc-cvs/etc/ld.so.conf b/openembedded/packages/glibc/glibc-cvs/etc/ld.so.conf new file mode 100644 index 0000000000..3f9b41aabb --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs/etc/ld.so.conf @@ -0,0 +1,3 @@ +/usr/local/lib +/opt/QtPalmtop/lib + diff --git a/openembedded/packages/glibc/glibc-cvs/glibc-fp-byteorder.patch b/openembedded/packages/glibc/glibc-cvs/glibc-fp-byteorder.patch new file mode 100644 index 0000000000..f20432ea8b --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs/glibc-fp-byteorder.patch @@ -0,0 +1,203 @@ +Taken from http://sources.redhat.com/ml/crossgcc/2004-02/msg00104.html +Author: addsub@eyou.com +Target: ARM + +Fixes http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/920501-8.c +and makes printf("%f", 1.0) work. + +Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00115.html : + It ... fixes the 'printf("%f\n", 0.5); prints 0.000000' and general 'floating point + is broken' on my big-endian hardfloat FPA ARM platform. ... + It's definitely needed for hardfloat. So I'd think it's needed for + big-endian systems in any case, and for VFP on little-endian systems + too. Someone would have to verify that though. + +Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00123.html + I just had a look at glibc-20040830, and [this patch] is still needed and useful + for this version. glibc-20040830 out-of-the-box still contains the + following wrong assumptions: + - sysdeps/arm/bits/endian.h: float word order is big endian (which it is + not on vfp systems) + - sysdeps/arm/gmp-mparam.h: IEEE doubles are mixed endian (which they + are not on big endian systems, neither on vfp systems) + - sysdeps/arm/ieee754.h: IEEE doubles are in little endian byte order + (which they are not on big endian systems) + [This patch] seems the right solution for all of these issues. + +Dimitry Andric wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00132.html : + It's even needed for glibc CVS, AFAICS. + The patch hunk which modifies glibc.new/sysdeps/arm/bits/endian.h + (currently at version 1.4) is only needed for proper VFP operation. + But the hunk which modifies sysdeps/arm/gmp-mparam.h, and the hunk + that deletes sysdeps/arm/ieee754.h (yes, this IS correct), are needed + for proper operation of *any* FP model on big endian ARM. + +See also discussion in followups to +http://sources.redhat.com/ml/crossgcc/2004-05/msg00245.html) + +Message-ID: <276985760.37584@eyou.com> +Received: from unknown (HELO eyou.com) (172.16.2.2) + by 0.0.0.0 with SMTP; Tue, 17 Feb 2004 10:42:40 +0800 +Received: (qmail 8238 invoked by uid 65534); 17 Feb 2004 10:42:38 +0800 +Date: 17 Feb 2004 10:42:38 +0800 +Message-ID: <20040217104238.8237.qmail@eyou.com> +From: "add" +To: dank@kegel.com +Reply-To: "add" +Subject: Re:   problem while building arm vfp softfloat gcc ` + +Hi, Dan, This is a patch I applied to my glibc-2.3.2, then my softfloat +toolchain can printf("%f\n",1.0). So you may have a try of this + + +diff -uNrp glibc.old/sysdeps/arm/bits/endian.h glibc.new/sysdeps/arm/bits/endian.h +--- glibc.old/sysdeps/arm/bits/endian.h 1999-04-12 11:59:13.000000000 -0400 ++++ glibc.new/sysdeps/arm/bits/endian.h 2004-02-12 09:15:13.000000000 -0500 +@@ -9,4 +9,9 @@ + #else + #define __BYTE_ORDER __LITTLE_ENDIAN + #endif ++ ++#ifdef __VFP_FP__ ++#define __FLOAT_WORD_ORDER __BYTE_ORDER ++#else + #define __FLOAT_WORD_ORDER __BIG_ENDIAN ++#endif +diff -uNrp glibc.old/sysdeps/arm/gmp-mparam.h glibc.new/sysdeps/arm/gmp-mparam.h +--- glibc.old/sysdeps/arm/gmp-mparam.h 2001-07-07 15:21:19.000000000 -0400 ++++ glibc.new/sysdeps/arm/gmp-mparam.h 2004-02-12 09:15:13.000000000 -0500 +@@ -26,5 +26,13 @@ MA 02111-1307, USA. */ + #define BITS_PER_SHORTINT 16 + #define BITS_PER_CHAR 8 + +-#define IEEE_DOUBLE_BIG_ENDIAN 0 +-#define IEEE_DOUBLE_MIXED_ENDIAN 1 ++#if defined(__ARMEB__) ++# define IEEE_DOUBLE_MIXED_ENDIAN 0 ++# define IEEE_DOUBLE_BIG_ENDIAN 1 ++#elif defined(__VFP_FP__) ++# define IEEE_DOUBLE_MIXED_ENDIAN 0 ++# define IEEE_DOUBLE_BIG_ENDIAN 0 ++#else ++# define IEEE_DOUBLE_BIG_ENDIAN 0 ++# define IEEE_DOUBLE_MIXED_ENDIAN 1 ++#endif +diff -uNrp glibc.old/sysdeps/arm/ieee754.h glibc.new/sysdeps/arm/ieee754.h +--- glibc.old/sysdeps/arm/ieee754.h 2001-07-07 15:21:19.000000000 -0400 ++++ glibc.new/sysdeps/arm/ieee754.h 1969-12-31 19:00:00.000000000 -0500 +@@ -1,115 +0,0 @@ +-/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#ifndef _IEEE754_H +- +-#define _IEEE754_H 1 +-#include +- +-#include +- +-__BEGIN_DECLS +- +-union ieee754_float +- { +- float f; +- +- /* This is the IEEE 754 single-precision format. */ +- struct +- { +- unsigned int mantissa:23; +- unsigned int exponent:8; +- unsigned int negative:1; +- } ieee; +- +- /* This format makes it easier to see if a NaN is a signalling NaN. */ +- struct +- { +- unsigned int mantissa:22; +- unsigned int quiet_nan:1; +- unsigned int exponent:8; +- unsigned int negative:1; +- } ieee_nan; +- }; +- +-#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */ +- +- +-union ieee754_double +- { +- double d; +- +- /* This is the IEEE 754 double-precision format. */ +- struct +- { +- unsigned int mantissa0:20; +- unsigned int exponent:11; +- unsigned int negative:1; +- unsigned int mantissa1:32; +- } ieee; +- +- /* This format makes it easier to see if a NaN is a signalling NaN. */ +- struct +- { +- unsigned int mantissa0:19; +- unsigned int quiet_nan:1; +- unsigned int exponent:11; +- unsigned int negative:1; +- unsigned int mantissa1:32; +- } ieee_nan; +- }; +- +-#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ +- +- +-/* The following two structures are correct for `new' floating point systems but +- wrong for the old FPPC. The only solution seems to be to avoid their use on +- old hardware. */ +- +-union ieee854_long_double +- { +- long double d; +- +- /* This is the IEEE 854 double-extended-precision format. */ +- struct +- { +- unsigned int exponent:15; +- unsigned int empty:16; +- unsigned int negative:1; +- unsigned int mantissa1:32; +- unsigned int mantissa0:32; +- } ieee; +- +- /* This is for NaNs in the IEEE 854 double-extended-precision format. */ +- struct +- { +- unsigned int exponent:15; +- unsigned int empty:16; +- unsigned int negative:1; +- unsigned int mantissa1:32; +- unsigned int mantissa0:30; +- unsigned int quiet_nan:1; +- unsigned int one:1; +- } ieee_nan; +- }; +- +-#define IEEE854_LONG_DOUBLE_BIAS 0x3fff +- +-__END_DECLS +- +-#endif /* ieee754.h */ diff --git a/openembedded/packages/glibc/glibc-cvs/ldconfig.patch b/openembedded/packages/glibc/glibc-cvs/ldconfig.patch new file mode 100644 index 0000000000..c60b9b1432 --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs/ldconfig.patch @@ -0,0 +1,37 @@ +--- elf/ldconfig.c 2003-07-08 23:26:27.000000000 +0900 ++++ elf/ldconfig.c.debian 2003-07-08 23:29:43.000000000 +0900 +@@ -920,26 +920,24 @@ + { + FILE *file = NULL; + char *line = NULL; +- const char *canon; ++ const char *canon = filename; + size_t len = 0; ++ int file_fd; + + if (opt_chroot) + { + canon = chroot_canon (opt_chroot, filename); +- if (canon) +- file = fopen (canon, "r"); +- else ++ if (!canon) + canon = filename; + } +- else +- { +- canon = filename; +- file = fopen (filename, "r"); +- } ++ ++ if ((file_fd = open(canon, O_RDONLY | O_EXCL, 0022)) != -1) ++ file = fdopen (file_fd, "r"); + + if (file == NULL) + { +- error (0, errno, _("Can't open configuration file %s"), canon); ++ if (opt_verbose) ++ error (0, errno, _("Can't open configuration file %s"), canon); + if (canon != filename) + free ((char *) canon); + return; diff --git a/openembedded/packages/glibc/glibc-cvs/ldd.patch b/openembedded/packages/glibc/glibc-cvs/ldd.patch new file mode 100644 index 0000000000..01719dbe08 --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs/ldd.patch @@ -0,0 +1,38 @@ +--- elf/ldd.bash.in~ Tue Apr 3 21:43:31 2001 ++++ elf/ldd.bash.in Tue Apr 3 21:54:15 2001 +@@ -32,6 +32,7 @@ + warn= + bind_now= + verbose= ++filename_magic_regex="((^|/)lib|.so$)" + + while test $# -gt 0; do + case "$1" in +@@ -123,8 +124,11 @@ + echo "ldd: ${file}:" $"No such file or directory" >&2 + result=1 + elif test -r "$file"; then +- test -x "$file" || echo 'ldd:' $"\ +-warning: you do not have execution permission for" "\`$file'" >&2 ++ if test ! -x "$file" && eval echo "$file" \ ++ | egrep -v "$filename_magic_regex" > /dev/null; then ++ echo 'ldd:' $"warning: you do not have execution permission for"\ ++ "\`$file'" >&2 ++ fi + RTLD= + for rtld in ${RTLDLIST}; do + if test -x $rtld; then +@@ -143,7 +147,12 @@ + fi + case $ret in + 0) +- eval $add_env '"$file"' || result=1 ++ if [ ! -x "$file" ] && eval file -L "$file" 2>/dev/null \ ++ | sed 10q | egrep "$file_magic_regex" > /dev/null; then ++ eval $add_env ${RTLD} '"$file"' || result=1 ++ else ++ eval $add_env '"$file"' || result=1 ++ fi + ;; + 1) + # This can be a non-ELF binary or no binary at all. diff --git a/openembedded/packages/glibc/glibc-cvs/ldsocache-varrun.patch b/openembedded/packages/glibc/glibc-cvs/ldsocache-varrun.patch new file mode 100644 index 0000000000..9994d4f879 --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs/ldsocache-varrun.patch @@ -0,0 +1,18 @@ +This patch moves ld.so.cache from /etc to /var/run. This is for devices +where /etc is JFFS2 or CRAMFS but /var is a ramdisk. + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- libc/sysdeps/generic/dl-cache.h~ldsocache-varrun ++++ libc/sysdeps/generic/dl-cache.h +@@ -29,7 +29,7 @@ + #endif + + #ifndef LD_SO_CACHE +-# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache" ++# define LD_SO_CACHE "/var/run/ld.so.cache" + #endif + + #ifndef add_system_dir diff --git a/openembedded/packages/glibc/glibc-cvs/makeconfig.patch b/openembedded/packages/glibc/glibc-cvs/makeconfig.patch new file mode 100644 index 0000000000..4365878e95 --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs/makeconfig.patch @@ -0,0 +1,15 @@ +--- Makeconfig~ 2001/09/12 18:49:45 1.265 ++++ Makeconfig 2001/10/07 20:56:17 +@@ -532,10 +532,11 @@ + $(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\ + $(filter -Wl$(comma)-rpath-link=%,\ + $(sysdep-LDFLAGS))))) ++ld_envlib_path = $(shell test x$$LD_LIBRARY_PATH = x || echo -n :$$LD_LIBRARY_PATH) + run-program-prefix = $(if $(filter $(notdir $(built-program-file)),\ + $(tests-static)),, \ + $(elf-objpfx)$(rtld-installed-name) \ +- --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path))) ++ --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path))$(ld_envlib_path)) + else + run-program-prefix = + endif diff --git a/openembedded/packages/glibc/glibc-cvs/mips-no-throw.patch b/openembedded/packages/glibc/glibc-cvs/mips-no-throw.patch new file mode 100644 index 0000000000..99a316eeac --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs/mips-no-throw.patch @@ -0,0 +1,22 @@ +--- sysdeps/unix/sysv/linux/mips/bits/socket.h.orig 2004-09-15 14:27:06.342572280 +0200 ++++ sysdeps/unix/sysv/linux/mips/bits/socket.h 2004-09-15 14:27:28.162255184 +0200 +@@ -261,7 +261,7 @@ + # define _EXTERN_INLINE extern __inline + # endif + _EXTERN_INLINE struct cmsghdr * +-__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW ++__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) + { + if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) + /* The kernel header does this so there may be a reason. */ +--- sysdeps/unix/sysv/linux/mips/sys/tas.h.orig 2004-09-15 14:27:41.809180536 +0200 ++++ sysdeps/unix/sysv/linux/mips/sys/tas.h 2004-09-15 14:27:53.245441960 +0200 +@@ -35,7 +35,7 @@ + # endif + + _EXTERN_INLINE int +-_test_and_set (int *p, int v) __THROW ++_test_and_set (int *p, int v) + { + int r, t; + diff --git a/openembedded/packages/glibc/glibc-cvs/noinfo.patch b/openembedded/packages/glibc/glibc-cvs/noinfo.patch new file mode 100644 index 0000000000..6aa0e64d96 --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs/noinfo.patch @@ -0,0 +1,52 @@ +--- glibc-2.3.2/manual/Makefile~noinfo ++++ glibc-2.3.2/manual/Makefile +@@ -25,7 +25,7 @@ + INSTALL_INFO = install-info + + .PHONY: all dvi pdf info html +-all: dvi ++all: + dvi: libc.dvi + pdf: libc.pdf + +@@ -41,7 +41,7 @@ + TEXI2PDF = texi2dvi --pdf + + ifneq ($(strip $(MAKEINFO)),:) +-all: info ++all: + info: libc.info dir-add.info + endif + +@@ -176,28 +176,14 @@ + -rm -f top-menu.texi chapters.texi + + .PHONY: install subdir_install installdirs install-data +-install-data subdir_install: install ++install-data subdir_install: + ifneq ($(strip $(MAKEINFO)),:) + # There are two variants of install-info out there. The GNU version + # knows about the INFO-DIR-SECTION tag, the Debian version doesn't. + ifneq ($(OLD_DEBIAN_INSTALL_INFO),yes) +-install: $(inst_infodir)/libc.info dir-add.info +- @if $(SHELL) -c '$(INSTALL_INFO) --version' >/dev/null 2>&1; then \ +- test -f $(inst_infodir)/dir || $(INSTALL_DATA) dir $(inst_infodir);\ +- $(INSTALL_INFO) --info-dir=$(inst_infodir) $(inst_infodir)/libc.info;\ +- $(INSTALL_INFO) --info-dir=$(inst_infodir) dir-add.info;\ +- else : ; fi ++install: + else +-install: $(inst_infodir)/libc.info dir-add.info +- @if $(SHELL) -c '$(INSTALL_INFO) --version' >/dev/null 2>&1; then \ +- test -f $(inst_infodir)/dir || $(INSTALL_DATA) dir $(inst_infodir);\ +- $(INSTALL_INFO) --info-dir=$(inst_infodir) \ +- --section '^GNU Libraries:' 'GNU Libraries:' \ +- $(inst_infodir)/libc.info;\ +- $(INSTALL_INFO) --info-dir=$(inst_infodir) \ +- --section '^GNU C Library functions:' 'GNU C Library functions:' \ +- dir-add.info;\ +- else : ; fi ++install: + endif + endif + # Catchall implicit rule for other installation targets from the parent. diff --git a/openembedded/packages/glibc/glibc-cvs/trampoline.patch b/openembedded/packages/glibc/glibc-cvs/trampoline.patch new file mode 100644 index 0000000000..86cfc0a539 --- /dev/null +++ b/openembedded/packages/glibc/glibc-cvs/trampoline.patch @@ -0,0 +1,560 @@ +From libc-alpha-return-16890-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com Wed Jan 19 18:02:53 2005 +Return-Path: +Delivered-To: listarch-libc-alpha at sources dot redhat dot com +Received: (qmail 26073 invoked by alias); 19 Jan 2005 18:02:41 -0000 +Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm +Precedence: bulk +List-Subscribe: +List-Archive: +List-Post: +List-Help: , +Sender: libc-alpha-owner at sources dot redhat dot com +Delivered-To: mailing list libc-alpha at sources dot redhat dot com +Received: (qmail 25420 invoked from network); 19 Jan 2005 18:01:47 -0000 +Received: from unknown (HELO mail.codesourcery.com) (65.74.133.9) + by sourceware dot org with SMTP; 19 Jan 2005 18:01:47 -0000 +Received: (qmail 7456 invoked from network); 19 Jan 2005 18:01:44 -0000 +Received: from localhost (HELO ?192.168.0.100?) (mitchell@127.0.0.1) + by mail dot codesourcery dot com with SMTP; 19 Jan 2005 18:01:44 -0000 +Message-ID: <41EEA082.1020000@codesourcery.com> +Date: Wed, 19 Jan 2005 10:01:38 -0800 +From: Mark Mitchell +Organization: CodeSourcery, LLC +User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) +MIME-Version: 1.0 +To: Daniel Jacobowitz +CC: libc-alpha at sources dot redhat dot com +Subject: Re: PATCH: ARM dl-trampoline.S +References: <200501191631.j0JGVVRA002591@sirius.codesourcery.com> <20050119170217.GA3137@nevyn.them.org> +In-Reply-To: <20050119170217 dot GA3137 at nevyn dot them dot org> +Content-Type: multipart/mixed; + boundary="------------050601050507020101060100" + +This is a multi-part message in MIME format. +--------------050601050507020101060100 +Content-Type: text/plain; charset=ISO-8859-1; format=flowed +Content-Transfer-Encoding: 7bit + +Daniel Jacobowitz wrote: +> On Wed, Jan 19, 2005 at 08:31:31AM -0800, Mark Mitchell wrote: +> +>>This patch updates the ARM port for the recent dl-trampoline.S and +>>link.h changes. OK to apply? +> +> +> Did you test this? I'm pretty sure that RESOLVE_MAP returns a link +> map, unlike RESOLVE. + +No, I didn't test -- except by building glibc. (There are other +problems at the moment, AFAICT, with actually running the library on ARM.) + +However, you're definitely correct -- good catch! -- and, in fact, in +looking at my logs I see compiler warnings about the mismatched type +assignment. Here is a more plausible version. How about this one? + +Thanks, + +-- +Mark Mitchell +CodeSourcery, LLC +mark@codesourcery.com +(916) 791-8304 + +--------------050601050507020101060100 +Content-Type: text/plain; + name="glibc.patch" +Content-Transfer-Encoding: 7bit +Content-Disposition: inline; + filename="glibc.patch" + +2005-01-19 Mark Mitchell + + * elf/tst-auditmod1.c: Add ARM support. + * sysdeps/arm/dl-machine.h (ELF_MACHINE_RUNTIME_TRAMPOLINE): + Remove. + (RESOLVE): Do not use it; use ... + (RESOLVE_MAP): ... instead. + (ARCH_LA_PLTENTER): Define. + (ARCH_LA_PLTEXIT): Likewise. + (elf_machine_rel): Use RESOLVE_MAP, not RESOLVE. + (elf_machine_rela): Likewise. + * sysdeps/arm/dl-trampoline.S: New file. + * sysdeps/arm/bits/link.h: Likewise. + * sysdeps/generic/ldsodefs.h (struct La_arm_regs): Declare. + (struct audit_ifaces): Add ARM functions. + +Index: elf/tst-auditmod1.c +=================================================================== +RCS file: /cvs/glibc/libc/elf/tst-auditmod1.c,v +retrieving revision 1.7 +diff -c -5 -p -r1.7 tst-auditmod1.c +*** elf/tst-auditmod1.c 16 Jan 2005 06:24:59 -0000 1.7 +--- elf/tst-auditmod1.c 19 Jan 2005 17:54:32 -0000 +*************** la_symbind64 (Elf64_Sym *sym, unsigned i +*** 100,110 **** + symname, (long int) sym->st_value, ndx, *flags); + + return sym->st_value; + } + +! #ifdef __i386__ + # define pltenter la_i86_gnu_pltenter + # define pltexit la_i86_gnu_pltexit + # define La_regs La_i86_regs + # define La_retval La_i86_retval + # define int_retval lrv_eax +--- 100,116 ---- + symname, (long int) sym->st_value, ndx, *flags); + + return sym->st_value; + } + +! #ifdef __arm__ +! # define pltenter la_arm_gnu_plteneter +! # define pltext la_arm_gnu_pltexit +! # define La_regs La_arm_regs +! # define La_retval La_arm_retval +! # define int_retval lvr_r0 +! #elif defined __i386__ + # define pltenter la_i86_gnu_pltenter + # define pltexit la_i86_gnu_pltexit + # define La_regs La_i86_regs + # define La_retval La_i86_retval + # define int_retval lrv_eax +Index: sysdeps/arm/dl-trampoline.S +=================================================================== +RCS file: sysdeps/arm/dl-trampoline.S +diff -N sysdeps/arm/dl-trampoline.S +*** /dev/null 1 Jan 1970 00:00:00 -0000 +--- sysdeps/arm/dl-trampoline.S 19 Jan 2005 17:54:32 -0000 +*************** +*** 0 **** +--- 1,135 ---- ++ /* PLT trampolines. ARM version. ++ Copyright (C) 2005 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++ #include ++ ++ #if defined(__USE_BX__) ++ #define BX(x) bx x ++ #else ++ #define BX(x) mov pc, x ++ #endif ++ ++ #ifndef PROF ++ .text ++ .globl _dl_runtime_resolve ++ .type _dl_runtime_resolve, #function ++ .align 2 ++ _dl_runtime_resolve: ++ @ we get called with ++ @ stack[0] contains the return address from this call ++ @ ip contains &GOT[n+3] (pointer to function) ++ @ lr points to &GOT[2] ++ ++ @ stack arguments ++ stmdb sp!,{r0-r3} ++ ++ @ get pointer to linker struct ++ ldr r0, [lr, #-4] ++ ++ @ prepare to call _dl_fixup() ++ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each ++ sub r1, ip, lr ++ sub r1, r1, #4 ++ add r1, r1, r1 ++ ++ @ call fixup routine ++ bl _dl_fixup ++ ++ @ save the return ++ mov ip, r0 ++ ++ @ get arguments and return address back ++ ldmia sp!, {r0-r3,lr} ++ ++ @ jump to the newly found address ++ BX(ip) ++ ++ .size _dl_runtime_resolve, .-_dl_runtime_resolve ++ ++ .globl _dl_runtime_profile ++ .type _dl_runtime_profile, #function ++ .align 2 ++ _dl_runtime_profile: ++ @ stack arguments ++ stmdb sp!, {r0-r3} ++ ++ @ get pointer to linker struct ++ ldr r0, [lr, #-4] ++ ++ @ prepare to call _dl_profile_fixup() ++ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each ++ sub r1, ip, lr ++ sub r1, r1, #4 ++ add r1, r1, r1 ++ ++ @ call profiling fixup routine ++ bl _dl_profile_fixup ++ ++ @ save the return ++ mov ip, r0 ++ ++ @ get arguments and return address back ++ ldmia sp!, {r0-r3,lr} ++ ++ @ jump to the newly found address ++ BX(ip) ++ ++ .size _dl_runtime_resolve, .-_dl_runtime_resolve ++ .previous ++ #else ++ .text ++ .globl _dl_runtime_resolve ++ .globl _dl_runtime_profile ++ .type _dl_runtime_resolve, #function ++ .type _dl_runtime_profile, #function ++ .align 2 ++ _dl_runtime_resolve: ++ _dl_runtime_profile: ++ @ we get called with ++ @ stack[0] contains the return address from this call ++ @ ip contains &GOT[n+3] (pointer to function) ++ @ lr points to &GOT[2] ++ ++ @ stack arguments ++ stmdb sp!, {r0-r3} ++ ++ @ get pointer to linker struct ++ ldr r0, [lr, #-4] ++ ++ @ prepare to call _dl_fixup() ++ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each ++ sub r1, ip, lr ++ sub r1, r1, #4 ++ add r1, r1, r1 ++ ++ @ call profiling fixup routine ++ bl _dl_fixup ++ ++ @ save the return ++ mov ip, r0 ++ ++ @ get arguments and return address back ++ ldmia sp!, {r0-r3,lr} ++ ++ @ jump to the newly found address ++ BX(ip) ++ ++ .size _dl_runtime_profile, .-_dl_runtime_profile ++ .previous ++ #endif +Index: sysdeps/arm/bits/link.h +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/arm/bits/link.h,v +retrieving revision 1.2 +diff -c -5 -p -r1.2 link.h +*** sysdeps/arm/bits/link.h 6 Jan 2005 22:40:20 -0000 1.2 +--- sysdeps/arm/bits/link.h 19 Jan 2005 17:54:32 -0000 +*************** +*** 0 **** +--- 1,57 ---- ++ /* Copyright (C) 2005 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++ #ifndef _LINK_H ++ # error "Never include directly; use instead." ++ #endif ++ ++ ++ /* Registers for entry into PLT on ARM. */ ++ typedef struct La_arm_regs ++ { ++ uint32_t lvr_r0; ++ uint32_t lvr_r1; ++ uint32_t lvr_r2; ++ uint32_t lvr_r3; ++ } La_arm_regs; ++ ++ /* Return values for calls from PLT on ARM. */ ++ typedef struct La_arm_retval ++ { ++ uint32_t lvr_r0; ++ uint32_t lvr_r1; ++ } La_arm_retval; ++ ++ ++ __BEGIN_DECLS ++ ++ extern Elf32_Addr la_arm_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx, ++ uintptr_t *__refcook, ++ uintptr_t *__defcook, ++ La_arm_regs *__regs, ++ unsigned int *__flags, ++ const char *__symname, ++ long int *__framesizep); ++ extern unsigned int la_arm_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx, ++ uintptr_t *__refcook, ++ uintptr_t *__defcook, ++ const La_arm_regs *__inregs, ++ La_arm_retval *__outregs, ++ const char *symname); ++ ++ __END_DECLS +Index: sysdeps/generic/ldsodefs.h +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/generic/ldsodefs.h,v +retrieving revision 1.112 +diff -c -5 -p -r1.112 ldsodefs.h +*** sysdeps/generic/ldsodefs.h 16 Jan 2005 02:07:29 -0000 1.112 +--- sysdeps/generic/ldsodefs.h 19 Jan 2005 17:54:32 -0000 +*************** enum allowmask +*** 173,182 **** +--- 173,183 ---- + allow_ldso = 8 + }; + + + /* Type for list of auditing interfaces. */ ++ struct La_arm_regs; + struct La_i86_regs; + struct La_i86_retval; + struct La_x86_64_regs; + struct La_x86_64_retval; + struct La_ppc32_regs; +*************** struct audit_ifaces +*** 202,211 **** +--- 203,216 ---- + uintptr_t (*symbind64) (Elf64_Sym *, unsigned int, uintptr_t *, + uintptr_t *, unsigned int *, const char *); + }; + union + { ++ Elf32_Addr (*arm_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *, ++ uintptr_t *, struct La_arm_regs *, ++ unsigned int *, const char *name, ++ long int *framesizep); + Elf32_Addr (*i86_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *, + uintptr_t *, struct La_i86_regs *, + unsigned int *, const char *name, + long int *framesizep); + Elf64_Addr (*x86_64_gnu_pltenter) (Elf64_Sym *, unsigned int, uintptr_t *, +*************** struct audit_ifaces +*** 229,238 **** +--- 234,246 ---- + unsigned int *, const char *name, + long int *framesizep); + }; + union + { ++ unsigned int (*arm_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *, ++ uintptr_t *, const struct La_arm_regs *, ++ struct La_i86_retval *, const char *); + unsigned int (*i86_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *, + uintptr_t *, const struct La_i86_regs *, + struct La_i86_retval *, const char *); + unsigned int (*x86_64_gnu_pltexit) (Elf64_Sym *, unsigned int, uintptr_t *, + uintptr_t *, + +--------------050601050507020101060100-- + +diff -u -r1.52 dl-machine.h +--- sysdeps/arm/dl-machine.h 15 Mar 2005 22:57:26 -0000 1.52 ++++ sysdeps/arm/dl-machine.h 22 Apr 2005 03:38:15 -0000 +@@ -129,119 +129,6 @@ + #define BX(x) "mov\tpc, " #x + #endif + +-#ifndef PROF +-# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\ +- .text\n\ +- .globl _dl_runtime_resolve\n\ +- .type _dl_runtime_resolve, #function\n\ +- .align 2\n\ +-_dl_runtime_resolve:\n\ +- @ we get called with\n\ +- @ stack[0] contains the return address from this call\n\ +- @ ip contains &GOT[n+3] (pointer to function)\n\ +- @ lr points to &GOT[2]\n\ +-\n\ +- @ stack arguments\n\ +- stmdb sp!,{r0-r3}\n\ +-\n\ +- @ get pointer to linker struct\n\ +- ldr r0, [lr, #-4]\n\ +-\n\ +- @ prepare to call fixup()\n\ +- @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\ +- sub r1, ip, lr\n\ +- sub r1, r1, #4\n\ +- add r1, r1, r1\n\ +-\n\ +- @ call fixup routine\n\ +- bl fixup\n\ +-\n\ +- @ save the return\n\ +- mov ip, r0\n\ +-\n\ +- @ get arguments and return address back\n\ +- ldmia sp!, {r0-r3,lr}\n\ +-\n\ +- @ jump to the newly found address\n\ +- " BX(ip) "\n\ +-\n\ +- .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\ +-\n\ +- .globl _dl_runtime_profile\n\ +- .type _dl_runtime_profile, #function\n\ +- .align 2\n\ +-_dl_runtime_profile:\n\ +- @ stack arguments\n\ +- stmdb sp!, {r0-r3}\n\ +-\n\ +- @ get pointer to linker struct\n\ +- ldr r0, [lr, #-4]\n\ +-\n\ +- @ prepare to call fixup()\n\ +- @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\ +- sub r1, ip, lr\n\ +- sub r1, r1, #4\n\ +- add r1, r1, r1\n\ +-\n\ +- @ call profiling fixup routine\n\ +- bl profile_fixup\n\ +-\n\ +- @ save the return\n\ +- mov ip, r0\n\ +-\n\ +- @ get arguments and return address back\n\ +- ldmia sp!, {r0-r3,lr}\n\ +-\n\ +- @ jump to the newly found address\n\ +- " BX(ip) "\n\ +-\n\ +- .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\ +- .previous\n\ +-"); +-#else // PROF +-# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\ +- .text\n\ +- .globl _dl_runtime_resolve\n\ +- .globl _dl_runtime_profile\n\ +- .type _dl_runtime_resolve, #function\n\ +- .type _dl_runtime_profile, #function\n\ +- .align 2\n\ +-_dl_runtime_resolve:\n\ +-_dl_runtime_profile:\n\ +- @ we get called with\n\ +- @ stack[0] contains the return address from this call\n\ +- @ ip contains &GOT[n+3] (pointer to function)\n\ +- @ lr points to &GOT[2]\n\ +-\n\ +- @ stack arguments\n\ +- stmdb sp!, {r0-r3}\n\ +-\n\ +- @ get pointer to linker struct\n\ +- ldr r0, [lr, #-4]\n\ +-\n\ +- @ prepare to call fixup()\n\ +- @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\ +- sub r1, ip, lr\n\ +- sub r1, r1, #4\n\ +- add r1, r1, r1\n\ +-\n\ +- @ call profiling fixup routine\n\ +- bl fixup\n\ +-\n\ +- @ save the return\n\ +- mov ip, r0\n\ +-\n\ +- @ get arguments and return address back\n\ +- ldmia sp!, {r0-r3,lr}\n\ +-\n\ +- @ jump to the newly found address\n\ +- " BX(ip) "\n\ +-\n\ +- .size _dl_runtime_profile, .-_dl_runtime_profile\n\ +- .previous\n\ +-"); +-#endif //PROF +- + /* Mask identifying addresses reserved for the user program, + where the dynamic linker should not map anything. */ + #define ELF_MACHINE_USER_ADDRESS_MASK 0xf8000000UL +@@ -348,6 +235,10 @@ + return value; + } + ++/* Names of the architecture-specific auditing callback functions. */ ++#define ARCH_LA_PLTENTER arm_gnu_pltenter ++#define ARCH_LA_PLTEXIT arm_gnu_pltexit ++ + #endif /* !dl_machine_h */ + + +@@ -355,7 +246,7 @@ + Prelinked libraries may use Elf32_Rela though. */ + #define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP + +-#ifdef RESOLVE ++#ifdef RESOLVE_MAP + + /* Deal with an out-of-range PC24 reloc. */ + static Elf32_Addr +@@ -425,7 +316,8 @@ + #endif + { + const Elf32_Sym *const refsym = sym; +- Elf32_Addr value = RESOLVE (&sym, version, r_type); ++ struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type); ++ Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value; + if (sym) + value += sym->st_value; + +@@ -535,7 +427,8 @@ + # ifndef RESOLVE_CONFLICT_FIND_MAP + const Elf32_Sym *const refsym = sym; + # endif +- Elf32_Addr value = RESOLVE (&sym, version, r_type); ++ struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type); ++ Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value; + if (sym) + value += sym->st_value; + +@@ -637,4 +530,4 @@ + _dl_reloc_bad_type (map, r_type, 1); + } + +-#endif /* RESOLVE */ ++#endif /* RESOLVE_MAP */ diff --git a/openembedded/packages/glibc/glibc-initial_cvs.bb b/openembedded/packages/glibc/glibc-initial_cvs.bb new file mode 100644 index 0000000000..422e8b7110 --- /dev/null +++ b/openembedded/packages/glibc/glibc-initial_cvs.bb @@ -0,0 +1,46 @@ +SECTION = "libs" +include glibc_${PV}.bb + +DEPENDS = "linux-libc-headers" +PROVIDES = "virtual/${TARGET_PREFIX}libc-initial" +FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-cvs', '${FILE_DIRNAME}/glibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}" + +PACKAGES = "" + +do_configure () { + sed -ie 's,{ (exit 1); exit 1; }; },{ (exit 0); }; },g' ${S}/configure + chmod +x ${S}/configure + CC="${BUILD_CC}" CPP="${BUILD_CPP}" LD="${BUILD_LD}" ${S}/configure --host=${TARGET_SYS} --build=${BUILD_SYS} \ + --without-cvs --disable-sanity-checks \ + --with-headers=${CROSS_DIR}/${TARGET_SYS}/include \ + --enable-hacker-mode + if grep -q GLIBC_2.3 ${S}/ChangeLog; then + # glibc-2.3.x passes cross options to $(CC) when generating errlist-compat.c, which fails without a real cross-compiler. + # Fortunately, we don't need errlist-compat.c, since we just need .h files, + # so work around this by creating a fake errlist-compat.c and satisfying its dependencies. + # Another workaround might be to tell configure to not use any cross options to $(CC). + # The real fix would be to get install-headers to not generate errlist-compat.c. + make sysdeps/gnu/errlist.c + mkdir -p stdio-common + touch stdio-common/errlist-compat.c + fi +} + +do_compile () { + : +} + +do_stage () { + oe_runmake cross-compiling=yes install_root=${CROSS_DIR}/${TARGET_SYS} prefix="" install-headers + + # Two headers -- stubs.h and features.h -- aren't installed by install-headers, + # so do them by hand. We can tolerate an empty stubs.h for the moment. + # See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html + mkdir -p ${CROSS_DIR}/${TARGET_SYS}/include/gnu + touch ${CROSS_DIR}/${TARGET_SYS}/include/gnu/stubs.h + cp ${S}/include/features.h ${CROSS_DIR}/${TARGET_SYS}/include/features.h +} + +do_install () { + : +} diff --git a/openembedded/packages/glibc/glibc-intermediate_cvs.bb b/openembedded/packages/glibc/glibc-intermediate_cvs.bb new file mode 100644 index 0000000000..11e78a5d59 --- /dev/null +++ b/openembedded/packages/glibc/glibc-intermediate_cvs.bb @@ -0,0 +1,14 @@ +SECTION = "libs" +include glibc_${PV}.bb + +DEFAULT_PREFERENCE = "-1" + +do_install () { + : +} + +PACKAGES = "" +PROVIDES = "virtual/${TARGET_PREFIX}libc-for-gcc" +DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial" +GLIBC_ADDONS = "linuxthreads" +GLIBC_EXTRA_OECONF = "" diff --git a/openembedded/packages/glibc/glibc-package.bbclass b/openembedded/packages/glibc/glibc-package.bbclass new file mode 100644 index 0000000000..053794ed7f --- /dev/null +++ b/openembedded/packages/glibc/glibc-package.bbclass @@ -0,0 +1,193 @@ +# +# For now, we will skip building of a gcc package if it is a uclibc one +# and our build is not a uclibc one, and we skip a glibc one if our build +# is a uclibc build. +# +# See the note in gcc/gcc_3.4.0.oe +# + +python __anonymous () { + import bb, re + uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None) + if uc_os: + raise bb.parse.SkipPackage("incompatible with target %s" % + bb.data.getVar('TARGET_OS', d, 1)) +} + +PACKAGES = "glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile" + +libc_baselibs = "/lib/libc* /lib/libm* /lib/ld* /lib/libpthread* /lib/libresolv* /lib/librt* /lib/libutil* /lib/libnsl* /lib/libnss_files* /lib/libnss_compat* /lib/libnss_dns* /lib/libdl* /lib/libanl* /lib/libBrokenLocale*" + +FILES_${PN} = "${sysconfdir} ${libc_baselibs} /sbin/ldconfig ${libexecdir} ${datadir}/zoneinfo ${libdir}/locale" +FILES_ldd = "${bindir}/ldd" +FILES_libsegfault = "/lib/libSegFault*" +FILES_glibc-extra-nss = "/lib/libnss*" +FILES_sln = "/sbin/sln" +FILES_glibc-dev_append = " ${libdir}/*.o ${bindir}/rpcgen" +FILES_nscd = "${sbindir}/nscd*" +FILES_glibc-utils = "${bindir} ${sbindir}" +FILES_glibc-gconv = "${libdir}/gconv" +FILES_catchsegv = "${bindir}/catchsegv" +RDEPENDS_catchsegv = "libsegfault" +FILES_glibc-pcprofile = "/lib/libpcprofile.so" +FILES_glibc-thread-db = "/lib/libthread_db*" +FILES_localedef = "${bindir}/localedef" +RPROVIDES_glibc-dev += "libc-dev" + +DESCRIPTION_sln = "glibc: create symbolic links between files" +DESCRIPTION_nscd = "glibc: name service cache daemon for passwd, group, and hosts" +DESCRIPTION_glibc-extra-nss = "glibc: nis, nisplus and hesiod search services" +DESCRIPTION_ldd = "glibc: print shared library dependencies" +DESCRIPTION_localedef = "glibc: compile locale definition files" +DESCRIPTION_glibc-utils = "glibc: misc utilities like iconf, local, gencat, tzselect, rpcinfo, ..." + +def get_glibc_fpu_setting(bb, d): + if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]: + return "--without-fp" + return "" + +EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}" + +OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}" +EXTRA_OECONF_append_arm-linuxeabi = " --without-fp" + +do_install() { + oe_runmake install_root=${D} install + for r in ${rpcsvc}; do + h=`echo $r|sed -e's,\.x$,.h,'` + install -m 0644 ${S}/sunrpc/rpcsvc/$h ${D}/${includedir}/rpcsvc/ + done + install -m 0644 ${WORKDIR}/etc/ld.so.conf ${D}/${sysconfdir}/ + install -d ${D}${libdir}/locale + make -f ${WORKDIR}/generate-supported.mk IN="${S}/localedata/SUPPORTED" OUT="${WORKDIR}/SUPPORTED" + rm -f ${D}/etc/rpc +} + +TMP_LOCALE="/tmp/locale/${libdir}/locale" + +locale_base_postinst() { +#!/bin/sh + +if [ "x$D" != "x" ]; then + exit 1 +fi + +rm -rf ${TMP_LOCALE} +mkdir -p ${TMP_LOCALE} +if [ -f ${libdir}/locale/locale-archive ]; then + cp ${libdir}/locale/locale-archive ${TMP_LOCALE}/ +fi +localedef --inputfile=${datadir}/i18n/locales/%s --charmap=%s --prefix=/tmp/locale %s +mv ${TMP_LOCALE}/locale-archive ${libdir}/locale/ +rm -rf ${TMP_LOCALE} +} + +locale_base_postrm() { +#!/bin/sh + +rm -rf ${TMP_LOCALE} +mkdir -p ${TMP_LOCALE} +if [ -f ${libdir}/locale/locale-archive ]; then + cp ${libdir}/locale/locale-archive ${TMP_LOCALE}/ +fi +localedef --delete-from-archive --inputfile=${datadir}/locales/%s --charmap=%s --prefix=/tmp/locale %s +mv ${TMP_LOCALE}/locale-archive ${libdir}/locale/ +rm -rf ${TMP_LOCALE} +} + +python package_do_split_gconvs () { + import os, re + if (bb.data.getVar('PACKAGE_NO_GCONV', d, 1) == '1'): + bb.note("package requested not splitting gconvs") + return + + if not bb.data.getVar('PACKAGES', d, 1): + return + + libdir = bb.data.getVar('libdir', d, 1) + if not libdir: + bb.error("libdir not defined") + return + datadir = bb.data.getVar('datadir', d, 1) + if not datadir: + bb.error("datadir not defined") + return + + gconv_libdir = os.path.join(libdir, "gconv") + charmap_dir = os.path.join(datadir, "i18n", "charmaps") + locales_dir = os.path.join(datadir, "i18n", "locales") + + do_split_packages(d, gconv_libdir, file_regex='^(.*)\.so$', output_pattern='glibc-gconv-%s', description='gconv module for character set %s', extra_depends='glibc-gconv') + + do_split_packages(d, charmap_dir, file_regex='^(.*)\.gz$', output_pattern='glibc-charmap-%s', description='character map for %s encoding', extra_depends='') + + def calc_locale_deps(fn, pkg, file_regex, output_pattern, group): + deps = [] + f = open(fn, "r") + c_re = re.compile('^copy "(.*)"') + i_re = re.compile('^include "(\w+)".*') + for l in f.readlines(): + m = c_re.match(l) or i_re.match(l) + if m: + dp = legitimize_package_name('glibc-localedata-%s' % m.group(1)) + if not dp in deps: + deps.append(dp) + f.close() + if deps != []: + bb.data.setVar('RDEPENDS_%s' % pkg, " ".join(deps), d) + + do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern='glibc-localedata-%s', description='locale definition for %s', hook=calc_locale_deps, extra_depends='') + bb.data.setVar('PACKAGES', bb.data.getVar('PACKAGES', d) + ' glibc-gconv', d) + + f = open(os.path.join(bb.data.getVar('WORKDIR', d, 1), "SUPPORTED"), "r") + supported = f.readlines() + f.close() + + dot_re = re.compile("(.*)\.(.*)") + + # Collate the locales by base and encoding + encodings = {} + for l in supported: + l = l[:-1] + (locale, charset) = l.split(" ") + m = dot_re.match(locale) + if m: + locale = m.group(1) + if not encodings.has_key(locale): + encodings[locale] = [] + encodings[locale].append(charset) + + def output_locale(name, locale, encoding): + pkgname = 'locale-base-' + legitimize_package_name(name) + + bb.data.setVar('RDEPENDS_%s' % pkgname, 'localedef glibc-localedata-%s glibc-charmap-%s' % (legitimize_package_name(locale), legitimize_package_name(encoding)), d) + rprovides = 'virtual-locale-%s' % legitimize_package_name(name) + m = re.match("(.*)_(.*)", name) + if m: + rprovides += ' virtual-locale-%s' % m.group(1) + bb.data.setVar('RPROVIDES_%s' % pkgname, rprovides, d) + bb.data.setVar('PACKAGES', '%s %s' % (pkgname, bb.data.getVar('PACKAGES', d, 1)), d) + bb.data.setVar('ALLOW_EMPTY_%s' % pkgname, '1', d) + bb.data.setVar('pkg_postinst_%s' % pkgname, bb.data.getVar('locale_base_postinst', d, 1) % (locale, encoding, locale), d) + bb.data.setVar('pkg_postrm_%s' % pkgname, bb.data.getVar('locale_base_postrm', d, 1) % (locale, encoding, locale), d) + + # Reshuffle names so that UTF-8 is preferred over other encodings + for l in encodings.keys(): + if len(encodings[l]) == 1: + output_locale(l, l, encodings[l][0]) + else: + if "UTF-8" in encodings[l]: + output_locale(l, l, "UTF-8") + encodings[l].remove("UTF-8") + for e in encodings[l]: + output_locale('%s-%s' % (l, e), l, e) +} + +# We want to do this indirection so that we can safely 'return' +# from the called function even though we're prepending +python populate_packages_prepend () { + if bb.data.getVar('DEBIAN_NAMES', d, 1): + bb.data.setVar('PKG_glibc', 'libc6', d) + bb.data.setVar('PKG_glibc-dev', 'libc6-dev', d) + bb.build.exec_func('package_do_split_gconvs', d) +} diff --git a/openembedded/packages/glibc/glibc_2.3.5+cvs20050627.bb b/openembedded/packages/glibc/glibc_2.3.5+cvs20050627.bb new file mode 100644 index 0000000000..e7e5c3564b --- /dev/null +++ b/openembedded/packages/glibc/glibc_2.3.5+cvs20050627.bb @@ -0,0 +1,165 @@ +DESCRIPTION = "GNU C Library" +HOMEPAGE = "http://www.gnu.org/software/libc/libc.html" +LICENSE = "LGPL" +SECTION = "libs" +PRIORITY = "required" +MAINTAINER = "Phil Blundell " + +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/glibc-cvs-2.3.5" +CVSDATE = "20050627" +PR = "r0" + +GLIBC_ADDONS ?= "ports,linuxthreads" +GLIBC_EXTRA_OECONF ?= "" + +# +# For now, we will skip building of a gcc package if it is a uclibc one +# and our build is not a uclibc one, and we skip a glibc one if our build +# is a uclibc build. +# +# See the note in gcc/gcc_3.4.0.oe +# + +python __anonymous () { + import bb, re + uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None) + if uc_os: + raise bb.parse.SkipPackage("incompatible with target %s" % + bb.data.getVar('TARGET_OS', d, 1)) +} + +# nptl needs unwind support in gcc, which can't be built without glibc. +PROVIDES = "virtual/libc ${@['virtual/${TARGET_PREFIX}libc-for-gcc', '']['nptl' in '${GLIBC_ADDONS}']}" +PROVIDES += "virtual/libintl virtual/libiconv" +DEPENDS = "${@['virtual/${TARGET_PREFIX}gcc-initial', 'virtual/${TARGET_PREFIX}gcc']['nptl' in '${GLIBC_ADDONS}']} linux-libc-headers" +RDEPENDS_${PN}-dev = "linux-libc-headers-dev" +INHIBIT_DEFAULT_DEPS = "1" + +# file://noinfo.patch;patch=1 +# file://ldconfig.patch;patch=1;pnum=0 +# file://arm-no-hwcap.patch;patch=1;pnum=0 \ +# file://arm-memcpy.patch;patch=1;pnum=0 \ +# file://arm-machine-gmon.patch;patch=1;pnum=0 \ +# \ +# file://arm-ioperm.patch;patch=1;pnum=0 \ +# file://ldd.patch;patch=1;pnum=0 \ +SRC_URI = "cvs://anoncvs@sources.redhat.com/cvs/glibc;module=libc \ + cvs://anoncvs@sources.redhat.com/cvs/glibc;module=ports \ + file://arm-audit.patch;patch=1 \ + file://arm-audit2.patch;patch=1 \ + file://arm-memcpy.patch;patch=1 \ + file://arm-longlong.patch;patch=1;pnum=0 \ + file://fhs-linux-paths.patch;patch=1 \ + file://dl-cache-libcmp.patch;patch=1 \ + file://ldsocache-varrun.patch;patch=1 \ + file://etc/ld.so.conf \ + file://generate-supported.mk" + +# seems to fail on tls platforms +SRC_URI_append_arm = " file://dyn-ldconfig-20041128.patch;patch=1" + +S = "${WORKDIR}/libc" +B = "${WORKDIR}/build-${TARGET_SYS}" + +inherit autotools + +EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \ + --without-cvs --disable-profile --disable-debug --without-gd \ + --enable-clocale=gnu \ + --enable-add-ons=${GLIBC_ADDONS} \ + --with-headers=${CROSS_DIR}/${TARGET_SYS}/include \ + --without-selinux \ + ${GLIBC_EXTRA_OECONF}" + +EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}" + +def get_glibc_fpu_setting(bb, d): + if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]: + return "--without-fp" + return "" + +do_munge() { + # Integrate ports into tree + mv ${WORKDIR}/ports ${S} +} + +addtask munge before do_patch after do_unpack + +do_configure () { +# override this function to avoid the autoconf/automake/aclocal/autoheader +# calls for now +# don't pass CPPFLAGS into configure, since it upsets the kernel-headers +# version check and doesn't really help with anything + if [ -z "`which rpcgen`" ]; then + echo "rpcgen not found. Install glibc-devel." + exit 1 + fi + (cd ${S} && gnu-configize) || die "failure in running gnu-configize" + CPPFLAGS="" oe_runconf +} + +rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \ + yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \ + rusers.x spray.x nfs_prot.x rquota.x key_prot.x" + +do_compile () { + # -Wl,-rpath-link /lib in LDFLAGS can cause breakage if another glibc is in staging + unset LDFLAGS + base_do_compile + ( + cd ${S}/sunrpc/rpcsvc + for r in ${rpcsvc}; do + h=`echo $r|sed -e's,\.x$,.h,'` + rpcgen -h $r -o $h || oewarn "unable to generate header for $r" + done + ) +} + +do_stage() { + rm -f ${STAGING_LIBDIR}/libc.so.6 + oe_runmake 'install_root=${STAGING_DIR}/${HOST_SYS}' \ + 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \ + '${STAGING_LIBDIR}/libc.so.6' \ + install-headers install-lib + + install -d ${STAGING_INCDIR}/gnu \ + ${STAGING_INCDIR}/bits \ + ${STAGING_INCDIR}/rpcsvc + install -m 0644 ${S}/include/gnu/stubs.h ${STAGING_INCDIR}/gnu/ + install -m 0644 ${B}/bits/stdio_lim.h ${STAGING_INCDIR}/bits/ + install -m 0644 misc/syscall-list.h ${STAGING_INCDIR}/bits/syscall.h + for r in ${rpcsvc}; do + h=`echo $r|sed -e's,\.x$,.h,'` + install -m 0644 ${S}/sunrpc/rpcsvc/$h ${STAGING_INCDIR}/rpcsvc/ + done + for i in libc.a libc_pic.a libc_nonshared.a; do + install -m 0644 ${B}/$i ${STAGING_LIBDIR}/ || die "failed to install $i" + done + echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${STAGING_LIBDIR}/libpthread.so + echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${STAGING_LIBDIR}/libc.so + + rm -f ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6 + oe_runmake 'install_root=${CROSS_DIR}/${TARGET_SYS}' \ + 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \ + '${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6' \ + install-headers install-lib + + install -d ${CROSS_DIR}/${TARGET_SYS}/include/gnu \ + ${CROSS_DIR}/${TARGET_SYS}/include/bits \ + ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc + install -m 0644 ${S}/include/gnu/stubs.h ${CROSS_DIR}/${TARGET_SYS}/include/gnu/ + install -m 0644 ${B}/bits/stdio_lim.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/ + install -m 0644 misc/syscall-list.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/syscall.h + for r in ${rpcsvc}; do + h=`echo $r|sed -e's,\.x$,.h,'` + install -m 0644 ${S}/sunrpc/rpcsvc/$h ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc/ + done + + for i in libc.a libc_pic.a libc_nonshared.a; do + install -m 0644 ${B}/$i ${CROSS_DIR}/${TARGET_SYS}/lib/ || die "failed to install $i" + done + echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libpthread.so + echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so +} + +include glibc-package.bbclass diff --git a/openembedded/packages/glibc/glibc_cvs.bb b/openembedded/packages/glibc/glibc_cvs.bb new file mode 100644 index 0000000000..99dd80b7ef --- /dev/null +++ b/openembedded/packages/glibc/glibc_cvs.bb @@ -0,0 +1,167 @@ +DESCRIPTION = "GNU C Library" +HOMEPAGE = "http://www.gnu.org/software/libc/libc.html" +LICENSE = "LGPL" +SECTION = "libs" +PRIORITY = "required" +MAINTAINER = "Phil Blundell " + +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/glibc-cvs-2.3.5" +PR = "r0" +PV = "2.3.5+cvs${CVSDATE}" + +GLIBC_ADDONS ?= "ports,linuxthreads" +GLIBC_EXTRA_OECONF ?= "" + +DEFAULT_PREFERENCE = "-1" + +# +# For now, we will skip building of a gcc package if it is a uclibc one +# and our build is not a uclibc one, and we skip a glibc one if our build +# is a uclibc build. +# +# See the note in gcc/gcc_3.4.0.oe +# + +python __anonymous () { + import bb, re + uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None) + if uc_os: + raise bb.parse.SkipPackage("incompatible with target %s" % + bb.data.getVar('TARGET_OS', d, 1)) +} + +# nptl needs unwind support in gcc, which can't be built without glibc. +PROVIDES = "virtual/libc ${@['virtual/${TARGET_PREFIX}libc-for-gcc', '']['nptl' in '${GLIBC_ADDONS}']}" +PROVIDES += "virtual/libintl virtual/libiconv" +DEPENDS = "${@['virtual/${TARGET_PREFIX}gcc-initial', 'virtual/${TARGET_PREFIX}gcc']['nptl' in '${GLIBC_ADDONS}']} linux-libc-headers" +INHIBIT_DEFAULT_DEPS = "1" +RDEPENDS_${PN}-dev = "linux-libc-headers-dev" + +# file://noinfo.patch;patch=1 +# file://ldconfig.patch;patch=1;pnum=0 +# file://arm-no-hwcap.patch;patch=1;pnum=0 \ +# file://arm-memcpy.patch;patch=1;pnum=0 \ +# file://arm-machine-gmon.patch;patch=1;pnum=0 \ +# \ +# file://arm-ioperm.patch;patch=1;pnum=0 \ +# file://ldd.patch;patch=1;pnum=0 \ +SRC_URI = "cvs://anoncvs@sources.redhat.com/cvs/glibc;module=libc \ + cvs://anoncvs@sources.redhat.com/cvs/glibc;module=ports \ + file://arm-audit.patch;patch=1 \ + file://arm-audit2.patch;patch=1 \ + file://arm-memcpy.patch;patch=1 \ + file://arm-longlong.patch;patch=1;pnum=0 \ + file://fhs-linux-paths.patch;patch=1 \ + file://dl-cache-libcmp.patch;patch=1 \ + file://ldsocache-varrun.patch;patch=1 \ + file://etc/ld.so.conf \ + file://generate-supported.mk" + +# seems to fail on tls platforms +SRC_URI_append_arm = " file://dyn-ldconfig-20041128.patch;patch=1" + +S = "${WORKDIR}/libc" +B = "${WORKDIR}/build-${TARGET_SYS}" + +inherit autotools + +EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \ + --without-cvs --disable-profile --disable-debug --without-gd \ + --enable-clocale=gnu \ + --enable-add-ons=${GLIBC_ADDONS} \ + --with-headers=${CROSS_DIR}/${TARGET_SYS}/include \ + --without-selinux \ + ${GLIBC_EXTRA_OECONF}" + +EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}" + +def get_glibc_fpu_setting(bb, d): + if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]: + return "--without-fp" + return "" + +do_munge() { + # Integrate ports into tree + mv ${WORKDIR}/ports ${S} +} + +addtask munge before do_patch after do_unpack + +do_configure () { +# override this function to avoid the autoconf/automake/aclocal/autoheader +# calls for now +# don't pass CPPFLAGS into configure, since it upsets the kernel-headers +# version check and doesn't really help with anything + if [ -z "`which rpcgen`" ]; then + echo "rpcgen not found. Install glibc-devel." + exit 1 + fi + (cd ${S} && gnu-configize) || die "failure in running gnu-configize" + CPPFLAGS="" oe_runconf +} + +rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \ + yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \ + rusers.x spray.x nfs_prot.x rquota.x key_prot.x" + +do_compile () { + # -Wl,-rpath-link /lib in LDFLAGS can cause breakage if another glibc is in staging + unset LDFLAGS + base_do_compile + ( + cd ${S}/sunrpc/rpcsvc + for r in ${rpcsvc}; do + h=`echo $r|sed -e's,\.x$,.h,'` + rpcgen -h $r -o $h || oewarn "unable to generate header for $r" + done + ) +} + +do_stage() { + rm -f ${STAGING_LIBDIR}/libc.so.6 + oe_runmake 'install_root=${STAGING_DIR}/${HOST_SYS}' \ + 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \ + '${STAGING_LIBDIR}/libc.so.6' \ + install-headers install-lib + + install -d ${STAGING_INCDIR}/gnu \ + ${STAGING_INCDIR}/bits \ + ${STAGING_INCDIR}/rpcsvc + install -m 0644 ${S}/include/gnu/stubs.h ${STAGING_INCDIR}/gnu/ + install -m 0644 ${B}/bits/stdio_lim.h ${STAGING_INCDIR}/bits/ + install -m 0644 misc/syscall-list.h ${STAGING_INCDIR}/bits/syscall.h + for r in ${rpcsvc}; do + h=`echo $r|sed -e's,\.x$,.h,'` + install -m 0644 ${S}/sunrpc/rpcsvc/$h ${STAGING_INCDIR}/rpcsvc/ + done + for i in libc.a libc_pic.a libc_nonshared.a; do + install -m 0644 ${B}/$i ${STAGING_LIBDIR}/ || die "failed to install $i" + done + echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${STAGING_LIBDIR}/libpthread.so + echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${STAGING_LIBDIR}/libc.so + + rm -f ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6 + oe_runmake 'install_root=${CROSS_DIR}/${TARGET_SYS}' \ + 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \ + '${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6' \ + install-headers install-lib + + install -d ${CROSS_DIR}/${TARGET_SYS}/include/gnu \ + ${CROSS_DIR}/${TARGET_SYS}/include/bits \ + ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc + install -m 0644 ${S}/include/gnu/stubs.h ${CROSS_DIR}/${TARGET_SYS}/include/gnu/ + install -m 0644 ${B}/bits/stdio_lim.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/ + install -m 0644 misc/syscall-list.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/syscall.h + for r in ${rpcsvc}; do + h=`echo $r|sed -e's,\.x$,.h,'` + install -m 0644 ${S}/sunrpc/rpcsvc/$h ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc/ + done + + for i in libc.a libc_pic.a libc_nonshared.a; do + install -m 0644 ${B}/$i ${CROSS_DIR}/${TARGET_SYS}/lib/ || die "failed to install $i" + done + echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libpthread.so + echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so +} + +include glibc-package.bbclass diff --git a/openembedded/packages/gmp/gmp-4.1.4/amd64.patch b/openembedded/packages/gmp/gmp-4.1.4/amd64.patch new file mode 100644 index 0000000000..67be9dd350 --- /dev/null +++ b/openembedded/packages/gmp/gmp-4.1.4/amd64.patch @@ -0,0 +1,14 @@ +--- gmp-4.1.4/longlong.h.orig 2004-04-22 00:34:28.000000000 +0200 ++++ gmp-4.1.4/longlong.h 2005-07-18 01:13:06.000000000 +0200 +@@ -738,8 +738,10 @@ + count is only an int. */ + #define count_trailing_zeros(count, x) \ + do { \ ++ UDItype __cbtmp; \ + ASSERT ((x) != 0); \ +- __asm__ ("bsfq %1,%q0" : "=r" (count) : "rm" ((UDItype)(x))); \ ++ __asm__ ("bsfq %1,%0" : "=r" (__cbtmp) : "rm" ((UDItype)(x))); \ ++ (count) = __cbtmp; \ + } while (0) + #endif /* x86_64 */ + diff --git a/openembedded/packages/gmp/gmp-4.1.4/configure.patch b/openembedded/packages/gmp/gmp-4.1.4/configure.patch new file mode 100644 index 0000000000..4b6c4ec636 --- /dev/null +++ b/openembedded/packages/gmp/gmp-4.1.4/configure.patch @@ -0,0 +1,837 @@ +--- gmp-1.4.4/acinclude.m4.orig 2004-09-21 15:03:09.000000000 +0200 ++++ gmp-1.4.4/acinclude.m4 2005-07-18 01:09:00.000000000 +0200 +@@ -21,10 +21,10 @@ + dnl MA 02111-1307, USA. + + +-define(X86_PATTERN, ++define([X86_PATTERN], + [[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-*]]) + +-define(POWERPC64_PATTERN, ++define([POWERPC64_PATTERN], + [[powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-*]]) + + +@@ -32,7 +32,7 @@ + dnl ---------------------- + dnl Strip entries */subdir from $path. + +-define(GMP_STRIP_PATH, ++define([GMP_STRIP_PATH], + [tmp_path= + for i in $path; do + case $i in +@@ -53,7 +53,7 @@ + dnl GMP_INCLUDE_GMP_H_BITS_PER_MP_LIMB starts as a dummy, but gets + dnl redefined in GMP_C_SIZES when the right value is known. + +-define(GMP_INCLUDE_GMP_H, ++define([GMP_INCLUDE_GMP_H], + [[#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ + #define GMP_NAIL_BITS $GMP_NAIL_BITS] + GMP_INCLUDE_GMP_H_BITS_PER_MP_LIMB +@@ -61,7 +61,7 @@ + #include "$srcdir/gmp-h.in"] + ]) + +-define(GMP_INCLUDE_GMP_H_BITS_PER_MP_LIMB, ++define([GMP_INCLUDE_GMP_H_BITS_PER_MP_LIMB], + [[#define __GMP_BITS_PER_MP_LIMB 123 /* dummy for GMP_NUMB_BITS etc */ + #define GMP_LIMB_BITS 123]]) + +@@ -72,7 +72,7 @@ + dnl FILE. The regexps here aren't very rugged, but are enough for gmp. + dnl /dev/null as a parameter prevents a hang if $2 is accidentally omitted. + +-define(GMP_HEADER_GETVAL, ++define([GMP_HEADER_GETVAL], + [patsubst(patsubst( + esyscmd([grep "^#define $1 " $2 /dev/null 2>/dev/null]), + [^.*$1[ ]+],[]), +@@ -86,7 +86,7 @@ + dnl autoconf time. Two digits like 3.0 if patchlevel <= 0, or three digits + dnl like 3.0.1 if patchlevel > 0. + +-define(GMP_VERSION, ++define([GMP_VERSION], + [GMP_HEADER_GETVAL(__GNU_MP_VERSION,gmp-h.in)[]dnl + .GMP_HEADER_GETVAL(__GNU_MP_VERSION_MINOR,gmp-h.in)[]dnl + ifelse(m4_eval(GMP_HEADER_GETVAL(__GNU_MP_VERSION_PATCHLEVEL,gmp-h.in) > 0),1, +@@ -97,13 +97,13 @@ + dnl ------------------------------ + dnl Setup an AC_SUBST of HAVE_FUNC_01 for each argument. + +-AC_DEFUN(GMP_SUBST_CHECK_FUNCS, ++AC_DEFUN([GMP_SUBST_CHECK_FUNCS], + [m4_if([$1],,, + [_GMP_SUBST_CHECK_FUNCS(ac_cv_func_[$1],HAVE_[]m4_translit([$1],[a-z],[A-Z])_01) + GMP_SUBST_CHECK_FUNCS(m4_shift($@))])]) + + dnl Called: _GMP_SUBST_CHECK_FUNCS(cachvar,substvar) +-AC_DEFUN(_GMP_SUBST_CHECK_FUNCS, ++AC_DEFUN([_GMP_SUBST_CHECK_FUNCS], + [case $[$1] in + yes) AC_SUBST([$2],1) ;; + no) [$2]=0 ;; +@@ -115,14 +115,14 @@ + dnl ---------------------------------- + dnl Setup an AC_SUBST of HAVE_FOO_H_01 for each argument. + +-AC_DEFUN(GMP_SUBST_CHECK_HEADERS, ++AC_DEFUN([GMP_SUBST_CHECK_HEADERS], + [m4_if([$1],,, + [_GMP_SUBST_CHECK_HEADERS(ac_cv_header_[]m4_translit([$1],[./],[__]), + HAVE_[]m4_translit([$1],[a-z./],[A-Z__])_01) + GMP_SUBST_CHECK_HEADERS(m4_shift($@))])]) + + dnl Called: _GMP_SUBST_CHECK_HEADERS(cachvar,substvar) +-AC_DEFUN(_GMP_SUBST_CHECK_HEADERS, ++AC_DEFUN([_GMP_SUBST_CHECK_HEADERS], + [case $[$1] in + yes) AC_SUBST([$2],1) ;; + no) [$2]=0 ;; +@@ -145,12 +145,12 @@ + dnl would test whether $major.$minor.$subminor is greater than or equal to + dnl 10.3.1. + +-AC_DEFUN(GMP_COMPARE_GE, ++AC_DEFUN([GMP_COMPARE_GE], + [gmp_compare_ge=no + GMP_COMPARE_GE_INTERNAL($@) + ]) + +-AC_DEFUN(GMP_COMPARE_GE_INTERNAL, ++AC_DEFUN([GMP_COMPARE_GE_INTERNAL], + [ifelse(len([$3]),0, + [if test -n "$1" && test "$1" -ge $2; then + gmp_compare_ge=yes +@@ -184,7 +184,7 @@ + dnl for instance to random.o (and others) on vax-dec-ultrix4.5. Naturally + dnl a user-selected $AR_FLAGS is left unchanged. + +-AC_DEFUN(GMP_PROG_AR, ++AC_DEFUN([GMP_PROG_AR], + [dnl Want to establish $AR before libtool initialization. + AC_BEFORE([$0],[AC_PROG_LIBTOOL]) + gmp_user_AR=$AR +@@ -212,7 +212,7 @@ + dnl CC_FOR_BUILD is used without testing. CC_FOR_BUILD is the new name for + dnl a build system compiler, see configfsf.guess. + +-AC_DEFUN(GMP_PROG_HOST_CC, ++AC_DEFUN([GMP_PROG_HOST_CC], + [AC_BEFORE([$0],[AC_PROG_LIBTOOL]) + AC_REQUIRE([AC_PROG_CC]) + AC_CACHE_CHECK([for HOST_CC build system compiler], +@@ -255,7 +255,7 @@ + dnl FIXME: This can be removed and just AM_PROG_LEX used, one that macro + dnl works properly. + +-AC_DEFUN(GMP_PROG_LEX, ++AC_DEFUN([GMP_PROG_LEX], + [AC_REQUIRE([AC_PROG_LEX]) + if test "$LEX" = :; then + LEX=${am_missing_run}flex +@@ -273,7 +273,7 @@ + dnl + dnl See mpn/asm-defs.m4 for details on the known bad m4s. + +-AC_DEFUN(GMP_PROG_M4, ++AC_DEFUN([GMP_PROG_M4], + [AC_ARG_VAR(M4,[m4 macro processor]) + AC_CACHE_CHECK([for suitable m4], + gmp_cv_prog_m4, +@@ -340,7 +340,7 @@ + dnl Enhancement: Maybe this could be in GMP_PROG_M4, and attempt to prefer + dnl an m4 with a working m4wrap, if it can be found. + +-AC_DEFUN(GMP_M4_M4WRAP_SPURIOUS, ++AC_DEFUN([GMP_M4_M4WRAP_SPURIOUS], + [AC_REQUIRE([GMP_PROG_M4]) + AC_CACHE_CHECK([if m4wrap produces spurious output], + gmp_cv_m4_m4wrap_spurious, +@@ -374,7 +374,7 @@ + dnl A user-selected $NM is always left unchanged. AC_PROG_NM is still run + dnl to get the "checking" message printed though. + +-AC_DEFUN(GMP_PROG_NM, ++AC_DEFUN([GMP_PROG_NM], + [dnl Make sure we're the first to call AC_PROG_NM, so our extra flags are + dnl used by everyone. + AC_BEFORE([$0],[AC_PROG_NM]) +@@ -426,7 +426,7 @@ + dnl will run is that a plain native "./configure" falls back on ABI=32, but + dnl ABI=64 is still available as a cross-compile. + +-AC_DEFUN(GMP_PROG_CC_WORKS, ++AC_DEFUN([GMP_PROG_CC_WORKS], + [AC_MSG_CHECKING([compiler $1]) + cat >conftest.c <conftest.c <