M7350v1_en_gpl

This commit is contained in:
T
2024-09-09 08:52:07 +00:00
commit f9cc65cfda
65988 changed files with 26357421 additions and 0 deletions
@@ -0,0 +1,44 @@
Upstream-Status: Backport
Add missing includes required when building with modern toolchain, based on
patch from Debian bugzilla:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=505954
Should no longer be required once upgraded to 0.7.22 or later.
Index: apt-0.7.14/apt-pkg/acquire.cc
===================================================================
--- apt-0.7.14.orig/apt-pkg/acquire.cc 2008-05-28 14:22:13.000000000 +0100
+++ apt-0.7.14/apt-pkg/acquire.cc 2010-07-23 17:30:11.494883936 +0100
@@ -22,6 +22,7 @@
#include <apti18n.h>
+#include <cstdio>
#include <iostream>
#include <sstream>
Index: apt-0.7.14/apt-pkg/contrib/sha256.h
===================================================================
--- apt-0.7.14.orig/apt-pkg/contrib/sha256.h 2008-05-28 14:22:14.000000000 +0100
+++ apt-0.7.14/apt-pkg/contrib/sha256.h 2010-07-23 17:30:11.494883936 +0100
@@ -14,6 +14,7 @@
#ifndef APTPKG_SHA256_H
#define APTPKG_SHA256_H
+#include <stdint.h>
#include <string>
#include <cstring>
#include <algorithm>
Index: apt-0.7.14/apt-pkg/deb/dpkgpm.cc
===================================================================
--- apt-0.7.14.orig/apt-pkg/deb/dpkgpm.cc 2008-05-28 14:22:14.000000000 +0100
+++ apt-0.7.14/apt-pkg/deb/dpkgpm.cc 2010-07-23 17:30:36.960856870 +0100
@@ -20,6 +20,7 @@
#include <stdlib.h>
#include <fcntl.h>
#include <sys/select.h>
+#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
@@ -0,0 +1,91 @@
Add in missing header includes to resolve compile failures with recent
compiler/glibc combinations.
Upstream-Status: Inappropriate [Resolved upstream]
RP 2011/11/23
Index: apt-0.7.14/apt-pkg/init.cc
===================================================================
--- apt-0.7.14.orig/apt-pkg/init.cc 2011-11-23 22:48:53.544637868 +0000
+++ apt-0.7.14/apt-pkg/init.cc 2011-11-23 22:48:59.456638260 +0000
@@ -16,6 +16,7 @@
#include <config.h>
#include <cstdlib>
#include <sys/stat.h>
+#include <locale>
/*}}}*/
#define Stringfy_(x) # x
Index: apt-0.7.14/cmdline/apt-cache.cc
===================================================================
--- apt-0.7.14.orig/cmdline/apt-cache.cc 2011-11-23 22:53:29.048631067 +0000
+++ apt-0.7.14/cmdline/apt-cache.cc 2011-11-23 22:54:15.784616212 +0000
@@ -32,6 +32,7 @@
#include <apti18n.h>
#include <locale.h>
+#include <locale>
#include <iostream>
#include <unistd.h>
#include <errno.h>
Index: apt-0.7.14/cmdline/apt-cdrom.cc
===================================================================
--- apt-0.7.14.orig/cmdline/apt-cdrom.cc 2011-11-23 22:53:29.064631096 +0000
+++ apt-0.7.14/cmdline/apt-cdrom.cc 2011-11-23 22:53:57.616630261 +0000
@@ -27,6 +27,7 @@
//#include "indexcopy.h"
#include <locale.h>
+#include <locale>
#include <iostream>
#include <fstream>
#include <vector>
Index: apt-0.7.14/cmdline/apt-config.cc
===================================================================
--- apt-0.7.14.orig/cmdline/apt-config.cc 2011-11-23 22:50:16.796635352 +0000
+++ apt-0.7.14/cmdline/apt-config.cc 2011-11-23 22:50:25.640633906 +0000
@@ -27,6 +27,7 @@
#include <locale.h>
#include <iostream>
#include <string>
+#include <locale>
/*}}}*/
using namespace std;
Index: apt-0.7.14/cmdline/apt-extracttemplates.cc
===================================================================
--- apt-0.7.14.orig/cmdline/apt-extracttemplates.cc 2011-11-23 22:53:29.080631084 +0000
+++ apt-0.7.14/cmdline/apt-extracttemplates.cc 2011-11-23 22:53:38.304630439 +0000
@@ -39,6 +39,7 @@
#include <config.h>
#include <apti18n.h>
#include "apt-extracttemplates.h"
+#include <locale>
/*}}}*/
using namespace std;
Index: apt-0.7.14/cmdline/apt-get.cc
===================================================================
--- apt-0.7.14.orig/cmdline/apt-get.cc 2011-11-23 22:53:29.096631090 +0000
+++ apt-0.7.14/cmdline/apt-get.cc 2011-11-23 22:53:49.368629452 +0000
@@ -48,6 +48,7 @@
#include <set>
#include <locale.h>
+#include <locale>
#include <langinfo.h>
#include <fstream>
#include <termios.h>
Index: apt-0.7.14/cmdline/apt-sortpkgs.cc
===================================================================
--- apt-0.7.14.orig/cmdline/apt-sortpkgs.cc 2011-11-23 22:52:03.872640247 +0000
+++ apt-0.7.14/cmdline/apt-sortpkgs.cc 2011-11-23 22:52:10.880638611 +0000
@@ -27,6 +27,7 @@
#include <locale.h>
#include <unistd.h>
+#include <locale>
/*}}}*/
using namespace std;
@@ -0,0 +1,11 @@
Upstream-Status: Inappropriate [configuration]
---
po/LINGUAS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- apt-0.7.14.orig/po/LINGUAS
+++ apt-0.7.14/po/LINGUAS
@@ -1 +1 @@
-ar bg bs ca cs cy da de dz el en_GB es eu fi fr gl he hu it ja km ko ku mr nb ne nl nn pl pt pt_BR ro ru sk sl sv th tl uk vi zh_CN zh_TW
+ar bg bs ca cs cy da de dz el en_GB es eu fi fr gl he hu it ja km ku mr nb ne nl nn pl pt pt_BR ro ru sk sl sv th tl uk vi zh_CN zh_TW
@@ -0,0 +1,37 @@
Upstream-Status: Inappropriate [configuration]
---
apt-pkg/packagemanager.cc | 4 ++++
1 file changed, 4 insertions(+)
--- apt-0.6.45exp2.orig/apt-pkg/packagemanager.cc
+++ apt-0.6.45exp2/apt-pkg/packagemanager.cc
@@ -534,10 +534,12 @@ bool pkgPackageManager::SmartUnPack(PkgI
List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States);
+#if 0
// Perform immedate configuration of the package.
if (List->IsFlag(Pkg,pkgOrderList::Immediate) == true)
if (SmartConfigure(Pkg) == false)
return _error->Error("Internal Error, Could not perform immediate configuration (2) on %s",Pkg.Name());
+#endif
return true;
}
@@ -609,6 +611,7 @@ pkgPackageManager::OrderResult pkgPackag
DoneSomething = true;
}
+#if 0
// Final run through the configure phase
if (ConfigureAll() == false)
return Failed;
@@ -623,6 +626,7 @@ pkgPackageManager::OrderResult pkgPackag
return Failed;
}
}
+#endif
return Completed;
}
@@ -0,0 +1,21 @@
Upstream-Status: Inappropriate [configuration]
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- apt-0.7.14.orig/Makefile
+++ apt-0.7.14/Makefile
@@ -15,11 +15,11 @@ all headers library clean veryclean bina
$(MAKE) -C apt-inst $@
$(MAKE) -C methods $@
$(MAKE) -C cmdline $@
$(MAKE) -C ftparchive $@
$(MAKE) -C dselect $@
- $(MAKE) -C doc $@
+# $(MAKE) -C doc $@
$(MAKE) -C po $@
# Some very common aliases
.PHONY: maintainer-clean dist-clean distclean pristine sanity
maintainer-clean dist-clean distclean pristine sanity: veryclean
@@ -0,0 +1,42 @@
Upstream-Status: Inappropriate [configuration]
---
buildlib/sizetable | 4 +++-
configure.in | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
Index: apt-0.7.14/buildlib/sizetable
===================================================================
--- apt-0.7.14.orig/buildlib/sizetable
+++ apt-0.7.14/buildlib/sizetable
@@ -11,6 +11,9 @@
# The format is:-
# CPU endian sizeof: char, int, short, long
i386 little 1 4 2 4
+i486 little 1 4 2 4
+i586 little 1 4 2 4
+i686 little 1 4 2 4
armeb big 1 4 2 4
arm little 1 4 2 4
alpha little 1 4 2 8
@@ -21,4 +24,5 @@ m68k big 1 4 2 4
powerpc big 1 4 2 4
mips big 1 4 2 4
hppa big 1 4 2 4
-m32r big 1 4 2 4
\ No newline at end of file
+m32r big 1 4 2 4
+x86_64 little 1 4 2 8
Index: apt-0.7.14/configure.in
===================================================================
--- apt-0.7.14.orig/configure.in
+++ apt-0.7.14/configure.in
@@ -88,7 +88,7 @@ dnl This is often the dpkg architecture
dnl First check against the full canonical canoncial-system-type in $target
dnl and if that fails, just look for the cpu
AC_MSG_CHECKING(debian architecture)
-archset="`dpkg-architecture -qDEB_HOST_ARCH`"
+archset="`echo $host_alias|cut -d'-' -f1`"
if test "x$archset" = "x"; then
AC_MSG_ERROR([failed: use --host= or output from dpkg-architecture])
fi
@@ -0,0 +1,64 @@
require apt.inc
inherit native
DEPENDS += "dpkg-native gettext-native"
PACKAGES = ""
USE_NLS = "yes"
SRC_URI += "file://db_linking_hack.patch"
python do_install () {
bb.build.exec_func('do_install_base', d)
bb.build.exec_func('do_install_config', d)
}
python do_install_config () {
indir = os.path.dirname(d.getVar('FILE',1))
infile = file(os.path.join(indir, 'files', 'apt.conf'), 'r')
data = infile.read()
infile.close()
data = bb.data.expand(data, d)
outdir = os.path.join(d.getVar('D', 1), d.getVar('sysconfdir', 1), 'apt')
if not os.path.exists(outdir):
os.makedirs(outdir)
outpath = os.path.join(outdir, 'apt.conf.sample')
outfile = file(outpath, 'w')
outfile.write(data)
outfile.close()
}
do_install_base () {
install -d ${D}${bindir}
install -m 0755 bin/apt-cdrom ${D}${bindir}/
install -m 0755 bin/apt-get ${D}${bindir}/
install -m 0755 bin/apt-config ${D}${bindir}/
install -m 0755 bin/apt-cache ${D}${bindir}/
install -m 0755 bin/apt-sortpkgs ${D}${bindir}/
install -m 0755 bin/apt-extracttemplates ${D}${bindir}/
eval `cat environment.mak | grep ^GLIBC_VER | sed -e's, = ,=,'`
eval `cat environment.mak | grep ^LIBSTDCPP_VER | sed -e's, = ,=,'`
oe_libinstall -so -C bin libapt-pkg$GLIBC_VER$LIBSTDCPP_VER ${D}${libdir}/
ln -sf libapt-pkg$GLIBC_VER$LIBSTDCPP_VER.so ${D}${libdir}/libapt-pkg.so
oe_libinstall -so -C bin libapt-inst$GLIBC_VER$LIBSTDCPP_VER ${D}${libdir}/
ln -sf libapt-inst$GLIBC_VER$LIBSTDCPP_VER.so ${D}${libdir}/libapt-inst.so
install -d ${D}${libdir}/apt/methods
install -m 0755 bin/methods/* ${D}${libdir}/apt/methods/
install -d ${D}${libdir}/dpkg/methods/apt
install -m 0644 dselect/desc.apt ${D}${libdir}/dpkg/methods/apt/
install -m 0644 dselect/names ${D}${libdir}/dpkg/methods/apt/
install -m 0755 dselect/install ${D}${libdir}/dpkg/methods/apt/
install -m 0755 dselect/setup ${D}${libdir}/dpkg/methods/apt/
install -m 0755 dselect/update ${D}${libdir}/dpkg/methods/apt/
install -d ${D}${sysconfdir}/apt
install -d ${D}${localstatedir}/lib/apt/lists/partial
install -d ${D}${localstatedir}/cache/apt/archives/partial
install -d ${D}${localstatedir}/log/apt/
}
@@ -0,0 +1,13 @@
require apt-native.inc
PR = "r6"
SRC_URI += "file://nodoc.patch \
file://noconfigure.patch \
file://no-curl.patch \
file://includes-fix.patch"
SRC_URI[md5sum] = "19efa18fb1ef20c58b9b44e94258b814"
SRC_URI[sha256sum] = "8fc06effaf8a4e4333308eedcdc6840f1c8056f2e924210f151dfc076bcd4045"
LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3"
@@ -0,0 +1,105 @@
apt-manpages="doc/apt-cache.8 \
doc/apt-cdrom.8 \
doc/apt-config.8 \
doc/apt-get.8 \
doc/apt.8 \
doc/apt.conf.5 \
doc/apt_preferences.5 \
doc/fr/apt-cache.fr.8 \
doc/fr/apt-cdrom.fr.8 \
doc/fr/apt-config.fr.8 \
doc/fr/apt-get.fr.8 \
doc/fr/apt.conf.fr.5 \
doc/fr/apt_preferences.fr.5 \
doc/fr/sources.list.fr.5 \
doc/es/apt.es.8 \
doc/es/apt-cache.es.8 \
doc/es/apt-cdrom.es.8 \
doc/es/apt-config.es.8 \
doc/es/apt-get.es.8 \
doc/es/apt.conf.es.5 \
doc/es/apt_preferences.es.5 \
doc/es/sources.list.es.5 \
doc/pt_BR/apt_preferences.pt_BR.5 \
doc/ja/apt-cache.ja.8 \
doc/ja/apt-cdrom.ja.8 \
doc/ja/apt-get.ja.8 \
doc/ja/apt.conf.ja.5 \
doc/sources.list.5"
apt-utils-manpages="doc/apt-extracttemplates.1 \
doc/apt-sortpkgs.1 \
doc/fr/apt-extracttemplates.fr.1 \
doc/fr/apt-sortpkgs.fr.1"
# doc/fr/apt-ftparchive.fr.1
# doc/apt-ftparchive.1
def get_files_apt_doc(d, bb, manpages):
import re
manpages = re.sub(r'\bdoc/(\S+)/(\S+)\.\1\.(.)\b', r'${mandir}/\1/man\3/\2.\3', manpages)
manpages = re.sub(r'\bdoc/(\S+)\.(.)\b', r'${mandir}/man\2/\1.\2', manpages)
return manpages
def get_commands_apt_doc(d, bb, manpages):
import os
s = list()
__dir_cache__ = list()
for m in manpages.split():
dest = get_files_apt_doc(d, bb, m)
dir = os.path.dirname(dest)
if not dir in __dir_cache__:
s.append("install -d ${D}/%s" % dir)
__dir_cache__.append(dir)
s.append("install -m 0644 %s ${D}/%s" % (m, dest))
return "\n".join(s)
PACKAGES += "${PN}-utils ${PN}-utils-doc"
FILES_${PN} = "${bindir}/apt-cdrom ${bindir}/apt-get \
${bindir}/apt-config ${bindir}/apt-cache \
${libdir}/apt ${libdir}/libapt*.so.* \
${localstatedir} ${sysconfdir} \
${libdir}/dpkg"
FILES_${PN}-utils = "${bindir}/apt-sortpkgs ${bindir}/apt-extracttemplates"
FILES_${PN}-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-manpages', 1))} \
${docdir}/apt"
FILES_${PN}-utils-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-utils-manpages', 1))}"
FILES_${PN}-dev = "${libdir}/libapt*.so ${includedir}"
do_install () {
set -x
${@get_commands_apt_doc(d, bb, d.getVar('apt-manpages', 1))}
${@get_commands_apt_doc(d, bb, d.getVar('apt-utils-manpages', 1))}
install -d ${D}${bindir}
install -m 0755 bin/apt-cdrom ${D}${bindir}/
install -m 0755 bin/apt-get ${D}${bindir}/
install -m 0755 bin/apt-config ${D}${bindir}/
install -m 0755 bin/apt-cache ${D}${bindir}/
install -m 0755 bin/apt-sortpkgs ${D}${bindir}/
install -m 0755 bin/apt-extracttemplates ${D}${bindir}/
eval `cat environment.mak | grep ^GLIBC_VER | sed -e's, = ,=,'`
eval `cat environment.mak | grep ^LIBSTDCPP_VER | sed -e's, = ,=,'`
oe_libinstall -so -C bin libapt-pkg$GLIBC_VER$LIBSTDCPP_VER ${D}${libdir}/
ln -sf libapt-pkg$GLIBC_VER$LIBSTDCPP_VER.so ${D}${libdir}/libapt-pkg.so
oe_libinstall -so -C bin libapt-inst$GLIBC_VER$LIBSTDCPP_VER ${D}${libdir}/
ln -sf libapt-inst$GLIBC_VER$LIBSTDCPP_VER.so ${D}${libdir}/libapt-inst.so
install -d ${D}${libdir}/apt/methods
install -m 0755 bin/methods/* ${D}${libdir}/apt/methods/
install -d ${D}${libdir}/dpkg/methods/apt
install -m 0644 dselect/desc.apt ${D}${libdir}/dpkg/methods/apt/
install -m 0644 dselect/names ${D}${libdir}/dpkg/methods/apt/
install -m 0755 dselect/install ${D}${libdir}/dpkg/methods/apt/
install -m 0755 dselect/setup ${D}${libdir}/dpkg/methods/apt/
install -m 0755 dselect/update ${D}${libdir}/dpkg/methods/apt/
install -d ${D}${sysconfdir}/apt
install -d ${D}${localstatedir}/lib/apt/lists/partial
install -d ${D}${localstatedir}/cache/apt/archives/partial
install -d ${D}${docdir}/apt/examples
install -m 0644 doc/examples/* ${D}${docdir}/apt/examples/
install -d ${D}${includedir}/apt-pkg/
install -m 0644 include/apt-pkg/*.h ${D}${includedir}/apt-pkg/
}
+27
View File
@@ -0,0 +1,27 @@
DESCRIPTION = "Advanced front-end for dpkg."
LICENSE = "GPLv2.0+"
SECTION = "base"
SRC_URI = "${DEBIAN_MIRROR}/main/a/apt/apt_${PV}.tar.gz \
file://no-ko-translation.patch \
file://use-host.patch \
file://localefixes.patch \
"
inherit autotools gettext
EXTRA_AUTORECONF = "--exclude=autopoint,autoheader"
# Apt wants to know the glibc version by running a binary file, which will
# fail, so we have to tell configure which version to use Since I don't know
# the impliations of setting a wrong value I only provide one for angstrom,
# which uses glibc 2.5 (which claims to be 2.4)
# Koen - 20070327
EXTRA_OECONF_append_angstrom = " ac_cv_glibc_ver=libc6.4"
# under Debian it is set to libc6.3 as they use glibc 2.3
# They also provide glibc 2.5 in 'experimental' and it works with APT built
# for 2.3 so we set it in same way
EXTRA_OECONF_append = " ac_cv_glibc_ver=libc6.3"
FILES_${PN}-dbg += "${libdir}/apt/methods/.debug/"
@@ -0,0 +1,18 @@
DEPENDS = "curl db"
RDEPENDS_${PN} = "dpkg"
LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3"
require apt.inc
PR = "r9"
SRC_URI += "file://nodoc.patch \
file://includes-fix.patch "
SRC_URI[md5sum] = "19efa18fb1ef20c58b9b44e94258b814"
SRC_URI[sha256sum] = "8fc06effaf8a4e4333308eedcdc6840f1c8056f2e924210f151dfc076bcd4045"
require apt-package.inc
FILES_${PN} += "${bindir}/apt-key"
apt-manpages += "doc/apt-key.8"
@@ -0,0 +1,43 @@
Dir "${STAGING_DIR_NATIVE}/"
{
State "var/lib/apt/"
{
Lists "lists/";
status "#ROOTFS#/var/lib/dpkg/status";
};
Cache "var/cache/apt/"
{
Archives "archives/";
pkgcache "";
srcpkgcache "";
};
Bin "${STAGING_BINDIR_NATIVE}/"
{
methods "${STAGING_LIBDIR}/apt/methods/";
gzip "/bin/gzip";
dpkg "dpkg";
dpkg-source "dpkg-source";
dpkg-buildpackage "dpkg-buildpackage";
apt-get "apt-get";
apt-cache "apt-cache";
};
Etc "etc/apt/"
{
Preferences "preferences";
};
};
APT
{
Install-Recommends "true";
Immediate-Configure "false";
Architecture "i586";
Get
{
Assume-Yes "true";
Force-Yes "true"
};
};
DPkg::Options {"--root=#ROOTFS#";"--admindir=#ROOTFS#/var/lib/dpkg";"--force-all";"--no-debsig"};
};
@@ -0,0 +1,29 @@
Upstream-Status: Backport
Index: apt-0.7.3/configure.in
===================================================================
--- apt-0.7.3.orig/configure.in 2007-07-01 10:38:45.000000000 +0000
+++ apt-0.7.3/configure.in 2007-08-21 13:39:26.000000000 +0000
@@ -67,8 +67,20 @@
[AC_DEFINE(HAVE_BDB)
BDBLIB="-ldb"
AC_MSG_RESULT(yes)],
- [BDBLIB=""
- AC_MSG_RESULT(no)]
+
+ LIBS="$LIBS -lpthread"
+ [AC_MSG_CHECKING(if we can link against BerkeleyDB with pthread)
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include <db.h>],
+ [int r, s, t; db_version(&r, &s, &t);]
+ )],
+ [AC_DEFINE(HAVE_BDB)
+ BDBLIB="-ldb -lpthread"
+ AC_MSG_RESULT(yes)],
+ [BDBLIB=""
+ AC_MSG_RESULT(no)]
+ )]
)]
)
@@ -0,0 +1,15 @@
Upstream-Status: Backport
Index: apt-0.6.46.2/buildlib/environment.mak.in
===================================================================
--- apt-0.6.46.2.orig/buildlib/environment.mak.in 2007-03-29 11:38:58.000000000 +0100
+++ apt-0.6.46.2/buildlib/environment.mak.in 2007-03-29 11:39:12.000000000 +0100
@@ -62,7 +62,7 @@
# Shared library things
HOST_OS = @host_os@
-ifneq ($(words $(filter linux-gnu gnu% %gnu,$(HOST_OS))),0)
+ifneq ($(words $(filter linux-gnu linux-gnueabi gnu% %gnu,$(HOST_OS))),0)
SONAME_MAGIC=-Wl,-soname -Wl,
LFLAGS_SO=
else
@@ -0,0 +1,46 @@
Upstream-Status: Inappropriate [configuration]
---
configure.in | 6 ------
methods/makefile | 7 -------
2 files changed, 13 deletions(-)
--- apt-0.7.14.orig/configure.in
+++ apt-0.7.14/configure.in
@@ -84,16 +84,10 @@ AC_CHECK_HEADER(db.h,
)]
)
LIBS="$saveLIBS"
-AC_CHECK_LIB(curl, curl_easy_init,
- [AC_CHECK_HEADER(curl/curl.h,
- curl_ok=yes,
- curl_ok=no)],
- AC_MSG_ERROR([failed: I need CURL due https support]),
-)
AC_SUBST(BDBLIB)
dnl Converts the ARCH to be something singular for this general CPU family
dnl This is often the dpkg architecture string.
--- apt-0.7.14.orig/methods/makefile
+++ apt-0.7.14/methods/makefile
@@ -50,17 +50,10 @@ PROGRAM=http
SLIBS = -lapt-pkg $(SOCKETLIBS)
LIB_MAKES = apt-pkg/makefile
SOURCE = http.cc rfc2553emu.cc connect.cc
include $(PROGRAM_H)
-# The https method
-PROGRAM=https
-SLIBS = -lapt-pkg -lcurl
-LIB_MAKES = apt-pkg/makefile
-SOURCE = https.cc
-include $(PROGRAM_H)
-
# The ftp method
PROGRAM=ftp
SLIBS = -lapt-pkg $(SOCKETLIBS)
LIB_MAKES = apt-pkg/makefile
SOURCE = ftp.cc rfc2553emu.cc connect.cc
@@ -0,0 +1,18 @@
SUMMARY = "A GNU tool that procude shell scripts to automatically configure software."
DESCRIPTION = "Autoconf is an extensible package of M4 macros that produce shell scripts to automatically \
configure software source code packages. Autoconf creates a configuration script for a package from a template \
file that lists the operating system features that the package can use, in the form of M4 macro calls."
LICENSE = "GPLv3"
HOMEPAGE = "http://www.gnu.org/software/autoconf/"
SECTION = "devel"
DEPENDS += "m4-native"
DEPENDS_virtclass-native = "m4-native gnu-config-native"
DEPENDS_virtclass-nativesdk = "m4-nativesdk gnu-config-nativesdk"
RDEPENDS_${PN} = "m4 gnu-config"
RDEPENDS_${PN}_virtclass-native = "m4-native gnu-config-native"
RDEPENDS_${PN}_virtclass-nativesdk = "m4-nativesdk gnu-config-nativesdk"
SRC_URI = "${GNU_MIRROR}/autoconf/autoconf-${PV}.tar.bz2 \
file://program_prefix.patch"
inherit autotools
@@ -0,0 +1,38 @@
Upstream-Status: Pending
Index: lib/autoconf/libs.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/libs.m4,v
retrieving revision 1.13
diff -p -u -r1.13 libs.m4
--- autoconf-2.59/lib/autoconf/libs.m4 6 Sep 2005 15:34:06 -0000 1.13
+++ autoconf-2.59/lib/autoconf/libs.m4 18 Sep 2005 17:09:58 -0000
@@ -265,13 +265,13 @@ ac_x_header_dirs='
/usr/openwin/share/include'
if test "$ac_x_includes" = no; then
- # Guess where to find include files, by looking for Intrinsic.h.
+ # Guess where to find include files, by looking for Xlib.h.
# First, try using that file with no special directory specified.
- AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <X11/Intrinsic.h>])],
+ AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <X11/Xlib.h>])],
[# We can compile using X headers with no special include directory.
ac_x_includes=],
[for ac_dir in $ac_x_header_dirs; do
- if test -r "$ac_dir/X11/Intrinsic.h"; then
+ if test -r "$ac_dir/X11/Xlib.h"; then
ac_x_includes=$ac_dir
break
fi
@@ -284,9 +284,9 @@ if test "$ac_x_libraries" = no; then
# Don't add to $LIBS permanently.
ac_save_LIBS=$LIBS
- LIBS="-lXt $LIBS"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@include <X11/Intrinsic.h>],
- [XtMalloc (0)])],
+ LIBS="-lX11 $LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@include <X11/Xlib.h>],
+ [XrmInitialize ()])],
[LIBS=$ac_save_LIBS
# We can link X programs with no special library path.
ac_x_libraries=],
@@ -0,0 +1,15 @@
Upstream-Status: Pending
--- 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");
@@ -0,0 +1,139 @@
Upstream-Status: Pending
Index: autoconf-2.63/bin/autoreconf.in
===================================================================
--- autoconf-2.63.orig/bin/autoreconf.in 2008-12-31 17:39:01.000000000 +0000
+++ autoconf-2.63/bin/autoreconf.in 2008-12-31 17:43:38.000000000 +0000
@@ -76,6 +76,7 @@
-i, --install copy missing auxiliary files
--no-recursive don't rebuild sub-packages
-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]
@@ -136,6 +137,13 @@
# Recurse into subpackages
my $recursive = 1;
+# Steps to exclude
+my @exclude;
+my @ex;
+
+my $uses_gettext;
+my $configure_ac;
+
## ---------- ##
## Routines. ##
## ---------- ##
@@ -153,6 +161,7 @@
'B|prepend-include=s' => \@prepend_include,
'i|install' => \$install,
's|symlink' => \$symlink,
+ 'x|exclude=s' => \@exclude,
'm|make' => \$run_make,
'recursive!' => \$recursive);
@@ -162,6 +171,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
@@ -255,6 +266,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)
@@ -368,7 +384,10 @@
}
else
{
- xsystem_hint ("autopoint is needed because this package uses Gettext", "$autopoint");
+ @ex = grep (/^autopoint$/, @exclude);
+ if ($#ex == -1) {
+ xsystem_hint ("autopoint is needed because this package uses Gettext", "$autopoint");
+ }
}
@@ -532,16 +551,17 @@
{
$libtoolize .= " --ltdl";
}
- xsystem_hint ("libtoolize is needed because this package uses Libtool", $libtoolize);
- $rerun_aclocal = 1;
+ @ex = grep (/^libtoolize$/, @exclude);
+ if ($#ex == -1) {
+ xsystem_hint ("libtoolize is needed because this package uses Libtool", $libtoolize);
+ $rerun_aclocal = 1;
+ }
}
else
{
verb "$configure_ac: not running libtoolize: --install not given";
}
-
-
# ------------------- #
# Rerunning aclocal. #
# ------------------- #
@@ -572,7 +592,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");
+ }
# -------------------- #
@@ -593,7 +616,10 @@
}
else
{
- xsystem ($autoheader);
+ @ex = grep (/^autoheader$/, @exclude);
+ if ($#ex == -1) {
+ xsystem ("$autoheader");
+ }
}
@@ -610,7 +636,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");
+ }
}
@@ -634,7 +663,10 @@
}
else
{
- xsystem ("$make");
+ @ex = grep (/^make$/, @exclude);
+ if ($#ex == -1) {
+ xsystem ("$make");
+ }
}
}
}
@@ -0,0 +1,13 @@
Upstream-Status: Pending
--- 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);
@@ -0,0 +1,38 @@
Upstream-Status: Pending
#
# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
#
Index: autoconf-2.63/bin/autoreconf.in
===================================================================
--- autoconf-2.63.orig/bin/autoreconf.in 2008-12-31 17:43:55.000000000 +0000
+++ autoconf-2.63/bin/autoreconf.in 2008-12-31 17:46:16.000000000 +0000
@@ -58,7 +58,7 @@
$help = "Usage: $0 [OPTION]... [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 specified
DIRECTORIES and their subdirectories (defaulting to `.').
@@ -115,6 +115,7 @@
my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize';
my $autopoint = $ENV{'AUTOPOINT'} || 'autopoint';
my $make = $ENV{'MAKE'} || 'make';
+my $gnuconfigize = $ENV{'GNUCONFIGIZE'} || 'gnu-configize';
# --install -- as --add-missing in other tools.
my $install = 0;
@@ -644,6 +645,10 @@
}
}
+ @ex = grep (/^gnu-configize$/, @exclude);
+ if ($#ex == -1) {
+ xsystem ("$gnuconfigize");
+ }
# -------------- #
# Running make. #
@@ -0,0 +1,14 @@
Upstream-Status: Pending
Index: autoconf-2.63/bin/autoreconf.in
===================================================================
--- autoconf-2.63.orig/bin/autoreconf.in 2008-08-28 03:08:10.000000000 +0100
+++ autoconf-2.63/bin/autoreconf.in 2008-12-31 17:38:40.000000000 +0000
@@ -190,6 +190,7 @@
$autoconf .= join (' --prepend-include=', '', map { shell_quote ($_) } @prepend_include);
$autoheader .= join (' --include=', '', map { shell_quote ($_) } @include);
$autoheader .= join (' --prepend-include=', '', map { shell_quote ($_) } @prepend_include);
+ $aclocal .= join (' -I ', '', map { shell_quote ($_) } @include);
# --install and --symlink;
if ($install)
@@ -0,0 +1,40 @@
Upstream-Status: Pending
Poky provides a list of site files in CONFIG_SITE whereas autoconf
only expects one file. This patch changes autoconf to accept a list of
them.
RP 1/2/10
Updated for 2.68 version: the CONFIG_SITE var was not getting used at all
fixed the 2.68 code
Nitin A Kamble <nitin.a.kamble@intel.com> 2011/05/27
Index: autoconf-2.68/lib/autoconf/general.m4
===================================================================
--- autoconf-2.68.orig/lib/autoconf/general.m4
+++ autoconf-2.68/lib/autoconf/general.m4
@@ -1878,7 +1878,6 @@ AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPL
m4_define([AC_SITE_LOAD],
[# Prefer an explicitly selected file to automatically selected ones.
ac_site_file1=NONE
-ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
# We do not want a PATH search for config.site.
case $CONFIG_SITE in @%:@((
@@ -1886,14 +1885,8 @@ if test -n "$CONFIG_SITE"; then
*/*) ac_site_file1=$CONFIG_SITE;;
*) ac_site_file1=./$CONFIG_SITE;;
esac
-elif test "x$prefix" != xNONE; then
- ac_site_file1=$prefix/share/config.site
- ac_site_file2=$prefix/etc/config.site
-else
- ac_site_file1=$ac_default_prefix/share/config.site
- ac_site_file2=$ac_default_prefix/etc/config.site
fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+for ac_site_file in $ac_site_file1
do
test "x$ac_site_file" = xNONE && continue
if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
@@ -0,0 +1,120 @@
Upstream-Status: Pending
We don't build xmkmf so any values returned from it are going to be wrong.
Using any paths in /usr/ for x headers/libs is a bad idea when cross compiling.
This patch removes them to stop any confusion.
RP - 20071115
Index: autoconf-2.68/lib/autoconf/libs.m4
===================================================================
--- autoconf-2.68.orig/lib/autoconf/libs.m4
+++ autoconf-2.68/lib/autoconf/libs.m4
@@ -159,53 +159,6 @@ m4_popdef([AC_Lib_Name])dnl
# --------------------- #
-# _AC_PATH_X_XMKMF
-# ----------------
-# Internal subroutine of _AC_PATH_X.
-# Set ac_x_includes and/or ac_x_libraries.
-m4_define([_AC_PATH_X_XMKMF],
-[AC_ARG_VAR(XMKMF, [Path to xmkmf, Makefile generator for X Window System])dnl
-rm -f -r conftest.dir
-if mkdir conftest.dir; then
- cd conftest.dir
- cat >Imakefile <<'_ACEOF'
-incroot:
- @echo incroot='${INCROOT}'
-usrlibdir:
- @echo usrlibdir='${USRLIBDIR}'
-libdir:
- @echo libdir='${LIBDIR}'
-_ACEOF
- if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
- # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
- for ac_var in incroot usrlibdir libdir; do
- eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
- done
- # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
- for ac_extension in a so sl dylib la dll; do
- if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
- test -f "$ac_im_libdir/libX11.$ac_extension"; then
- ac_im_usrlibdir=$ac_im_libdir; break
- fi
- done
- # Screen out bogus values from the imake configuration. They are
- # bogus both because they are the default anyway, and because
- # using them would break gcc on systems where it needs fixed includes.
- case $ac_im_incroot in
- /usr/include) ac_x_includes= ;;
- *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
- esac
- case $ac_im_usrlibdir in
- /usr/lib | /usr/lib64 | /lib | /lib64) ;;
- *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
- esac
- fi
- cd ..
- rm -f -r conftest.dir
-fi
-])# _AC_PATH_X_XMKMF
-
-
# _AC_PATH_X_DIRECT
# -----------------
# Internal subroutine of _AC_PATH_X.
@@ -213,44 +166,7 @@ fi
m4_define([_AC_PATH_X_DIRECT],
[# Standard set of common directories for X headers.
# Check X11 before X11Rn because it is often a symlink to the current release.
-ac_x_header_dirs='
-/usr/X11/include
-/usr/X11R7/include
-/usr/X11R6/include
-/usr/X11R5/include
-/usr/X11R4/include
-
-/usr/include/X11
-/usr/include/X11R7
-/usr/include/X11R6
-/usr/include/X11R5
-/usr/include/X11R4
-
-/usr/local/X11/include
-/usr/local/X11R7/include
-/usr/local/X11R6/include
-/usr/local/X11R5/include
-/usr/local/X11R4/include
-
-/usr/local/include/X11
-/usr/local/include/X11R7
-/usr/local/include/X11R6
-/usr/local/include/X11R5
-/usr/local/include/X11R4
-
-/usr/X386/include
-/usr/x386/include
-/usr/XFree86/include/X11
-
-/usr/include
-/usr/local/include
-/usr/unsupported/include
-/usr/athena/include
-/usr/local/x11r5/include
-/usr/lpp/Xamples/include
-
-/usr/openwin/include
-/usr/openwin/share/include'
+ac_x_header_dirs=''
if test "$ac_x_includes" = no; then
# Guess where to find include files, by looking for Xlib.h.
@@ -299,7 +215,6 @@ AC_DEFUN([_AC_PATH_X],
[AC_CACHE_VAL(ac_cv_have_x,
[# One or both of the vars are not set, and there is no cached value.
ac_x_includes=no ac_x_libraries=no
-_AC_PATH_X_XMKMF
_AC_PATH_X_DIRECT
case $ac_x_includes,$ac_x_libraries in #(
no,* | *,no | *\'*)
@@ -0,0 +1,128 @@
Upstream-Status: Inappropriate [embedded specific]
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 </dev/null 2>&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 <djm@gnu.ai.mit.edu>.
-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 <djm@gnu.ai.mit.edu>.
# Rewritten by Akim Demaille <akim@freefriends.org>.
-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
@@ -0,0 +1,20 @@
Upstream-Status: Pending
#
# 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
@@ -0,0 +1,29 @@
We have problem using hardcoded directories like /usr/local here
which will be checked for cross builds. This is a special case which
is valid for AIX only. We do not have AIX as one of our supported
build host or target. Therefore we get rid of the hardcoded paths
and make life easier for cross compilation process.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Inappropriate [Upstream does care for AIX while we may not]
Index: autoconf-2.68/lib/autoconf/functions.m4
===================================================================
--- autoconf-2.68.orig/lib/autoconf/functions.m4 2010-09-22 14:52:19.000000000 -0700
+++ autoconf-2.68/lib/autoconf/functions.m4 2011-08-03 11:57:05.822199513 -0700
@@ -749,15 +749,6 @@ if test $ac_have_func = no; then
[LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes])
fi
-if test $ac_have_func = no; then
- # There is a commonly available library for RS/6000 AIX.
- # Since it is not a standard part of AIX, it might be installed locally.
- ac_getloadavg_LIBS=$LIBS
- LIBS="-L/usr/local/lib $LIBS"
- AC_CHECK_LIB(getloadavg, getloadavg,
- [LIBS="-lgetloadavg $LIBS"], [LIBS=$ac_getloadavg_LIBS])
-fi
-
# Make sure it is really in the library, if we think we found it,
# otherwise set up the replacement function.
AC_CHECK_FUNCS(getloadavg, [],
@@ -0,0 +1,27 @@
require autoconf.inc
PR = "r5"
PARALLEL_MAKE = ""
LICENSE = "GPLv2 & GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
file://COPYINGv3;md5=d32239bcb673463ab874e80d47fae504"
SRC_URI += "file://autoreconf-include.patch \
file://autoreconf-exclude.patch \
file://autoreconf-foreign.patch \
file://autoreconf-gnuconfigize.patch \
file://autoheader-nonfatal-warnings.patch \
${@['file://path_prog_fixes.patch', ''][bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d)]} \
file://config_site.patch \
file://remove-usr-local-lib-from-m4.patch \
"
SRC_URI[md5sum] = "864d785215aa60d627c91fcb21b05b07"
SRC_URI[sha256sum] = "c491fb273fd6d4ca925e26ceed3d177920233c76d542b150ff35e571454332c8"
SRC_URI_append_virtclass-native = " file://fix_path_xtra.patch"
EXTRA_OECONF += "ac_cv_path_M4=m4"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,24 @@
SUMMARY = "AutoGen is a tool to manage programs that contain large amounts of repetitious text."
DESCRIPTION = "AutoGen is a tool designed to simplify the creation and\
maintenance of programs that contain large amounts of repetitious text.\
It is especially valuable in programs that have several blocks of text\
that must be kept synchronized."
HOMEPAGE = "http://www.gnu.org/software/autogen/"
SECTION = "devel"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
SRC_URI = "${GNU_MIRROR}/autogen/rel${PV}/autogen-${PV}.tar.gz"
SRC_URI[md5sum] = "6c6671b76021fb30dd43b0d5fdb7180b"
SRC_URI[sha256sum] = "37e885d6c8a58f33ab198d38bb972fa4c14236f951d628161dde6e20527d0df2"
PR = "r1"
DEPENDS = "guile-native libtool-native libxml2-native"
RDEPENDS = "automake pkgconfig"
inherit autotools native
# Following line will be needed for the non-native target recipe.
#CFLAGS += "-L${STAGING_LIBDIR} -lguile-2.0 -lgc -pthread -I${STAGING_INCDIR}/guile/2.0 -I${STAGING_INCDIR}"
@@ -0,0 +1,14 @@
SUMMARY = "A GNU tool for automatically generating Makefiles."
DESCRIPTION = "Automake is a tool for automatically generating `Makefile.in' files compliant with the GNU Coding \
Standards. Automake requires the use of Autoconf."
LICENSE = "GPLv2"
HOMEPAGE = "http://www.gnu.org/software/automake/"
SECTION = "devel"
SRC_URI = "${GNU_MIRROR}/automake/automake-${PV}.tar.bz2 "
inherit autotools
export AUTOMAKE = "${@bb.which('automake', d.getVar('PATH', 1))}"
FILES_${PN} += "${datadir}/automake* ${datadir}/aclocal*"
@@ -0,0 +1,118 @@
Upstream-Status: Backport
Backporting this patch from automake devel git tree.
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/01/05
From 4e4dae500390d2ace681e4e4bc4c590ecdca38c6 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Tue, 03 Jan 2012 08:06:09 +0000
Subject: install: pkglibexec_SCRIPTS is a valid prefix/primary combination
It makes little sense for `libexec_SCRIPTS' to be accepted as valid
while `pkglibexec_SCRIPTS' is not. So fix this inconsistency by
explicitly allowing `pkglibexec_SCRIPTS' as well. It is worth
noting that the inconsistency has been there for a long time,
but only the quite recent commit `v1.11-373-g9ca6326' "Warnings
about primary/prefix mismatch fixed and extended" has made it
noisy enough to be noticed.
* automake.in (handle_scripts): Also list `pkglibexec' among the
prefixes valid for the `SCRIPTS' primary.
* doc/automake.texi (Scripts): Likewise.
* tests/primary-prefix-valid-couples.test: Update.
* THANKS: Likewise.
* NEWS: Likewise.
Reported by Dennis Schridde on the automake list:
<http://lists.gnu.org/archive/html/automake/2012-01/msg00002.html>
---
diff --git a/NEWS b/NEWS
index 599f19f..2e572e4 100644
--- a/NEWS
+++ b/NEWS
@@ -82,6 +82,11 @@ New in 1.11.0a:
Bugs fixed in 1.11.0a:
+* Bugs introduced by 1.11.2:
+
+ - Automake now correctly recognizes the prefix/primary combination
+ `pkglibexec_SCRIPTS' as valid.
+
* Bugs introduced by 1.11:
- The `parallel-tests' test driver works around a GNU make 3.80 bug with
diff --git a/THANKS b/THANKS
index e9da06c..e9c6db8 100644
--- a/THANKS
+++ b/THANKS
@@ -78,6 +78,7 @@ David Pashley david@davidpashley.com
David Zaroski cz253@cleveland.Freenet.Edu
Dean Povey dpovey@wedgetail.com
Dennis J. Linse Dennis.J.Linse@SAIC.com
+Dennis Schridde devurandom@gmx.net
Derek R. Price derek.price@openavenue.com
Diab Jerius djerius@cfa.harvard.edu
Didier Cassirame faded@free.fr
diff --git a/automake.in b/automake.in
index a852195..a689b63 100644
--- a/automake.in
+++ b/automake.in
@@ -3091,7 +3091,7 @@ sub handle_scripts
# useful to sometimes distribute scripts verbatim. This happens
# e.g. in Automake itself.
&am_install_var ('-candist', 'scripts', 'SCRIPTS',
- 'bin', 'sbin', 'libexec', 'pkgdata',
+ 'bin', 'sbin', 'libexec', 'pkglibexec', 'pkgdata',
'noinst', 'check');
}
diff --git a/doc/automake.texi b/doc/automake.texi
index cebe084..0c4dc01 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -7099,11 +7099,12 @@ prefix as with other primaries.
@vindex sbin_SCRIPTS
@vindex libexec_SCRIPTS
@vindex pkgdata_SCRIPTS
+@vindex pkglibexec_SCRIPTS
@vindex noinst_SCRIPTS
@vindex check_SCRIPTS
Scripts can be installed in @code{bindir}, @code{sbindir},
-@code{libexecdir}, or @code{pkgdatadir}.
+@code{libexecdir}, @code{pkglibexecdir}, or @code{pkgdatadir}.
Scripts that need not be installed can be listed in
@code{noinst_SCRIPTS}, and among them, those which are needed only by
diff --git a/tests/primary-prefix-invalid-couples.test b/tests/primary-prefix-invalid-couples.test
index 88e0817..c3d6471 100755
--- a/tests/primary-prefix-invalid-couples.test
+++ b/tests/primary-prefix-invalid-couples.test
@@ -79,7 +79,7 @@ for primary in $primaries; do
prefixes_ok='bin sbin libexec pkglibexec'
;;
SCRIPTS)
- prefixes_ok='bin sbin libexec pkgdata'
+ prefixes_ok='bin sbin libexec pkglibexec pkgdata'
;;
DATA)
prefixes_ok='data dataroot pkgdata doc html dvi pdf ps
diff --git a/tests/primary-prefix-valid-couples.test b/tests/primary-prefix-valid-couples.test
index 36ff5d8..6eb4149 100755
--- a/tests/primary-prefix-valid-couples.test
+++ b/tests/primary-prefix-valid-couples.test
@@ -57,7 +57,7 @@ for p in lib pkglib; do
echo "${p}_LTLIBRARIES = libd-$p.la" >> Makefile.am
done
-for p in bin sbin libexec pkgdata; do
+for p in bin sbin libexec pkglibexec pkgdata; do
echo "${p}_SCRIPTS = $p.sh" >> Makefile.am
done
--
cgit v0.9.0.2
@@ -0,0 +1,69 @@
Upstream-Status: Inappropriate [embedded specific]
---
Makefile.am | 3 ++-
Makefile.in | 3 ++-
aclocal.in | 4 ++--
automake.in | 6 ++++--
4 files changed, 10 insertions(+), 6 deletions(-)
Index: automake-1.10.1/Makefile.am
===================================================================
--- automake-1.10.1.orig/Makefile.am 2008-01-21 22:28:58.000000000 +0000
+++ automake-1.10.1/Makefile.am 2008-10-10 17:21:20.000000000 +0100
@@ -75,7 +75,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.10.1/Makefile.in
===================================================================
--- automake-1.10.1.orig/Makefile.in 2008-01-21 22:29:10.000000000 +0000
+++ automake-1.10.1/Makefile.in 2008-10-10 17:22:21.000000000 +0100
@@ -185,7 +185,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
WGET_SV_CVS = $(WGET) http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/
Index: automake-1.10.1/aclocal.in
===================================================================
--- automake-1.10.1.orig/aclocal.in 2008-01-21 22:11:41.000000000 +0000
+++ automake-1.10.1/aclocal.in 2008-10-10 17:21:20.000000000 +0100
@@ -1,8 +1,8 @@
-#!@PERL@ -w
+#!@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.10.1/automake.in
===================================================================
--- automake-1.10.1.orig/automake.in 2008-01-21 22:11:41.000000000 +0000
+++ automake-1.10.1/automake.in 2008-10-10 17:21:20.000000000 +0100
@@ -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
@@ -0,0 +1,43 @@
When the user has a UID or GID that is larger than the ustar format
supports, pax does not error out gracefully in some cases (FC13). In
this case cpio does.
See for more details: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8343
Additionally drop tar.m4 out of that part of the Makefile or we end up in
a fatal attempt to regen loop:
CDPATH="${ZSH_VERSION+.}:" && cd . && perllibdir="automake-1.11.1/lib:./lib" "automake-1.11.1/aclocal" --acdir=m4 -I m4
/bin/sh: automake-1.11.1/aclocal: No such file or directory
make: *** [aclocal.m4] Error 127
Upstream-Status: Pending
Signed-off-by: Tom Rini <tom_rini@mentor.com>
Index: automake-1.11.1/m4/tar.m4
===================================================================
--- automake-1.11.1.orig/m4/tar.m4
+++ automake-1.11.1/m4/tar.m4
@@ -30,7 +30,7 @@ m4_if([$1], [v7],
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) cpio pax none'
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
# Do not fold the above two line into one, because Tru64 sh and
# Solaris sh will not grok spaces in the rhs of `-'.
Index: automake-1.11.1/Makefile.in
===================================================================
--- automake-1.11.1.orig/Makefile.in
+++ automake-1.11.1/Makefile.in
@@ -44,7 +44,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/a
$(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
$(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
$(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
- $(top_srcdir)/m4/substnot.m4 $(top_srcdir)/m4/tar.m4 \
+ $(top_srcdir)/m4/substnot.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
@@ -0,0 +1,60 @@
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Index: automake-1.11.1/m4/python.m4
===================================================================
--- automake-1.11.1.orig/m4/python.m4
+++ automake-1.11.1/m4/python.m4
@@ -88,12 +88,13 @@ python2.1 python2.0])
[am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
- dnl Use the values of $prefix and $exec_prefix for the corresponding
- dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
+ dnl Use the values of $prefix, $libdir and $exec_prefix for the corresponding
+ dnl values of PYTHON_PREFIX PYTHON_LIB_PREFIX, and PYTHON_EXEC_PREFIX. These are made
dnl distinct variables so they can be overridden if need be. However,
dnl general consensus is that you shouldn't need this ability.
AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
+ AC_SUBST([PYTHON_LIB_PREFIX], ['${libdir}'])
AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
dnl At times (like when building shared libraries) you may want
@@ -122,7 +123,7 @@ python2.1 python2.0])
am_py_prefix=$prefix
fi
am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null ||
- echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+ echo "$PYTHON_LIB_PREFIX/python$PYTHON_VERSION/site-packages"`
case $am_cv_python_pythondir in
$am_py_prefix*)
am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
@@ -132,7 +133,7 @@ python2.1 python2.0])
case $am_py_prefix in
/usr|/System*) ;;
*)
- am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
+ am_cv_python_pythondir=$PYTHON_LIB_PREFIX/python$PYTHON_VERSION/site-packages
;;
esac
;;
@@ -160,7 +161,7 @@ python2.1 python2.0])
am_py_exec_prefix=$exec_prefix
fi
am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null ||
- echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+ echo "$PYTHON_LIB_PREFIX/python$PYTHON_VERSION/site-packages"`
case $am_cv_python_pyexecdir in
$am_py_exec_prefix*)
am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
@@ -170,7 +171,7 @@ python2.1 python2.0])
case $am_py_exec_prefix in
/usr|/System*) ;;
*)
- am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
+ am_cv_python_pyexecdir=$PYTHON_LIB_PREFIX/python$PYTHON_VERSION/site-packages
;;
esac
;;
@@ -0,0 +1,51 @@
require automake.inc
LICENSE="GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
DEPENDS_virtclass-native = "autoconf-native"
RDEPENDS_${PN} += "\
autoconf \
perl \
perl-module-bytes \
perl-module-constant \
perl-module-cwd \
perl-module-data-dumper \
perl-module-dynaloader \
perl-module-errno \
perl-module-exporter-heavy \
perl-module-file-basename \
perl-module-file-compare \
perl-module-file-copy \
perl-module-file-glob \
perl-module-file-spec-unix \
perl-module-file-stat \
perl-module-getopt-long \
perl-module-io \
perl-module-io-file \
perl-module-posix \
perl-module-strict \
perl-module-text-parsewords \
perl-module-vars "
RDEPENDS_${PN}_virtclass-native = "autoconf-native perl-native-runtime"
RDEPENDS_${PN}_virtclass-nativesdk = "autoconf-nativesdk"
PATHFIXPATCH = "file://path_prog_fixes.patch"
PATHFIXPATCH_virtclass-native = ""
PATHFIXPATCH_virtclass-nativesdk = ""
SRC_URI += "${PATHFIXPATCH} \
file://prefer-cpio-over-pax-for-ustar-archives.patch \
file://python-libdir.patch \
file://automake_1.11.2_fix_for_pkglibexec_SCRIPTS.patch"
PR = "r1"
SRC_URI[md5sum] = "18194e804d415767bae8f703c963d456"
SRC_URI[sha256sum] = "4f46d1f9380c8a3506280750f630e9fc915cb1a435b724be56b499d016368718"
do_install () {
oe_runmake 'DESTDIR=${D}' install
install -d ${D}${datadir}
}
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,25 @@
inherit cross-canadian
DESCRIPTION = "A GNU collection of cross-canadian binary utilities for ${TARGET_ARCH} target"
PN = "binutils-cross-canadian-${TRANSLATED_TARGET_ARCH}"
BPN = "binutils"
DEPENDS = "flex-native bison-native virtual/${HOST_PREFIX}gcc-crosssdk virtual/libc-nativesdk zlib-nativesdk gettext-nativesdk"
EXTRA_OECONF = "--with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS} \
--program-prefix=${TARGET_PREFIX} \
--disable-werror \
${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default', '', d)}"
do_install () {
autotools_do_install
# We're not interested in the libs or headers, these would come from the
# nativesdk or target version of the binutils recipe
rm -rf ${D}${prefix}/${TARGET_SYS}
rm -f ${D}${libdir}/libbfd*
rm -f ${D}${libdir}/libiberty*
rm -f ${D}${libdir}/libopcodes*
rm -f ${D}${includedir}/*.h
}
BBCLASSEXTEND = ""
@@ -0,0 +1,3 @@
require binutils_${PV}.bb
require binutils-cross-canadian.inc
PR = "r2"
@@ -0,0 +1,31 @@
inherit cross
PROVIDES = "virtual/${TARGET_PREFIX}binutils"
INHIBIT_DEFAULT_DEPS = "1"
INHIBIT_AUTOTOOLS_DEPS = "1"
EXTRA_OECONF = "--with-sysroot=${STAGING_DIR_TARGET} \
--program-prefix=${TARGET_PREFIX} \
--disable-install-libbfd \
--disable-werror \
--enable-poison-system-directories \
${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default', '', d)} \
${@base_contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}"
do_install () {
oe_runmake 'DESTDIR=${D}' install
# We don't really need these, so we'll remove them...
rm -rf ${D}${STAGING_DIR_NATIVE}${libdir_native}/libiberty.a
rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}
rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/lib/ldscripts
rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/info
rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/locale
rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/man
rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/share || :
rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}/gcc-lib || :
rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}64/gcc-lib || :
rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir} || :
rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}64 || :
rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${prefix} || :
}
@@ -0,0 +1,2 @@
require binutils_${PV}.bb
require binutils-cross.inc
@@ -0,0 +1,3 @@
require binutils_csl-arm-2008q1.bb
require binutils-cross.inc
PR = "r1"
@@ -0,0 +1,12 @@
require binutils-cross_${PV}.bb
inherit crosssdk
PROVIDES = "virtual/${TARGET_PREFIX}binutils-crosssdk"
PR = "r2"
do_configure_prepend () {
sed -i 's#/usr/local/lib /lib /usr/lib#${SDKPATHNATIVE}/lib ${SDKPATHNATIVE}/usr/lib /usr/local/lib /lib /usr/lib#' ${S}/ld/configure.tgt
}
@@ -0,0 +1,155 @@
SUMMARY = "A GNU collection of binary utilities"
DESCRIPTION = "The GNU Binutils are a collection of binary tools. \
The main ones are ld (GNU Linker), and as (GNU Assembler). This \
package also includes addition tools such as addr2line (Converts \
addresses into filenames and line numbers), ar (utility for creating, \
modifying and extracting archives), nm (list symbols in object \
files), objcopy (copy and translate object files), objdump (Display \
object information), and other tools and related libraries."
HOMEPAGE = "http://www.gnu.org/software/binutils/"
BUGTRACKER = "http://sourceware.org/bugzilla/"
SECTION = "devel"
LICENSE = "GPLv3"
DEPENDS = "flex-native bison-native zlib-native"
inherit autotools gettext multilib_header
PACKAGES += "${PN}-symlinks"
FILES_${PN} = " \
${bindir}/${TARGET_PREFIX}* \
${libdir}/lib*-*.so \
${prefix}/${TARGET_SYS}/bin/*"
FILES_${PN}-dev = " \
${includedir} \
${libdir}/*.la \
${libdir}/libbfd.so \
${libdir}/libopcodes.so"
FILES_${PN}-symlinks = " \
${bindir}/addr2line \
${bindir}/as \
${bindir}/c++filt \
${bindir}/gprof \
${bindir}/ld \
${bindir}/ld.bfd \
${bindir}/nm \
${bindir}/objcopy \
${bindir}/objdump \
${bindir}/ranlib \
${bindir}/readelf \
${bindir}/elfedit \
${bindir}/size \
${bindir}/strip"
FILES_${PN}-dbg += "${prefix}/${TARGET_SYS}/bin/.debug"
B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
--enable-install-libbfd \
--enable-shared \
${@base_contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}"
EXTRA_OECONF_virtclass-native = "--enable-target=all --enable-64-bit-bfd --enable-install-libbfd"
# 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 = "LD_LIBRARY_PATH= ${BUILD_CC}"
export CPP_FOR_BUILD = "${BUILD_CPP}"
export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
do_configure () {
(cd ${S}; gnu-configize) || die "Failed to run gnu-configize"
oe_runconf
#
# must prime config.cache to ensure the build of libiberty
#
mkdir -p ${B}/build-${BUILD_SYS}
for i in ${CONFIG_SITE}; do
cat $i >> ${B}/build-${BUILD_SYS}/config.cache
done
}
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_PREFIX},,`
done
rm ${D}${bindir}/ar ${D}${bindir}/strings
oe_multilib_header bfd.h
}
do_install_virtclass-native () {
autotools_do_install
# 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}
# We only want libiberty, libbfd and libopcodes
rm -rf ${D}${bindir}
rm -rf ${D}${prefix}/${TARGET_SYS}
rm -rf ${D}${prefix}/lib/ldscripts
rm -rf ${D}${prefix}/share/info
rm -rf ${D}${prefix}/share/locale
rm -rf ${D}${prefix}/share/man
rmdir ${D}${prefix}/share || :
rmdir ${D}/${libdir}/gcc-lib || :
rmdir ${D}/${libdir}64/gcc-lib || :
rmdir ${D}/${libdir} || :
rmdir ${D}/${libdir}64 || :
}
pkg_postinst_${PN}-symlinks () {
update-alternatives --install ${bindir}/ar ar ${TARGET_PREFIX}ar 100
update-alternatives --install ${bindir}/strings strings ${TARGET_PREFIX}strings 100
}
pkg_prerm_${PN}-symlinks () {
update-alternatives --remove ar ${TARGET_PREFIX}ar
update-alternatives --remove strings ${TARGET_PREFIX}strings
}
@@ -0,0 +1,39 @@
Upstream-Status: Pending
http://sourceware.org/bugzilla/show_bug.cgi?id=10340
Signed-off-by: Sven Rebhan <odinshorse@googlemail.com>
Always try to prepend the sysroot prefix to absolute filenames first.
Index: binutils-2.22/ld/ldfile.c
===================================================================
--- binutils-2.22.orig/ld/ldfile.c
+++ binutils-2.22/ld/ldfile.c
@@ -351,18 +351,24 @@ ldfile_open_file_search (const char *arc
directory first. */
if (! entry->maybe_archive)
{
- if (entry->sysrooted && IS_ABSOLUTE_PATH (entry->filename))
+ /* For absolute pathnames, try to always open the file in the
+ sysroot first. If this fails, try to open the file at the
+ given location. */
+ entry->sysrooted = is_sysrooted_pathname(entry->filename, FALSE);
+ if (IS_ABSOLUTE_PATH (entry->filename) && ld_sysroot && ! entry->sysrooted)
{
char *name = concat (ld_sysroot, entry->filename,
(const char *) NULL);
if (ldfile_try_open_bfd (name, entry))
{
entry->filename = name;
+ entry->sysrooted = TRUE;
return TRUE;
}
free (name);
}
- else if (ldfile_try_open_bfd (entry->filename, entry))
+
+ if (ldfile_try_open_bfd (entry->filename, entry))
{
entry->sysrooted = IS_ABSOLUTE_PATH (entry->filename)
&& is_sysrooted_pathname (entry->filename, TRUE);
@@ -0,0 +1,255 @@
Upstream-Status: Inappropriate [distribution: codesourcery]
Patch originally created by Mark Hatle, forward-ported to
binutils 2.21 by Scott Garman.
purpose: warn for uses of system directories when cross linking
Code Merged from Sourcery G++ binutils 2.19 - 4.4-277
2008-07-02 Joseph Myers <joseph@codesourcery.com>
ld/
* ld.h (args_type): Add error_poison_system_directories.
* ld.texinfo (--error-poison-system-directories): Document.
* ldfile.c (ldfile_add_library_path): Check
command_line.error_poison_system_directories.
* ldmain.c (main): Initialize
command_line.error_poison_system_directories.
* lexsup.c (enum option_values): Add
OPTION_ERROR_POISON_SYSTEM_DIRECTORIES.
(ld_options): Add --error-poison-system-directories.
(parse_args): Handle new option.
2007-06-13 Joseph Myers <joseph@codesourcery.com>
ld/
* config.in: Regenerate.
* ld.h (args_type): Add poison_system_directories.
* ld.texinfo (--no-poison-system-directories): Document.
* ldfile.c (ldfile_add_library_path): Check
command_line.poison_system_directories.
* ldmain.c (main): Initialize
command_line.poison_system_directories.
* lexsup.c (enum option_values): Add
OPTION_NO_POISON_SYSTEM_DIRECTORIES.
(ld_options): Add --no-poison-system-directories.
(parse_args): Handle new option.
2007-04-20 Joseph Myers <joseph@codesourcery.com>
Merge from Sourcery G++ binutils 2.17:
2007-03-20 Joseph Myers <joseph@codesourcery.com>
Based on patch by Mark Hatle <mark.hatle@windriver.com>.
ld/
* configure.in (--enable-poison-system-directories): New option.
* configure, config.in: Regenerate.
* ldfile.c (ldfile_add_library_path): If
ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib,
/usr/lib, /usr/local/lib or /usr/X11R6/lib.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Index: binutils-2.22/ld/config.in
===================================================================
--- binutils-2.22.orig/ld/config.in
+++ binutils-2.22/ld/config.in
@@ -4,6 +4,9 @@
language is requested. */
#undef ENABLE_NLS
+/* Define to warn for use of native system library directories */
+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
+
/* Additional extension a shared object might have. */
#undef EXTRA_SHLIB_EXTENSION
Index: binutils-2.22/ld/configure
===================================================================
--- binutils-2.22.orig/ld/configure
+++ binutils-2.22/ld/configure
@@ -776,6 +776,7 @@ with_lib_path
enable_targets
enable_64_bit_bfd
with_sysroot
+enable_poison_system_directories
enable_gold
enable_got
enable_werror
@@ -1431,6 +1432,8 @@ Optional Features:
(and sometimes confusing) to the casual installer
--enable-targets alternative target configurations
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
+ --enable-poison-system-directories
+ warn for use of native system library directories
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
--enable-got=<type> GOT handling scheme (target, single, negative,
multigot)
@@ -4342,7 +4345,18 @@ else
fi
+# Check whether --enable-poison-system-directories was given.
+if test "${enable_poison_system_directories+set}" = set; then :
+ enableval=$enable_poison_system_directories;
+else
+ enable_poison_system_directories=no
+fi
+
+if test "x${enable_poison_system_directories}" = "xyes"; then
+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
+
+fi
# Check whether --enable-got was given.
if test "${enable_got+set}" = set; then :
Index: binutils-2.22/ld/configure.in
===================================================================
--- binutils-2.22.orig/ld/configure.in
+++ binutils-2.22/ld/configure.in
@@ -70,6 +70,16 @@ AC_SUBST(use_sysroot)
AC_SUBST(TARGET_SYSTEM_ROOT)
AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
+AC_ARG_ENABLE([poison-system-directories],
+ AS_HELP_STRING([--enable-poison-system-directories],
+ [warn for use of native system library directories]),,
+ [enable_poison_system_directories=no])
+if test "x${enable_poison_system_directories}" = "xyes"; then
+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
+ [1],
+ [Define to warn for use of native system library directories])
+fi
+
dnl Use --enable-gold to decide if this linker should be the default.
dnl "install_as_default" is set to false if gold is the default linker.
dnl "installed_linker" is the installed BFD linker name.
Index: binutils-2.22/ld/ldfile.c
===================================================================
--- binutils-2.22.orig/ld/ldfile.c
+++ binutils-2.22/ld/ldfile.c
@@ -125,6 +125,23 @@ ldfile_add_library_path (const char *nam
{
new_dirs->name = xstrdup (name);
new_dirs->sysrooted = is_sysrooted_pathname (name, FALSE);
+
+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
+ if (command_line.poison_system_directories
+ && ((!strncmp (name, "/lib", 4))
+ || (!strncmp (name, "/usr/lib", 8))
+ || (!strncmp (name, "/usr/local/lib", 14))
+ || (!strncmp (name, "/usr/X11R6/lib", 14))))
+ {
+ if (command_line.error_poison_system_directories)
+ einfo (_("%X%P: error: library search path \"%s\" is unsafe for "
+ "cross-compilation\n"), name);
+ else
+ einfo (_("%P: warning: library search path \"%s\" is unsafe for "
+ "cross-compilation\n"), name);
+ }
+#endif
+
}
}
Index: binutils-2.22/ld/ld.h
===================================================================
--- binutils-2.22.orig/ld/ld.h
+++ binutils-2.22/ld/ld.h
@@ -203,6 +203,14 @@ typedef struct {
/* If TRUE we'll just print the default output on stdout. */
bfd_boolean print_output_format;
+ /* If TRUE (the default) warn for uses of system directories when
+ cross linking. */
+ bfd_boolean poison_system_directories;
+
+ /* If TRUE (default FALSE) give an error for uses of system
+ directories when cross linking instead of a warning. */
+ bfd_boolean error_poison_system_directories;
+
/* Big or little endian as set on command line. */
enum endian_enum endian;
Index: binutils-2.22/ld/ldmain.c
===================================================================
--- binutils-2.22.orig/ld/ldmain.c
+++ binutils-2.22/ld/ldmain.c
@@ -259,6 +259,8 @@ main (int argc, char **argv)
command_line.warn_search_mismatch = TRUE;
command_line.check_section_addresses = -1;
command_line.disable_target_specific_optimizations = -1;
+ command_line.poison_system_directories = TRUE;
+ command_line.error_poison_system_directories = FALSE;
/* We initialize DEMANGLING based on the environment variable
COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
Index: binutils-2.22/ld/ld.texinfo
===================================================================
--- binutils-2.22.orig/ld/ld.texinfo
+++ binutils-2.22/ld/ld.texinfo
@@ -2147,6 +2147,18 @@ string identifying the original linked f
Passing @code{none} for @var{style} disables the setting from any
@code{--build-id} options earlier on the command line.
+
+@kindex --no-poison-system-directories
+@item --no-poison-system-directories
+Do not warn for @option{-L} options using system directories such as
+@file{/usr/lib} when cross linking. This option is intended for use
+in chroot environments when such directories contain the correct
+libraries for the target system rather than the host.
+
+@kindex --error-poison-system-directories
+@item --error-poison-system-directories
+Give an error instead of a warning for @option{-L} options using
+system directories when cross linking.
@end table
@c man end
Index: binutils-2.22/ld/lexsup.c
===================================================================
--- binutils-2.22.orig/ld/lexsup.c
+++ binutils-2.22/ld/lexsup.c
@@ -176,6 +176,8 @@ enum option_values
#endif /* ENABLE_PLUGINS */
OPTION_DEFAULT_SCRIPT,
OPTION_PRINT_OUTPUT_FORMAT,
+ OPTION_NO_POISON_SYSTEM_DIRECTORIES,
+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES
};
/* The long options. This structure is used for both the option
@@ -612,6 +614,14 @@ static const struct ld_option ld_options
TWO_DASHES },
{ {"wrap", required_argument, NULL, OPTION_WRAP},
'\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES },
+ { {"no-poison-system-directories", no_argument, NULL,
+ OPTION_NO_POISON_SYSTEM_DIRECTORIES},
+ '\0', NULL, N_("Do not warn for -L options using system directories"),
+ TWO_DASHES },
+ { {"error-poison-system-directories", no_argument, NULL,
+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES},
+ '\0', NULL, N_("Give an error for -L options using system directories"),
+ TWO_DASHES },
};
#define OPTION_COUNT ARRAY_SIZE (ld_options)
@@ -1541,6 +1551,14 @@ parse_args (unsigned argc, char **argv)
einfo (_("%P%X: --hash-size needs a numeric argument\n"));
}
break;
+
+ case OPTION_NO_POISON_SYSTEM_DIRECTORIES:
+ command_line.poison_system_directories = FALSE;
+ break;
+
+ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES:
+ command_line.error_poison_system_directories = TRUE;
+ break;
}
}
@@ -0,0 +1,112 @@
Upstream-Status: Pending
Add support for FSL PowerPC e5500 core.
Signed-off-by: Edmar Wienskoski <edmar@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Index: binutils-2.22/bfd/archures.c
===================================================================
--- binutils-2.22.orig/bfd/archures.c
+++ binutils-2.22/bfd/archures.c
@@ -239,6 +239,7 @@ DESCRIPTION
.#define bfd_mach_ppc_e500 500
.#define bfd_mach_ppc_e500mc 5001
.#define bfd_mach_ppc_e500mc64 5005
+.#define bfd_mach_ppc_e5500 5006
.#define bfd_mach_ppc_titan 83
. bfd_arch_rs6000, {* IBM RS/6000 *}
.#define bfd_mach_rs6k 6000
Index: binutils-2.22/bfd/bfd-in2.h
===================================================================
--- binutils-2.22.orig/bfd/bfd-in2.h
+++ binutils-2.22/bfd/bfd-in2.h
@@ -1946,6 +1946,7 @@ enum bfd_architecture
#define bfd_mach_ppc_e500 500
#define bfd_mach_ppc_e500mc 5001
#define bfd_mach_ppc_e500mc64 5005
+#define bfd_mach_ppc_e5500 5006
#define bfd_mach_ppc_titan 83
bfd_arch_rs6000, /* IBM RS/6000 */
#define bfd_mach_rs6k 6000
Index: binutils-2.22/bfd/cpu-powerpc.c
===================================================================
--- binutils-2.22.orig/bfd/cpu-powerpc.c
+++ binutils-2.22/bfd/cpu-powerpc.c
@@ -352,6 +352,20 @@ const bfd_arch_info_type bfd_powerpc_arc
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
+ &bfd_powerpc_archs[19]
+ },
+ {
+ 64, /* 64 bits in a word */
+ 64, /* 64 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_powerpc,
+ bfd_mach_ppc_e5500,
+ "powerpc",
+ "powerpc:e5500",
+ 3,
+ FALSE, /* not the default */
+ powerpc_compatible,
+ bfd_default_scan,
0
}
};
Index: binutils-2.22/gas/config/tc-ppc.c
===================================================================
--- binutils-2.22.orig/gas/config/tc-ppc.c
+++ binutils-2.22/gas/config/tc-ppc.c
@@ -1265,6 +1265,7 @@ PowerPC options:\n\
-me500, -me500x2 generate code for Motorola e500 core complex\n\
-me500mc, generate code for Freescale e500mc core complex\n\
-me500mc64, generate code for Freescale e500mc64 core complex\n\
+-me5500, generate code for Freescale e5500 core complex\n\
-mspe generate code for Motorola SPE instructions\n\
-mtitan generate code for AppliedMicro Titan core complex\n\
-mregnames Allow symbolic names for registers\n\
Index: binutils-2.22/gas/doc/as.texinfo
===================================================================
--- binutils-2.22.orig/gas/doc/as.texinfo
+++ binutils-2.22/gas/doc/as.texinfo
@@ -434,7 +434,7 @@ gcc(1), ld(1), and the Info entries for
[@b{-a32}|@b{-a64}]
[@b{-mpwrx}|@b{-mpwr2}|@b{-mpwr}|@b{-m601}|@b{-mppc}|@b{-mppc32}|@b{-m603}|@b{-m604}|@b{-m403}|@b{-m405}|
@b{-m440}|@b{-m464}|@b{-m476}|@b{-m7400}|@b{-m7410}|@b{-m7450}|@b{-m7455}|@b{-m750cl}|@b{-mppc64}|
- @b{-m620}|@b{-me500}|@b{-e500x2}|@b{-me500mc}|@b{-me500mc64}|@b{-mppc64bridge}|@b{-mbooke}|
+ @b{-m620}|@b{-me500}|@b{-e500x2}|@b{-me500mc}|@b{-me500mc64}|@b{-me5500}|@b{-mppc64bridge}|@b{-mbooke}|
@b{-mpower4}|@b{-mpr4}|@b{-mpower5}|@b{-mpwr5}|@b{-mpwr5x}|@b{-mpower6}|@b{-mpwr6}|
@b{-mpower7}|@b{-mpw7}|@b{-ma2}|@b{-mcell}|@b{-mspe}|@b{-mtitan}|@b{-me300}|@b{-mcom}]
[@b{-many}] [@b{-maltivec}|@b{-mvsx}]
Index: binutils-2.22/gas/doc/c-ppc.texi
===================================================================
--- binutils-2.22.orig/gas/doc/c-ppc.texi
+++ binutils-2.22/gas/doc/c-ppc.texi
@@ -88,6 +88,9 @@ Generate code for Freescale e500mc core
@item -me500mc64
Generate code for Freescale e500mc64 core complex.
+@item -me5500
+Generate code for Freescale e5500 core complex.
+
@item -mspe
Generate code for Motorola SPE instructions.
Index: binutils-2.22/opcodes/ppc-dis.c
===================================================================
--- binutils-2.22.orig/opcodes/ppc-dis.c
+++ binutils-2.22/opcodes/ppc-dis.c
@@ -114,6 +114,12 @@ struct ppc_mopt ppc_opts[] = {
| PPC_OPCODE_E500MC | PPC_OPCODE_64 | PPC_OPCODE_POWER5
| PPC_OPCODE_POWER6 | PPC_OPCODE_POWER7),
0 },
+ { "e5500", (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_ISEL
+ | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI
+ | PPC_OPCODE_E500MC | PPC_OPCODE_64 | PPC_OPCODE_POWER4
+ | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6
+ | PPC_OPCODE_POWER7),
+ 0 },
{ "e500x2", (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_SPE
| PPC_OPCODE_ISEL | PPC_OPCODE_EFS | PPC_OPCODE_BRLOCK
| PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI
@@ -0,0 +1,428 @@
This is backport from 2.21 branch
Upstream-Status: Backport
Signed-off-by: Khem Raj <raj.khem@gmail.com>
commit 946593d19f203b02efd45b5102dd2787d9418e24
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed May 25 17:41:32 2011 +0000
Handle STT_GNU_IFUNC symols when building shared library.
bfd/
2012-05-25 H.J. Lu <hongjiu.lu@intel.com>
Backport from mainline
2012-01-06 H.J. Lu <hongjiu.lu@intel.com>
PR ld/12366
PR ld/12371
* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Properly
handle symbols marked with regular reference, but not non-GOT
reference when building shared library.
* elf32-i386.c (elf_i386_gc_sweep_hook): Properly handle
local and global STT_GNU_IFUNC symols when building shared
library.
* elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
ld/testsuite/
2012-05-25 H.J. Lu <hongjiu.lu@intel.com>
Backport from mainline
2012-01-06 H.J. Lu <hongjiu.lu@intel.com>
PR ld/12366
PR ld/12371
* ld-ifunc/ifunc-10-i386.s: Add more tests.
* ld-ifunc/ifunc-10-x86-64.s: Likewise.
* ld-ifunc/ifunc-11-i386.s: Likewise.
* ld-ifunc/ifunc-11-x86-64.s: Likewise.
* ld-ifunc/ifunc-12-i386.d: New.
* ld-ifunc/ifunc-12-i386.s: Likewise.
* ld-ifunc/ifunc-12-x86-64.d: Likewise.
* ld-ifunc/ifunc-12-x86-64.s: Likewise.
* ld-ifunc/ifunc-13-i386.d: Likewise.
* ld-ifunc/ifunc-13-x86-64.d: Likewise.
* ld-ifunc/ifunc-13a-i386.s: Likewise.
* ld-ifunc/ifunc-13a-x86-64.s: Likewise.
* ld-ifunc/ifunc-13b-i386.s: Likewise.
* ld-ifunc/ifunc-13b-x86-64.s: Likewise.
Index: binutils-2.21/bfd/elf-ifunc.c
===================================================================
--- binutils-2.21.orig/bfd/elf-ifunc.c 2010-07-13 09:59:10.000000000 -0700
+++ binutils-2.21/bfd/elf-ifunc.c 2011-06-21 16:33:40.751884107 -0700
@@ -190,10 +190,29 @@
/* Support garbage collection against STT_GNU_IFUNC symbols. */
if (h->plt.refcount <= 0 && h->got.refcount <= 0)
{
- h->got = htab->init_got_offset;
- h->plt = htab->init_plt_offset;
- *head = NULL;
- return TRUE;
+ /* When building shared library, we need to handle the case
+ where it is marked with regular reference, but not non-GOT
+ reference. It may happen if we didn't see STT_GNU_IFUNC
+ symbol at the time when checking relocations. */
+ bfd_size_type count = 0;
+
+ if (info->shared
+ && !h->non_got_ref
+ && h->ref_regular)
+ {
+ for (p = *head; p != NULL; p = p->next)
+ count += p->count;
+ if (count != 0)
+ h->non_got_ref = 1;
+ }
+
+ if (count == 0)
+ {
+ h->got = htab->init_got_offset;
+ h->plt = htab->init_plt_offset;
+ *head = NULL;
+ return TRUE;
+ }
}
/* Return and discard space for dynamic relocations against it if
Index: binutils-2.21/bfd/elf32-i386.c
===================================================================
--- binutils-2.21.orig/bfd/elf32-i386.c 2010-10-21 05:29:02.000000000 -0700
+++ binutils-2.21/bfd/elf32-i386.c 2011-06-21 16:33:40.761884138 -0700
@@ -1807,23 +1807,10 @@
r_symndx = ELF32_R_SYM (rel->r_info);
if (r_symndx >= symtab_hdr->sh_info)
{
- struct elf_i386_link_hash_entry *eh;
- struct elf_dyn_relocs **pp;
- struct elf_dyn_relocs *p;
-
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
while (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
- eh = (struct elf_i386_link_hash_entry *) h;
-
- for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
- if (p->sec == sec)
- {
- /* Everything must go for SEC. */
- *pp = p->next;
- break;
- }
}
else
{
@@ -1843,6 +1830,22 @@
}
}
+ if (h)
+ {
+ struct elf_i386_link_hash_entry *eh;
+ struct elf_dyn_relocs **pp;
+ struct elf_dyn_relocs *p;
+
+ eh = (struct elf_i386_link_hash_entry *) h;
+ for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
+ if (p->sec == sec)
+ {
+ /* Everything must go for SEC. */
+ *pp = p->next;
+ break;
+ }
+ }
+
r_type = ELF32_R_TYPE (rel->r_info);
if (! elf_i386_tls_transition (info, abfd, sec, NULL,
symtab_hdr, sym_hashes,
@@ -1883,7 +1886,8 @@
case R_386_32:
case R_386_PC32:
- if (info->shared)
+ if (info->shared
+ && (h == NULL || h->type != STT_GNU_IFUNC))
break;
/* Fall through */
Index: binutils-2.21/bfd/elf64-x86-64.c
===================================================================
--- binutils-2.21.orig/bfd/elf64-x86-64.c 2010-10-21 05:29:02.000000000 -0700
+++ binutils-2.21/bfd/elf64-x86-64.c 2011-06-21 16:33:40.761884138 -0700
@@ -1645,23 +1645,10 @@
r_symndx = ELF64_R_SYM (rel->r_info);
if (r_symndx >= symtab_hdr->sh_info)
{
- struct elf64_x86_64_link_hash_entry *eh;
- struct elf_dyn_relocs **pp;
- struct elf_dyn_relocs *p;
-
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
while (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
- eh = (struct elf64_x86_64_link_hash_entry *) h;
-
- for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
- if (p->sec == sec)
- {
- /* Everything must go for SEC. */
- *pp = p->next;
- break;
- }
}
else
{
@@ -1682,7 +1669,24 @@
}
}
- r_type = ELF64_R_TYPE (rel->r_info);
+ if (h)
+ {
+ struct elf64_x86_64_link_hash_entry *eh;
+ struct elf_dyn_relocs **pp;
+ struct elf_dyn_relocs *p;
+
+ eh = (struct elf64_x86_64_link_hash_entry *) h;
+
+ for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
+ if (p->sec == sec)
+ {
+ /* Everything must go for SEC. */
+ *pp = p->next;
+ break;
+ }
+ }
+
+ r_type = ELF32_R_TYPE (rel->r_info);
if (! elf64_x86_64_tls_transition (info, abfd, sec, NULL,
symtab_hdr, sym_hashes,
&r_type, GOT_UNKNOWN,
@@ -1733,7 +1737,8 @@
case R_X86_64_PC16:
case R_X86_64_PC32:
case R_X86_64_PC64:
- if (info->shared)
+ if (info->shared
+ && (h == NULL || h->type != STT_GNU_IFUNC))
break;
/* Fall thru */
Index: binutils-2.21/ld/testsuite/ld-ifunc/ifunc-10-i386.s
===================================================================
--- binutils-2.21.orig/ld/testsuite/ld-ifunc/ifunc-10-i386.s 2010-07-13 09:59:14.000000000 -0700
+++ binutils-2.21/ld/testsuite/ld-ifunc/ifunc-10-i386.s 2011-06-21 16:36:36.832142380 -0700
@@ -6,6 +6,8 @@
movl ifunc@GOTOFF(%ecx), %eax
call ifunc@PLT
call ifunc
+ movl xxx@GOT(%ecx), %eax
+ movl xxx, %eax
ret
.section .text.bar,"ax",@progbits
@@ -18,3 +20,7 @@
.type ifunc, @gnu_indirect_function
ifunc:
ret
+
+ .section .data.foo,"aw",@progbits
+xxx:
+ .long ifunc
Index: binutils-2.21/ld/testsuite/ld-ifunc/ifunc-10-x86-64.s
===================================================================
--- binutils-2.21.orig/ld/testsuite/ld-ifunc/ifunc-10-x86-64.s 2010-07-13 09:59:14.000000000 -0700
+++ binutils-2.21/ld/testsuite/ld-ifunc/ifunc-10-x86-64.s 2011-06-21 16:36:36.822142371 -0700
@@ -6,6 +6,7 @@
movl ifunc(%rip), %eax
call ifunc@PLT
call ifunc
+ movl xxx(%rip), %eax
ret
.section .text.bar,"ax",@progbits
@@ -18,3 +19,7 @@
.type ifunc, @gnu_indirect_function
ifunc:
ret
+
+ .section .data.foo,"aw",@progbits
+xxx:
+ .quad ifunc
Index: binutils-2.21/ld/testsuite/ld-ifunc/ifunc-11-i386.s
===================================================================
--- binutils-2.21.orig/ld/testsuite/ld-ifunc/ifunc-11-i386.s 2010-07-13 09:59:14.000000000 -0700
+++ binutils-2.21/ld/testsuite/ld-ifunc/ifunc-11-i386.s 2011-06-21 16:36:36.832142380 -0700
@@ -3,9 +3,11 @@
foo:
.global foo
movl ifunc@GOT(%ecx), %eax
- movl ifunc@GOTOFF(%ecx), %eax
+ movl ifunc@GOTOFF(%ecx), %eax
call ifunc@PLT
call ifunc
+ movl xxx@GOT(%ecx), %eax
+ movl xxx, %eax
ret
.section .text.bar,"ax",@progbits
@@ -16,6 +18,10 @@
.section .text.ifunc,"ax",@progbits
.type ifunc, @gnu_indirect_function
- .global ifunc
+ .global ifunc
ifunc:
ret
+
+ .section .data.foo,"aw",@progbits
+xxx:
+ .long ifunc
Index: binutils-2.21/ld/testsuite/ld-ifunc/ifunc-11-x86-64.s
===================================================================
--- binutils-2.21.orig/ld/testsuite/ld-ifunc/ifunc-11-x86-64.s 2010-07-13 09:59:14.000000000 -0700
+++ binutils-2.21/ld/testsuite/ld-ifunc/ifunc-11-x86-64.s 2011-06-21 16:36:36.822142371 -0700
@@ -6,6 +6,7 @@
movl ifunc(%rip), %eax
call ifunc@PLT
call ifunc
+ movl xxx(%rip), %eax
ret
.section .text.bar,"ax",@progbits
@@ -19,3 +20,7 @@
.global ifunc
ifunc:
ret
+
+ .section .data.foo,"aw",@progbits
+xxx:
+ .quad ifunc
Index: binutils-2.21/ld/testsuite/ld-ifunc/ifunc-12-i386.d
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ binutils-2.21/ld/testsuite/ld-ifunc/ifunc-12-i386.d 2011-06-21 16:33:40.761884138 -0700
@@ -0,0 +1,6 @@
+#ld: -shared -m elf_i386 -e bar --gc-sections
+#as: --32
+#readelf: -r --wide
+#target: x86_64-*-* i?86-*-*
+
+There are no relocations in this file.
Index: binutils-2.21/ld/testsuite/ld-ifunc/ifunc-12-x86-64.d
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ binutils-2.21/ld/testsuite/ld-ifunc/ifunc-12-x86-64.d 2011-06-21 16:33:40.761884138 -0700
@@ -0,0 +1,6 @@
+#ld: -shared -m elf_x86_64 -e bar --gc-sections
+#as: --64
+#readelf: -r --wide
+#target: x86_64-*-*
+
+There are no relocations in this file.
Index: binutils-2.21/ld/testsuite/ld-ifunc/ifunc-13-i386.d
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ binutils-2.21/ld/testsuite/ld-ifunc/ifunc-13-i386.d 2011-06-21 16:33:40.761884138 -0700
@@ -0,0 +1,19 @@
+#source: ifunc-13a-i386.s
+#source: ifunc-13b-i386.s
+#ld: -shared -m elf_i386 -z nocombreloc
+#as: --32
+#readelf: -r --wide
+#target: x86_64-*-* i?86-*-*
+
+Relocation section '.rel.got' at .*
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+#...
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_GLOB_DAT[ ]+ifunc\(\)[ ]+ifunc
+#...
+Relocation section '.rel.ifunc' at .*
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_32[ ]+ifunc\(\)[ ]+ifunc
+#...
+Relocation section '.rel.plt' at .*
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_JUMP_SLOT[ ]+ifunc\(\)[ ]+ifunc
Index: binutils-2.21/ld/testsuite/ld-ifunc/ifunc-13-x86-64.d
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ binutils-2.21/ld/testsuite/ld-ifunc/ifunc-13-x86-64.d 2011-06-21 16:33:40.761884138 -0700
@@ -0,0 +1,18 @@
+#source: ifunc-13a-x86-64.s
+#source: ifunc-13b-x86-64.s
+#ld: -shared -m elf_x86_64 -z nocombreloc
+#as: --64
+#readelf: -r --wide
+#target: x86_64-*-*
+
+Relocation section '.rela.got' at .*
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_X86_64_GLOB_DAT[ ]+ifunc\(\)[ ]+ifunc \+ 0
+#...
+Relocation section '.rela.ifunc' at .*
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_X86_64_64[ ]+ifunc\(\)[ ]+ifunc \+ 0
+#...
+Relocation section '.rela.plt' at .*
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_X86_64_JUMP_SLOT[ ]+ifunc\(\)[ ]+ifunc \+ 0
Index: binutils-2.21/ld/testsuite/ld-ifunc/ifunc-13a-i386.s
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ binutils-2.21/ld/testsuite/ld-ifunc/ifunc-13a-i386.s 2011-06-21 16:36:36.822142371 -0700
@@ -0,0 +1,10 @@
+ .text
+ .type foo, @function
+ .global
+foo:
+ movl xxx@GOT(%ebx), %eax
+ ret
+
+ .data
+xxx:
+ .long ifunc
Index: binutils-2.21/ld/testsuite/ld-ifunc/ifunc-13a-x86-64.s
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ binutils-2.21/ld/testsuite/ld-ifunc/ifunc-13a-x86-64.s 2011-06-21 16:36:36.822142371 -0700
@@ -0,0 +1,10 @@
+ .text
+ .type foo, @function
+ .global
+foo:
+ movl xxx(%rip), %eax
+ ret
+
+ .data
+xxx:
+ .quad ifunc
Index: binutils-2.21/ld/testsuite/ld-ifunc/ifunc-13b-i386.s
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ binutils-2.21/ld/testsuite/ld-ifunc/ifunc-13b-i386.s 2011-06-21 16:33:40.761884138 -0700
@@ -0,0 +1,5 @@
+ .text
+ .type ifunc, @gnu_indirect_function
+ .globl ifunc
+ifunc:
+ ret
Index: binutils-2.21/ld/testsuite/ld-ifunc/ifunc-13b-x86-64.s
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ binutils-2.21/ld/testsuite/ld-ifunc/ifunc-13b-x86-64.s 2011-06-21 16:33:40.761884138 -0700
@@ -0,0 +1,5 @@
+ .text
+ .type ifunc, @gnu_indirect_function
+ .globl ifunc
+ifunc:
+ ret
@@ -0,0 +1,40 @@
Upstream-Status: Pending
Index: binutils-2.22/configure
===================================================================
--- binutils-2.22.orig/configure
+++ binutils-2.22/configure
@@ -3130,7 +3130,7 @@ case "${target}" in
;;
s390-*-* | s390x-*-*)
;;
- sh-*-* | sh[34]*-*-*)
+ sh*-*-* | sh[34]*-*-*)
;;
sh64-*-* | sh5*-*-*)
;;
@@ -3570,7 +3570,7 @@ case "${target}" in
mips*-*-*)
noconfigdirs="$noconfigdirs gprof"
;;
- sh-*-* | sh64-*-*)
+ sh*-*-* | sh64-*-*)
case "${target}" in
sh*-*-elf)
;;
Index: binutils-2.22/gprof/configure
===================================================================
--- binutils-2.22.orig/gprof/configure
+++ binutils-2.22/gprof/configure
@@ -6103,6 +6103,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
+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]+|_pic\.a)$'
@@ -0,0 +1,55 @@
#!/bin/sh -e
## 001_ld_makefile_patch.dpatch
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Description: correct where ld scripts are installed
## DP: Author: Chris Chimelis <chris@debian.org>
## DP: Upstream status: N/A
## DP: Date: ??
if [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
case "$1" in
-patch) patch $patch_opts -p1 < $0;;
-unpatch) patch $patch_opts -p1 -R < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1;;
esac
exit 0
Upstream-Status: Inappropriate [debian patch]
@DPATCH@
Index: binutils-2.22/ld/Makefile.am
===================================================================
--- binutils-2.22.orig/ld/Makefile.am
+++ binutils-2.22/ld/Makefile.am
@@ -37,7 +37,7 @@ endif
# 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@
Index: binutils-2.22/ld/Makefile.in
===================================================================
--- binutils-2.22.orig/ld/Makefile.in
+++ binutils-2.22/ld/Makefile.in
@@ -366,7 +366,7 @@ AM_CFLAGS = $(WARN_CFLAGS)
# 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)
BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
@@ -0,0 +1,45 @@
#!/bin/sh -e
## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Specify which filename is causing an error if the filename is a
## DP: directory. (#45832)
if [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
case "$1" in
-patch) patch $patch_opts -p1 < $0;;
-unpatch) patch $patch_opts -p1 -R < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1;;
esac
exit 0
Upstream-Status: Inappropriate [debian patch]
@DPATCH@
Index: binutils-2.22/bfd/opncls.c
===================================================================
--- binutils-2.22.orig/bfd/opncls.c
+++ binutils-2.22/bfd/opncls.c
@@ -197,6 +197,13 @@ bfd_fopen (const char *filename, const c
{
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)
@@ -0,0 +1,49 @@
#!/bin/sh -e
## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
## DP: cases where -rpath isn't specified. (#151024)
if [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
case "$1" in
-patch) patch $patch_opts -p1 < $0;;
-unpatch) patch $patch_opts -p1 -R < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1;;
esac
exit 0
Upstream-Status: Inappropriate [debian patch]
@DPATCH@
Index: binutils-2.22/ld/emultempl/elf32.em
===================================================================
--- binutils-2.22.orig/ld/emultempl/elf32.em
+++ binutils-2.22/ld/emultempl/elf32.em
@@ -1273,6 +1273,8 @@ fragment <<EOF
&& command_line.rpath == NULL)
{
lib_path = (const char *) getenv ("LD_RUN_PATH");
+ if ((lib_path) && (strlen (lib_path) == 0))
+ lib_path = NULL;
if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
force))
break;
@@ -1500,6 +1502,8 @@ gld${EMULATION_NAME}_before_allocation (
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");
+ if ((rpath) && (strlen (rpath) == 0))
+ rpath = NULL;
for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next)
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
@@ -0,0 +1,38 @@
Source: Khem Raj <raj.khem@gmail.com>
Disposition: submit upstream.
Upstream-Status: Pending
Description:
We do not need to have the libtool patch anymore for binutils after
libtool has been updated upstream it include support for it. However
for building gas natively on uclibc systems we have to link it with
-lm so that it picks up missing symbols.
/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_from_double':
floatformat.c:(.text+0x1ec): undefined reference to `frexp'
floatformat.c:(.text+0x2f8): undefined reference to `ldexp'
/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_to_double':
floatformat.c:(.text+0x38a): undefined reference to `ldexp'
floatformat.c:(.text+0x3d2): undefined reference to `ldexp'
floatformat.c:(.text+0x43e): undefined reference to `ldexp' floatformat.c:(.text+0x4e2): undefined reference to `ldexp'
collect2: ld returned 1 exit status
make[4]: *** [as-new] Error 1
Index: binutils-2.22/gas/configure.tgt
===================================================================
--- binutils-2.22.orig/gas/configure.tgt
+++ binutils-2.22/gas/configure.tgt
@@ -428,6 +428,12 @@ case ${generic_target} in
*-*-netware) fmt=elf em=netware ;;
esac
+case ${generic_target} in
+ arm-*-*uclibc*)
+ need_libm=yes
+ ;;
+esac
+
case ${cpu_type} in
alpha | arm | i386 | ia64 | microblaze | mips | ns32k | pdp11 | ppc | sparc | z80 | z8k)
bfd_gas=yes
@@ -0,0 +1,29 @@
#!/bin/sh -e
## 127_x86_64_i386_biarch.dpatch
##
## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
## DP: Author: Aurelien Jarno <aurel32.debian.org>
## DP: Upstream status: Debian specific
#
# Hacked to apply with quilt
# Adapted to binutils 2.18.50.0.7
Upstream-Status: Inappropriate [embedded specific]
Index: binutils-2.22/ld/emulparams/elf_i386.sh
===================================================================
--- binutils-2.22.orig/ld/emulparams/elf_i386.sh
+++ binutils-2.22/ld/emulparams/elf_i386.sh
@@ -14,3 +14,13 @@ GENERATE_PIE_SCRIPT=yes
NO_SMALL_DATA=yes
SEPARATE_GOTPLT=12
IREL_IN_PLT=
+
+# Linux modify the default library search path to first include
+# a 32-bit specific directory.
+case "$target" in
+ x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
+ case "$EMULATION_NAME" in
+ *i386*) LIBPATH_SUFFIX=32 ;;
+ esac
+ ;;
+esac
@@ -0,0 +1,79 @@
This fixes a global shadow warning. The warning is treated as error hence breaks the build of target
binutils.
/b/openembedded-core/build/tmp-uclibc/work/armv5te-oe-linux-uclibceabi/binutils-2.21.1-r1/binutils-2.21.1/gas/config/obj-elf.c: In function 'obj_elf_parse_section_letters':
| /b/openembedded-core/build/tmp-uclibc/work/armv5te-oe-linux-uclibceabi/binutils-2.21.1-r1/binutils-2.21.1/gas/config/obj-elf.c:744:68: error: declaration of 'clone' shadows a global declaration [-Werror=shadow]
| /b/openembedded-core/build/tmp-uclibc/work/armv5te-oe-linux-uclibceabi/binutils-2.21.1-r1/binutils-2.21.1/gas/config/obj-elf.c: In function 'obj_elf_section':
| /b/openembedded-core/build/tmp-uclibc/work/armv5te-oe-linux-uclibceabi/binutils-2.21.1-r1/binutils-2.21.1/gas/config/obj-elf.c:981:16: error: declaration of 'clone' shadows a global declaration [-Werror=shadow]
| cc1: all warnings being treated as errors
|
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Index: binutils-2.22/gas/config/obj-elf.c
===================================================================
--- binutils-2.22.orig/gas/config/obj-elf.c
+++ binutils-2.22/gas/config/obj-elf.c
@@ -741,10 +741,10 @@ obj_elf_change_section (const char *name
}
static bfd_vma
-obj_elf_parse_section_letters (char *str, size_t len, bfd_boolean *clone)
+obj_elf_parse_section_letters (char *str, size_t len, bfd_boolean *cloneit)
{
bfd_vma attr = 0;
- *clone = FALSE;
+ *cloneit = FALSE;
while (len > 0)
{
@@ -775,7 +775,7 @@ obj_elf_parse_section_letters (char *str
attr |= SHF_TLS;
break;
case '?':
- *clone = TRUE;
+ *cloneit = TRUE;
break;
/* Compatibility. */
case 'm':
@@ -978,7 +978,7 @@ obj_elf_section (int push)
if (*input_line_pointer == '"')
{
- bfd_boolean clone;
+ bfd_boolean cloneit;
beg = demand_copy_C_string (&dummy);
if (beg == NULL)
@@ -986,7 +986,7 @@ obj_elf_section (int push)
ignore_rest_of_line ();
return;
}
- attr |= obj_elf_parse_section_letters (beg, strlen (beg), &clone);
+ attr |= obj_elf_parse_section_letters (beg, strlen (beg), &cloneit);
SKIP_WHITESPACE ();
if (*input_line_pointer == ',')
@@ -1038,10 +1038,10 @@ obj_elf_section (int push)
attr &= ~SHF_MERGE;
}
- if ((attr & SHF_GROUP) != 0 && clone)
+ if ((attr & SHF_GROUP) != 0 && cloneit)
{
as_warn (_("? section flag ignored with G present"));
- clone = FALSE;
+ cloneit = FALSE;
}
if ((attr & SHF_GROUP) != 0 && *input_line_pointer == ',')
{
@@ -1063,7 +1063,7 @@ obj_elf_section (int push)
attr &= ~SHF_GROUP;
}
- if (clone)
+ if (cloneit)
{
const char *now_group = elf_group_name (now_seg);
if (now_group != NULL)
@@ -0,0 +1,22 @@
Upstream-Status: Inappropriate [embedded specific]
don't let the distro compiler point to the wrong installation location
Thanks to RP for helping find the source code causing the issue.
2010/08/13
Nitin A Kamble <nitin.a.kamble@intel.com>
Index: binutils-2.22/libiberty/Makefile.in
===================================================================
--- binutils-2.22.orig/libiberty/Makefile.in
+++ binutils-2.22/libiberty/Makefile.in
@@ -350,7 +350,8 @@ install-strip: install
# multilib-specific flags, it's overridden by FLAGS_TO_PASS from the
# default multilib, so we have to take CFLAGS into account as well,
# since it will be passed the multilib flags.
-MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
+#MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
+MULTIOSDIR = ""
install_to_libdir: all
${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR)
$(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,39 @@
Upstream-Status: Inappropriate [embedded specific]
Enabling sysroot support in libtool exposed a bug where the final
library had an RPATH encoded into it which still pointed to the
sysroot. This works around the issue until it gets sorted out
upstream.
Fix suggested by Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Index: binutils-2.22/ltmain.sh
===================================================================
--- binutils-2.22.orig/ltmain.sh
+++ binutils-2.22/ltmain.sh
@@ -8035,9 +8035,11 @@ EOF
test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
for libdir in $rpath; do
if test -n "$hardcode_libdir_flag_spec"; then
+ func_replace_sysroot "$libdir"
+ libdir=$func_replace_sysroot_result
+ func_stripname '=' '' "$libdir"
+ libdir=$func_stripname_result
if test -n "$hardcode_libdir_separator"; then
- func_replace_sysroot "$libdir"
- libdir=$func_replace_sysroot_result
if test -z "$hardcode_libdirs"; then
hardcode_libdirs="$libdir"
else
@@ -8770,6 +8772,10 @@ EOF
hardcode_libdirs=
for libdir in $compile_rpath $finalize_rpath; do
if test -n "$hardcode_libdir_flag_spec"; then
+ func_replace_sysroot "$libdir"
+ libdir=$func_replace_sysroot_result
+ func_stripname '=' '' "$libdir"
+ libdir=$func_stripname_result
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
hardcode_libdirs="$libdir"
@@ -0,0 +1,39 @@
require binutils.inc
PR = "r3"
LIC_FILES_CHKSUM="\
file://src-release;endline=17;md5=4830a9ef968f3b18dd5e9f2c00db2d35\
file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
"
SRC_URI = "\
${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2 \
file://binutils-uclibc-100-uclibc-conf.patch \
file://binutils-uclibc-300-001_ld_makefile_patch.patch \
file://binutils-uclibc-300-006_better_file_error.patch \
file://binutils-uclibc-300-012_check_ldrunpath_length.patch \
file://binutils-uclibc-gas-needs-libm.patch \
file://binutils-x86_64_i386_biarch.patch \
file://libtool-2.4-update.patch \
file://binutils-2.19.1-ld-sysroot.patch \
file://libiberty_path_fix.patch \
file://binutils-poison.patch \
file://libtool-rpath-fix.patch \
file://clone-shadow.patch \
file://binutils-powerpc-e5500.patch \
"
SRC_URI[md5sum] = "ee0f10756c84979622b992a4a61ea3f5"
SRC_URI[sha256sum] = "6c7af8ed1c8cf9b4b9d6e6fe09a3e1d3d479fe63984ba8b9b26bf356b6313ca9"
BBCLASSEXTEND = "native"
@@ -0,0 +1,25 @@
require binutils.inc
DEFAULT_PREFERENCE = "-1"
SRC_URI = "\
http://www.codesourcery.com/gnu_toolchains/arm/portal/package2553/public/arm-none-eabi/arm-2008q1-126-arm-none-eabi.src.tar.bz2 \
file://binutils-2.16.91.0.6-objcopy-rename-errorcode.patch \
file://binutils-uclibc-100-uclibc-conf.patch \
file://110-arm-eabi-conf.patch \
file://binutils-uclibc-300-001_ld_makefile_patch.patch \
file://binutils-uclibc-300-006_better_file_error.patch \
file://binutils-uclibc-300-012_check_ldrunpath_length.patch \
file://docs_hack2.patch \
"
PV = "2.18+csl-arm-2008q1-126"
S = "${WORKDIR}/binutils-stable"
do_unpack2() {
cd ${WORKDIR}
tar -xvjf ./arm-2008q1-126-arm-none-eabi/binutils-2008q1-126.tar.bz2
}
addtask unpack2 after do_unpack before do_patch
@@ -0,0 +1,591 @@
Upstream-Status: Pending
#
# 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 <inttypes.h> 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 <inttypes.h>
+#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 <inttypes.h> 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 <drepper@cygnus.com>, 1995.
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+
+AC_DEFUN([AM_LC_MESSAGES],
+[
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [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 <locale.h> 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 <inttypes.h> 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 <inttypes.h> and <stdint.h> 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 <features.h>
+#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 <stdint.h> exists,
+# doesn't clash with <sys/types.h>, 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 <sys/types.h>
+#include <stdint.h>],
+ [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 <stdint.h> exists, doesn't clash with <sys/types.h>,
+ 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 <inttypes.h> exists,
+# doesn't clash with <sys/types.h>, 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 <sys/types.h>
+#include <inttypes.h>],
+ [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 <inttypes.h> exists, doesn't clash with <sys/types.h>,
+ 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 <langinfo.h>],
+ [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 <langinfo.h> 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 <stdlib.h>
+#include <signal.h>
+
+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 <glib.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+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, &micro) != 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 <glib.h>
+#include <stdio.h>
+], [ 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 <inttypes.h> exists and doesn't clash with
+# <sys/types.h>.
+
+AC_DEFUN([gt_HEADER_INTTYPES_H],
+[
+ AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
+ [
+ AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <inttypes.h>],
+ [], 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 <inttypes.h> exists and doesn't clash with <sys/types.h>.])
+ 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"])
+ ]
+)
@@ -0,0 +1,20 @@
Upstream-Status: Inappropriate [embedded specific]
help2man is looking at the generated binary for help output. This does not work for cross compilations. So taking out the local PREPATH (../src) directory from path so that help2 man can find the native version of the bison in the native sysroot directory.
Date: 2010/06/28
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
Index: bison-2.4.2/doc/Makefile.am
===================================================================
--- bison-2.4.2.orig/doc/Makefile.am
+++ bison-2.4.2/doc/Makefile.am
@@ -77,7 +77,7 @@ PREPATH = $(top_builddir)/src
(cd $$dir && $(MAKE) $(AM_MAKEFLAGS) $$program) || exit; \
done
@echo "Updating man page $@"
- PATH="$(PREPATH)$(PATH_SEPARATOR)$$PATH"; \
+# PATH="$(PREPATH)$(PATH_SEPARATOR)$$PATH";
export PATH; \
$(HELP2MAN) \
--include=$*.x \
@@ -0,0 +1,414 @@
Upstream-Status: Pending
#
# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
#
Index: bison-2.4.2/m4/lcmessage.m4
===================================================================
--- /dev/null
+++ bison-2.4.2/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 <drepper@cygnus.com>, 1995.
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+
+AC_DEFUN([AM_LC_MESSAGES],
+[
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [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 <locale.h> file defines LC_MESSAGES.])
+ fi
+])
Index: bison-2.4.2/m4/uintmax_t.m4
===================================================================
--- /dev/null
+++ bison-2.4.2/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 <inttypes.h> 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 <inttypes.h> and <stdint.h> don't define.])
+ fi
+])
Index: bison-2.4.2/m4/ulonglong.m4
===================================================================
--- /dev/null
+++ bison-2.4.2/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
+])
Index: bison-2.4.2/m4/intdiv0.m4
===================================================================
--- /dev/null
+++ bison-2.4.2/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 <stdlib.h>
+#include <signal.h>
+
+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.])
+])
Index: bison-2.4.2/m4/glib.m4
===================================================================
--- /dev/null
+++ bison-2.4.2/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 <glib.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+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, &micro) != 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 <glib.h>
+#include <stdio.h>
+], [ 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
+])
Index: bison-2.4.2/m4/isc-posix.m4
===================================================================
--- /dev/null
+++ bison-2.4.2/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"])
+ ]
+)
@@ -0,0 +1,34 @@
SUMMARY = "GNU Project parser generator (yacc replacement)."
DESCRIPTION = "Bison is a general-purpose parser generator that converts an annotated context-free grammar into \
an LALR(1) or GLR parser for that grammar. Bison is upward compatible with Yacc: all properly-written Yacc \
grammars ought to work with Bison with no change. Anyone familiar with Yacc should be able to use Bison with \
little trouble."
HOMEPAGE = "http://www.gnu.org/software/bison/"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
SECTION = "devel"
DEPENDS = "bison-native flex-native"
PR = "r1"
BASE_SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.gz \
file://bison-2.3_m4.patch"
SRC_URI = "${BASE_SRC_URI}"
SRC_URI[md5sum] = "22327efdd5080e2b1acb6e560a04b43a"
SRC_URI[sha256sum] = "52f78aa4761a74ceb7fdf770f3554dd84308c3b93c4255e3a5c17558ecda293e"
DEPENDS_virtclass-native = "gettext-native"
SRC_URI_virtclass-native = "${BASE_SRC_URI}"
inherit autotools gettext
acpaths = "-I ${S}/m4"
do_install_append_virtclass-native() {
create_wrapper ${D}/${bindir}/bison \
M4=${STAGING_BINDIR_NATIVE}/m4 \
BISON_PKGDATADIR=${STAGING_DATADIR_NATIVE}/bison
}
#bison-native encodes the staging M4 path
BBCLASSEXTEND = "native"
@@ -0,0 +1,36 @@
SUMMARY = "GNU Project parser generator (yacc replacement)."
DESCRIPTION = "Bison is a general-purpose parser generator that converts an annotated context-free grammar into \
an LALR(1) or GLR parser for that grammar. Bison is upward compatible with Yacc: all properly-written Yacc \
grammars ought to work with Bison with no change. Anyone familiar with Yacc should be able to use Bison with \
little trouble."
HOMEPAGE = "http://www.gnu.org/software/bison/"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
SECTION = "devel"
DEPENDS = "bison-native flex-native"
PR = "r1"
BASE_SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.gz \
file://m4.patch \
"
SRC_URI = "${BASE_SRC_URI} \
file://fix_cross_manpage_building.patch "
SRC_URI[md5sum] = "687e1dcd29452789d34eaeea4c25abe4"
SRC_URI[sha256sum] = "722def46e4a19a5b7a579ef30db1965f86c37c1a20a5f0113743a2e4399f7c99"
DEPENDS_virtclass-native = "gettext-minimal-native"
SRC_URI_virtclass-native = "${BASE_SRC_URI}"
inherit autotools gettext
acpaths = "-I ${S}/m4"
do_install_append_virtclass-native() {
create_wrapper ${D}/${bindir}/bison \
M4=${STAGING_BINDIR_NATIVE}/m4 \
BISON_PKGDATADIR=${STAGING_DATADIR_NATIVE}/bison
}
#bison-native encodes the staging M4 path
BBCLASSEXTEND = "native"
@@ -0,0 +1,36 @@
Upstream-Status: Pending
Fix makefile for multithreaded (make -j ) building.
btrfsctl.c
| i586-poky-linux-gcc -m32 -march=i586 --sysroot=/intel/poky/builds/world/tmp/sysroots/qemux86 -Wp,-MMD,./.btrfsctl.o.d,-MT,btrfsctl.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c btrfsctl.c
| btrfsctl.c:37:21: fatal error: version.h: No such file or directory
| compilation terminated.
| btrfslabel.c:40:21: fatal error: version.h: No such file or directory
| compilation terminated.
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/01/02
Index: git/Makefile
===================================================================
--- git.orig/Makefile
+++ git/Makefile
@@ -26,14 +26,13 @@ else
check = ls
endif
-.c.o:
+%.o: %.c version.h
$(check) $<
$(CC) $(DEPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c $<
+all: $(progs) manpages
-all: version $(progs) manpages
-
-version:
+version.h: version.sh
bash version.sh
btrfs: $(objects) btrfs.o btrfs_cmds.o scrub.o
@@ -0,0 +1,31 @@
Nitin A Kamble <nitin.a.kamble@intel.com> 2011/06/09
Upstream-Status: Pending
Avoid these kinds of errors while doing cross build:
| ccache i586-poky-linux-gcc -march=i586 --sysroot=/disk0/pokybuild/build0/tmp/sysroots/qemux86 -Wp,-MMD,./.btrfsctl.o.d,-MT,btrfsctl.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c btrfsctl.c
| gcc -O2 -pipe -g -feliminate-unused-debug-types -o btrfsctl btrfsctl.o ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o root-tree.o dir-item.o file-item.o inode-item.o inode-map.o crc32c.o rbtree.o extent-cache.o extent_io.o volumes.o utils.o btrfs-list.o -Wl,-O1 -Wl,--as-needed -luuid
| /usr/bin/ld: i386 architecture of input file `btrfsctl.o' is incompatible with i386:x86-64 output
| /usr/bin/ld: i386 architecture of input file `ctree.o' is incompatible with i386:x86-64 output
Index: git/Makefile
===================================================================
--- git.orig/Makefile
+++ git/Makefile
@@ -41,13 +41,13 @@ btrfs: $(objects) btrfs.o btrfs_cmds.o s
$(objects) $(LDFLAGS) $(LIBS)
calc-size: $(objects) calc-size.o
- gcc $(CFLAGS) -o calc-size calc-size.o $(objects) $(LDFLAGS) $(LIBS)
+ $(CC) $(CFLAGS) -o calc-size calc-size.o $(objects) $(LDFLAGS) $(LIBS)
find-root: $(objects) find-root.o
- gcc $(CFLAGS) -o find-root find-root.o $(objects) $(LDFLAGS) $(LIBS)
+ $(CC) $(CFLAGS) -o find-root find-root.o $(objects) $(LDFLAGS) $(LIBS)
restore: $(objects) restore.o
- gcc $(CFLAGS) -o restore restore.o $(objects) $(LDFLAGS) $(LIBS) $(RESTORE_LIBS)
+ $(CC) $(CFLAGS) -o restore restore.o $(objects) $(LDFLAGS) $(LIBS) $(RESTORE_LIBS)
btrfsctl: $(objects) btrfsctl.o
$(CC) $(CFLAGS) -o btrfsctl btrfsctl.o $(objects) $(LDFLAGS) $(LIBS)
@@ -0,0 +1,31 @@
Upstream-Status: Pending
Allow mandir to be set from the environment, fixing the following packaging warnings:
WARNING: For recipe btrfs-tools, the following files were installed but not shipped in any package:
WARNING: /usr/man/man8/btrfs-show.8.gz
WARNING: /usr/man/man8/btrfs-image.8.gz
WARNING: /usr/man/man8/btrfsctl.8.gz
WARNING: /usr/man/man8/btrfs.8.gz
WARNING: /usr/man/man8/btrfsck.8.gz
WARNING: /usr/man/man8/mkfs.btrfs.8.gz
RP - 5/7/2011
Index: git/man/Makefile
===================================================================
--- git.orig/man/Makefile 2011-07-05 22:03:58.949919067 +0100
+++ git/man/Makefile 2011-07-05 22:04:07.789919856 +0100
@@ -2,9 +2,9 @@
INSTALL= install
prefix ?= /usr/local
-bindir = $(prefix)/bin
-mandir = $(prefix)/man
-man8dir = $(mandir)/man8
+bindir ?= $(prefix)/bin
+mandir ?= $(prefix)/man
+man8dir ?= $(mandir)/man8
MANPAGES = mkfs.btrfs.8.gz btrfsctl.8.gz btrfsck.8.gz btrfs-image.8.gz \
btrfs-show.8.gz btrfs.8.gz
@@ -0,0 +1,32 @@
SUMMARY = "Checksumming Copy on Write Filesystem utilities"
DESCRIPTION = "Btrfs is a new copy on write filesystem for Linux aimed at \
implementing advanced features while focusing on fault tolerance, repair and \
easy administration. \
This package contains utilities (mkfs, fsck, btrfsctl) used to work with \
btrfs and an utility (btrfs-convert) to make a btrfs filesystem from an ext3."
HOMEPAGE = "https://btrfs.wiki.kernel.org"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
SECTION = "base"
DEPENDS = "util-linux attr"
SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git;protocol=git;tag=fdb6c0402337d9607c7a39155088eaf033742752;branch=master"
S = "${WORKDIR}/git"
PR = "r6"
SRC_URI += " file://fix_use_of_gcc.patch \
file://weak-defaults.patch \
file://fix_race_condition_with_multithreaded_make.patch "
SRC_URI[md5sum] = "78b1700d318de8518abfaab71f99a885"
SRC_URI[sha256sum] = "1285774e0cb72984fac158dd046c8d405324754febd30320cd31e459253e4b65"
do_install () {
oe_runmake 'DESTDIR=${D}' install
}
BBCLASSEXTEND = "native"
@@ -0,0 +1,16 @@
SUMMARY = "a fast C/C++ compiler cache"
DESCRIPTION = "ccache is a compiler cache. It speeds up recompilation \
by caching the result of previous compilations and detecting when the \
same compilation is being done again. Supported languages are C, C\+\+, \
Objective-C and Objective-C++."
HOMEPAGE = "http://ccache.samba.org"
SECTION = "devel"
LICENSE = "GPLv3+"
SRC_URI = "http://samba.org/ftp/ccache/ccache-${PV}.tar.gz"
inherit autotools
BBCLASSEXTEND = "native"
TARGET_CC_ARCH += "${LDFLAGS}"
@@ -0,0 +1,8 @@
require ccache.inc
PR = "r0"
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=80e92ec45d4fca91f127864fb9e5d932"
SRC_URI[md5sum] = "e6565e7d6c95d1e35b7a0d67e39901e8"
SRC_URI[sha256sum] = "59f58bb73f00db5bbff36b8eb530d3000c86b3110e34cf8dba9e2a5d19eb684f"
@@ -0,0 +1,236 @@
This patch fixes collisions between locally defined functions
and glibc's fexecve() and getline() functions.
Upstream-Status: Inappropriate [Other]
Upstream no longer maintains a GPL version of this utility.
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Index: cdrtools-2.01/include/schily.h
===================================================================
--- cdrtools-2.01.orig/include/schily.h 2009-06-18 11:30:45.000000000 +0100
+++ cdrtools-2.01/include/schily.h 2009-06-18 11:31:22.000000000 +0100
@@ -108,7 +108,7 @@
/* 6th arg not const, fexecv forces av[ac] = NULL */
extern int fexecv __PR((const char *, FILE *, FILE *, FILE *, int,
char **));
-extern int fexecve __PR((const char *, FILE *, FILE *, FILE *,
+extern int fexecve_schily __PR((const char *, FILE *, FILE *, FILE *,
char * const *, char * const *));
extern int fspawnv __PR((FILE *, FILE *, FILE *, int, char * const *));
extern int fspawnl __PR((FILE *, FILE *, FILE *,
@@ -187,7 +187,7 @@
extern char *findbytes __PR((const void *, int, char));
extern int findline __PR((const char *, char, const char *,
int, char **, int));
-extern int getline __PR((char *, int));
+extern int getline_schily __PR((char *, int));
extern int getstr __PR((char *, int));
extern int breakline __PR((char *, char, char **, int));
extern int getallargs __PR((int *, char * const**, const char *, ...));
Index: cdrtools-2.01/libscg/scsitransp.c
===================================================================
--- cdrtools-2.01.orig/libscg/scsitransp.c 2009-06-18 11:33:57.000000000 +0100
+++ cdrtools-2.01/libscg/scsitransp.c 2009-06-18 11:34:24.000000000 +0100
@@ -323,7 +323,7 @@
js_printf("%s", msg);
flush();
- if (getline(okbuf, sizeof (okbuf)) == EOF)
+ if (getline_schily(okbuf, sizeof (okbuf)) == EOF)
exit(EX_BAD);
if (streql(okbuf, "y") || streql(okbuf, "yes") ||
streql(okbuf, "Y") || streql(okbuf, "YES"))
Index: cdrtools-2.01/libschily/fexec.c
===================================================================
--- cdrtools-2.01.orig/libschily/fexec.c 2009-06-18 11:29:29.000000000 +0100
+++ cdrtools-2.01/libschily/fexec.c 2009-06-18 11:30:36.000000000 +0100
@@ -159,7 +159,7 @@
} while (p != NULL);
va_end(args);
- ret = fexecve(name, in, out, err, av, env);
+ ret = fexecve_schily(name, in, out, err, av, env);
if (av != xav)
free(av);
return (ret);
@@ -173,11 +173,11 @@
char *av[];
{
av[ac] = NULL; /* force list to be null terminated */
- return (fexecve(name, in, out, err, av, environ));
+ return (fexecve_schily(name, in, out, err, av, environ));
}
EXPORT int
-fexecve(name, in, out, err, av, env)
+fexecve_schily(name, in, out, err, av, env)
const char *name;
FILE *in, *out, *err;
char * const av[], * const env[];
Index: cdrtools-2.01/libschily/stdio/fgetline.c
===================================================================
--- cdrtools-2.01.orig/libschily/stdio/fgetline.c 2009-06-18 11:28:14.000000000 +0100
+++ cdrtools-2.01/libschily/stdio/fgetline.c 2009-06-18 11:28:55.000000000 +0100
@@ -64,7 +64,7 @@
}
EXPORT int
-getline(buf, len)
+getline_schily(buf, len)
char *buf;
int len;
{
Index: cdrtools-2.01/readcd/io.c
===================================================================
--- cdrtools-2.01.orig/readcd/io.c 2009-06-18 11:33:57.000000000 +0100
+++ cdrtools-2.01/readcd/io.c 2009-06-18 11:34:38.000000000 +0100
@@ -138,7 +138,7 @@
(*prt)(s, *lp, mini, maxi, dp);
flush();
line[0] = '\0';
- if (getline(line, 80) == EOF)
+ if (getline_schily(line, 80) == EOF)
exit(EX_BAD);
linep = skipwhite(line);
@@ -205,7 +205,7 @@
printf("%r", form, args);
va_end(args);
flush();
- if (getline(okbuf, sizeof(okbuf)) == EOF)
+ if (getline_schily(okbuf, sizeof(okbuf)) == EOF)
exit(EX_BAD);
if (okbuf[0] == '?') {
printf("Enter 'y', 'Y', 'yes' or 'YES' if you agree with the previous asked question.\n");
Index: cdrtools-2.01/readcd/readcd.c
===================================================================
--- cdrtools-2.01.orig/readcd/readcd.c 2009-06-18 11:33:58.000000000 +0100
+++ cdrtools-2.01/readcd/readcd.c 2009-06-18 11:35:03.000000000 +0100
@@ -1651,7 +1651,7 @@
error("Copy from SCSI (%d,%d,%d) disk to file\n",
scg_scsibus(scgp), scg_target(scgp), scg_lun(scgp));
error("Enter filename [%s]: ", defname); flush();
- (void) getline(filename, sizeof (filename));
+ (void) getline_schily(filename, sizeof (filename));
}
if (askrange) {
@@ -1820,7 +1820,7 @@
error("Copy from file to SCSI (%d,%d,%d) disk\n",
scg_scsibus(scgp), scg_target(scgp), scg_lun(scgp));
error("Enter filename [%s]: ", defname); flush();
- (void) getline(filename, sizeof (filename));
+ (void) getline_schily(filename, sizeof (filename));
error("Notice: reading from file always starts at file offset 0.\n");
getlong("Enter starting sector for copy:", &addr, 0L, end-1);
Index: cdrtools-2.01/scgcheck/dmaresid.c
===================================================================
--- cdrtools-2.01.orig/scgcheck/dmaresid.c 2009-06-18 11:33:59.000000000 +0100
+++ cdrtools-2.01/scgcheck/dmaresid.c 2009-06-18 11:35:43.000000000 +0100
@@ -64,7 +64,7 @@
printf("Ready to start test for working DMA residual count? Enter <CR> to continue: ");
fprintf(logfile, "**********> Testing for working DMA residual count.\n");
flushit();
- (void) getline(abuf, sizeof (abuf));
+ (void) getline_schily(abuf, sizeof (abuf));
printf("**********> Testing for working DMA residual count == 0.\n");
fprintf(logfile, "**********> Testing for working DMA residual count == 0.\n");
@@ -95,7 +95,7 @@
printf("Ready to start test for working DMA residual count == DMA count? Enter <CR> to continue: ");
fprintf(logfile, "**********> Testing for working DMA residual count == DMA count.\n");
flushit();
- (void) getline(abuf, sizeof (abuf));
+ (void) getline_schily(abuf, sizeof (abuf));
passed = TRUE;
dmacnt = cnt;
ret = xtinquiry(scgp, 0, dmacnt);
@@ -130,7 +130,7 @@
printf("Ready to start test for working DMA residual count == 1? Enter <CR> to continue: ");
fprintf(logfile, "**********> Testing for working DMA residual count == 1.\n");
flushit();
- (void) getline(abuf, sizeof (abuf));
+ (void) getline_schily(abuf, sizeof (abuf));
passed = TRUE;
dmacnt = cnt+1;
ret = xtinquiry(scgp, cnt, dmacnt);
Index: cdrtools-2.01/scgcheck/scgcheck.c
===================================================================
--- cdrtools-2.01.orig/scgcheck/scgcheck.c 2009-06-18 11:33:59.000000000 +0100
+++ cdrtools-2.01/scgcheck/scgcheck.c 2009-06-18 11:35:31.000000000 +0100
@@ -189,7 +189,7 @@
break;
error("Enter SCSI device name for bus scanning [%s]: ", device);
flushit();
- (void) getline(device, sizeof (device));
+ (void) getline_schily(device, sizeof (device));
if (device[0] == '\0')
strcpy(device, "0,6,0");
@@ -227,7 +227,7 @@
do {
error("Enter SCSI device name [%s]: ", device);
flushit();
- (void) getline(device, sizeof (device));
+ (void) getline_schily(device, sizeof (device));
if (device[0] == '\0')
strcpy(device, "0,6,0");
@@ -256,7 +256,7 @@
printf("Ready to start test for second SCSI open? Enter <CR> to continue: ");
flushit();
- (void) getline(abuf, sizeof (abuf));
+ (void) getline_schily(abuf, sizeof (abuf));
#define CHECK_SECOND_OPEN
#ifdef CHECK_SECOND_OPEN
if (!streql(abuf, "n")) {
@@ -344,7 +344,7 @@
printf("Ready to start test for succeeded command? Enter <CR> to continue: ");
flushit();
- (void) getline(abuf, sizeof (abuf));
+ (void) getline_schily(abuf, sizeof (abuf));
scgp->verbose++;
ret = inquiry(scgp, buf, sizeof (struct scsi_inquiry));
scg_vsetup(scgp);
Index: cdrtools-2.01/scgcheck/sense.c
===================================================================
--- cdrtools-2.01.orig/scgcheck/sense.c 2009-06-18 11:33:58.000000000 +0100
+++ cdrtools-2.01/scgcheck/sense.c 2009-06-18 11:35:54.000000000 +0100
@@ -66,7 +66,7 @@
printf("Ready to start test for failing command? Enter <CR> to continue: ");
fprintf(logfile, "**********> Testing for failed SCSI command.\n");
flushit();
- (void)getline(abuf, sizeof(abuf));
+ (void)getline_schily(abuf, sizeof(abuf));
/* scgp->verbose++;*/
fillbytes(buf, sizeof(struct scsi_inquiry), '\0');
fillbytes((caddr_t)scgp->scmd, sizeof(*scgp->scmd), '\0');
@@ -82,13 +82,13 @@
printf("the test utility. Otherwise remove any medium from the drive.\n");
printf("Ready to start test for failing command? Enter <CR> to continue: ");
flushit();
- (void)getline(abuf, sizeof(abuf));
+ (void)getline_schily(abuf, sizeof(abuf));
ret = test_unit_ready(scgp);
if (ret >= 0 || !scg_cmd_err(scgp)) {
printf("Test Unit Ready did not fail.\n");
printf("Ready to eject tray? Enter <CR> to continue: ");
flushit();
- (void)getline(abuf, sizeof(abuf));
+ (void)getline_schily(abuf, sizeof(abuf));
scsi_unload(scgp, (cdr_t *)0);
ret = test_unit_ready(scgp);
}
@@ -127,7 +127,7 @@
printf("Ready to start test for sense data count? Enter <CR> to continue: ");
fprintf(logfile, "**********> Testing for SCSI sense data count.\n");
flushit();
- (void)getline(abuf, sizeof(abuf));
+ (void)getline_schily(abuf, sizeof(abuf));
printf("Testing if at least CCS_SENSE_LEN (%d) is supported...\n", CCS_SENSE_LEN);
fprintf(logfile, "**********> Testing if at least CCS_SENSE_LEN (%d) is supported...\n", CCS_SENSE_LEN);
ret = sensecount(scgp, CCS_SENSE_LEN);
@@ -0,0 +1,33 @@
Remove hard-coded references to /usr/src/linux/include to avoid
host contamination.
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Index: cdrtools-2.01/DEFAULTS/Defaults.gnu
===================================================================
--- cdrtools-2.01.orig/DEFAULTS/Defaults.gnu 2008-09-22 12:42:12.000000000 +0100
+++ cdrtools-2.01/DEFAULTS/Defaults.gnu 2008-09-22 12:42:27.000000000 +0100
@@ -18,7 +18,7 @@
###########################################################################
CWARNOPTS=
-DEFINCDIRS= $(SRCROOT)/include /usr/src/linux/include
+DEFINCDIRS= $(SRCROOT)/include
LDPATH= -L/opt/schily/lib
RUNPATH= -R $(INS_BASE)/lib -R /opt/schily/lib -R $(OLIBSDIR)
Index: cdrtools-2.01/DEFAULTS/Defaults.linux
===================================================================
--- cdrtools-2.01.orig/DEFAULTS/Defaults.linux 2008-09-22 12:42:08.000000000 +0100
+++ cdrtools-2.01/DEFAULTS/Defaults.linux 2008-09-22 12:42:37.000000000 +0100
@@ -18,7 +18,7 @@
###########################################################################
CWARNOPTS=
-DEFINCDIRS= $(SRCROOT)/include /usr/src/linux/include
+DEFINCDIRS= $(SRCROOT)/include
LDPATH= -L/opt/schily/lib
RUNPATH= -R $(INS_BASE)/lib -R /opt/schily/lib -R $(OLIBSDIR)
@@ -0,0 +1,29 @@
# cdrtools-native OE build file
# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
# Released under the MIT license (see packages/COPYING)
SUMMARY = "A set of tools for CD recording, including cdrecord"
DESCRIPTION = "A set of tools for CD recording, including cdrecord"
HOMEPAGE = "http://cdrecord.berlios.de/private/cdrecord.html"
SECTION = "console/utils"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
PR = "r2"
SRC_URI = "ftp://ftp.berlios.de/pub/cdrecord/cdrtools-${PV}.tar.bz2 \
file://no_usr_src.patch \
file://glibc-conflict-rename.patch"
SRC_URI[md5sum] = "d44a81460e97ae02931c31188fe8d3fd"
SRC_URI[sha256sum] = "728b6175069a77c4d7d92ae60108cbda81fbbf7bc7aa02e25153ccf2092f6c22"
inherit native
STAGE_TEMP = "${WORKDIR}/image-temp"
do_install() {
install -d ${STAGE_TEMP}
make install INS_BASE=${STAGE_TEMP}
install -d ${D}${bindir}/
install ${STAGE_TEMP}/bin/* ${D}${bindir}/
}
@@ -0,0 +1,19 @@
Upstream-Status: Pending
autoconf/automake set docdir automatically, use their value ensuring
doc files are placed into $datadir/doc, not $prefix/doc.
RP 5/7/2011
Index: chrpath-0.13/Makefile.am
===================================================================
--- chrpath-0.13.orig/Makefile.am 2011-07-05 23:40:14.769920254 +0100
+++ chrpath-0.13/Makefile.am 2011-07-05 23:40:19.819920635 +0100
@@ -1,7 +1,5 @@
SUBDIRS = testsuite deb
-docdir = $(prefix)/doc/$(PACKAGE)-$(VERSION)
-
doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README
bin_PROGRAMS = chrpath
@@ -0,0 +1,23 @@
SUMMARY = "Tool to edit rpath in ELF binaries"
DESCRIPTION = "chrpath allows you to change the rpath (where the \
application looks for libraries) in an application. It does not \
(yet) allow you to add an rpath if there isn't one already."
HOMEPAGE = "http://alioth.debian.org/projects/chrpath/"
BUGTRACKER = "http://alioth.debian.org/tracker/?atid=412807&group_id=31052"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
PR = "r0"
SRC_URI = "http://alioth.debian.org/frs/download.php/3648/chrpath-${PV}.tar.gz \
file://standarddoc.patch"
SRC_URI[md5sum] = "ea6b212b23393bf58b0ef9bcf6491b86"
SRC_URI[sha256sum] = "a1bc9abc42d2b97efc3a0ced7c5dbed37d5debff600386193750315fa5823eaa"
inherit autotools
# We don't have a staged chrpath-native for ensuring our binary is
# relocatable, so use the one we've just built
CHRPATH_BIN_virtclass-native = "${S}/chrpath"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,7 @@
require cmake.inc
inherit native
PR = "${INC_PR}.1"
SRC_URI[md5sum] = "3c5d32cec0f4c2dc45f4c2e84f4a20c5"
SRC_URI[sha256sum] = "5e18bff75f01656c64f553412a8905527e1b85efaf3163c6fb81ea5aaced0b91"
@@ -0,0 +1,23 @@
# Copyright (C) 2005, Koninklijke Philips Electronics NV. All Rights Reserved
# Released under the MIT license (see packages/COPYING)
DESCRIPTION = "A cross-platform, open-source make system"
HOMEPAGE = "http://www.cmake.org/"
BUGTRACKER = "http://public.kitware.com/Bug/my_view_page.php"
SECTION = "console/utils"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://Copyright.txt;md5=f372516292ff7c33337bf16a74a5f9a8 \
file://Source/cmake.h;beginline=1;endline=10;md5=341736dae83c9e344b53eeb1bc7d7bc2"
INC_PR = "r1"
CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV',1).split('.')[0:2])}"
SRC_URI = "http://www.cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
file://support-oe-qt4-tools-names.patch"
inherit autotools
do_configure () {
./configure --prefix=${prefix}
}
@@ -0,0 +1,22 @@
cmake: don't run cross-binaries on host machine
When doing the cross build we obviously cannot run those binaries on
host since they can be binary incompatible.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
diff -ru cmake-2.8.2.orig/CMakeLists.txt cmake-2.8.2/CMakeLists.txt
--- cmake-2.8.2.orig/CMakeLists.txt 2010-07-28 00:48:42.000000000 +0200
+++ cmake-2.8.2/CMakeLists.txt 2010-07-28 01:05:17.000000000 +0200
@@ -518,7 +518,8 @@
# build the remaining subdirectories
ADD_SUBDIRECTORY(Source)
-ADD_SUBDIRECTORY(Utilities)
+# Come on! Running the cross-binaries on host is not a good idea.
+#ADD_SUBDIRECTORY(Utilities)
ADD_SUBDIRECTORY(Tests)
# add a test
@@ -0,0 +1,100 @@
cmake: support OpenEmbedded Qt4 tool binary names
The FindQt4 module looks for Qt4 binaries to be able to gather the
paths used for compilation and also to be using during other processes
(translation update, translation binary generating and like) however
OpenEmbedded has renamed those to allow old QMake to be used in
parallel with the current one. This patch adds support for the
OpenEmbedded specific binary names.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Index: cmake-2.8.5-rc3/Modules/FindQt4.cmake
===================================================================
--- cmake-2.8.5-rc3.orig/Modules/FindQt4.cmake 2011-06-27 14:41:05.000000000 +0000
+++ cmake-2.8.5-rc3/Modules/FindQt4.cmake 2011-07-08 15:31:58.057170949 +0000
@@ -473,7 +473,7 @@
# check for qmake
# Debian uses qmake-qt4
# macports' Qt uses qmake-mac
-FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 qmake-mac PATHS
+FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake2 qmake4 qmake-qt4 qmake-mac PATHS
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]/bin"
@@ -944,13 +944,13 @@
ENDIF(QT_QMAKE_CHANGED)
FIND_PROGRAM(QT_MOC_EXECUTABLE
- NAMES moc-qt4 moc
+ NAMES moc-qt4 moc4 moc
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_UIC_EXECUTABLE
- NAMES uic-qt4 uic
+ NAMES uic-qt4 uic4 uic
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
@@ -962,49 +962,49 @@
)
FIND_PROGRAM(QT_RCC_EXECUTABLE
- NAMES rcc
+ NAMES rcc4 rcc
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_DBUSCPP2XML_EXECUTABLE
- NAMES qdbuscpp2xml
+ NAMES qdbuscpp2xml4 qdbuscpp2xml
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_DBUSXML2CPP_EXECUTABLE
- NAMES qdbusxml2cpp
+ NAMES qdbusxml2cpp4 qdbusxml2cpp
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_LUPDATE_EXECUTABLE
- NAMES lupdate-qt4 lupdate
+ NAMES lupdate-qt4 lupdate4 lupdate
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_LRELEASE_EXECUTABLE
- NAMES lrelease-qt4 lrelease
+ NAMES lrelease-qt4 lrelease4 lrelease
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_QCOLLECTIONGENERATOR_EXECUTABLE
- NAMES qcollectiongenerator-qt4 qcollectiongenerator
+ NAMES qcollectiongenerator-qt4 qcollectiongenerator4 qcollectiongenerator
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_DESIGNER_EXECUTABLE
- NAMES designer-qt4 designer
+ NAMES designer-qt4 designer4 designer
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_LINGUIST_EXECUTABLE
- NAMES linguist-qt4 linguist
+ NAMES linguist-qt4 linguist4 linguist
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
@@ -0,0 +1,40 @@
require cmake.inc
inherit cmake
DEPENDS += "curl expat zlib libarchive ncurses"
PR = "${INC_PR}.3"
SRC_URI += "file://dont-run-cross-binaries.patch"
SRC_URI[md5sum] = "3c5d32cec0f4c2dc45f4c2e84f4a20c5"
SRC_URI[sha256sum] = "5e18bff75f01656c64f553412a8905527e1b85efaf3163c6fb81ea5aaced0b91"
# Strip ${prefix} from ${docdir}, set result into docdir_stripped
python () {
prefix=d.getVar("prefix", 1)
docdir=d.getVar("docdir", 1)
if not docdir.startswith(prefix):
raise bb.build.FuncFailed('docdir must contain prefix as its prefix')
docdir_stripped = docdir[len(prefix):]
if len(docdir_stripped) > 0 and docdir_stripped[0] == '/':
docdir_stripped = docdir_stripped[1:]
d.setVar("docdir_stripped", docdir_stripped)
}
EXTRA_OECMAKE=" \
-DCMAKE_DOC_DIR=${docdir_stripped}/cmake-${CMAKE_MAJOR_VERSION} \
-DCMAKE_USE_SYSTEM_LIBRARIES=1 \
-DKWSYS_CHAR_IS_SIGNED=1 \
-DBUILD_CursesDialog=0 \
${@base_contains('DISTRO_FEATURES', 'largefile', '-DKWSYS_LFS_WORKS=1', '-DKWSYS_LFS_DISABLE=1', d)} \
"
FILES_${PN} += "${datadir}/cmake-${CMAKE_MAJOR_VERSION}"
FILES_${PN}-doc += "${docdir}/cmake-${CMAKE_MAJOR_VERSION}"
BBCLASSEXTEND = "nativesdk"
@@ -0,0 +1,16 @@
SECTION = "console/utils"
HOMEPAGE = "http://www.freedesktop.org/wiki/Software/desktop-file-utils"
DESCRIPTION = "command line utilities to work with *.desktop files"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
DEPENDS = "glib-2.0-native"
SRC_URI = "http://freedesktop.org/software/desktop-file-utils/releases/desktop-file-utils-${PV}.tar.gz"
inherit autotools native
S = "${WORKDIR}/desktop-file-utils-${PV}"
SRC_URI[md5sum] = "2fe8ebe222fc33cd4a959415495b7eed"
SRC_URI[sha256sum] = "c463d851fb057acd53800cfc4f8ae39dcbcad7f03b4bd547288e95b6de53b022"
@@ -0,0 +1,27 @@
$libdir isn't used by the Makefile at all apart from in this mkdir.
This will be used without any DESTDIR so if your libdir is a different
layout to the bulid system it will cause a failure. E.g:
Build system has /usr/lib only
libdir = /usr/lib64 for the target
Results in "mkdir: cannot create directory `/usr/lib64': Permission denied"
Since the directory is never used, we can just remove the mkdir.
Upstream-Status: Pending
RP 23/9/2011
Index: diffstat-1.54/makefile.in
===================================================================
--- diffstat-1.54.orig/makefile.in 2011-09-22 19:13:11.330158571 +0100
+++ diffstat-1.54/makefile.in 2011-09-22 19:13:35.610158363 +0100
@@ -79,7 +79,7 @@
$(INSTALL_DATA) $(srcdir)/$(THIS).1 $(man1dir)/$(THIS).$(manext)
installdirs :
- mkdir -p $(BINDIR) $(libdir) $(man1dir)
+ mkdir -p $(BINDIR) $(man1dir)
uninstall :
rm -f $(BINDIR)/$(PROG) $(man1dir)/$(THIS).$(manext)
@@ -0,0 +1,26 @@
SUMMARY = "Tool to produce a statistics based on a diff"
DESCRIPTION = "diffstat reads the output of diff and displays a histogram of \
the insertions, deletions, and modifications per-file. It is useful for \
reviewing large, complex patch files."
HOMEPAGE = "http://invisible-island.net/diffstat/"
SECTION = "devel"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://install-sh;endline=42;md5=b3549726c1022bee09c174c72a0ca4a5"
PR = "r0"
SRC_URI = "ftp://invisible-island.net/diffstat/diffstat-${PV}.tgz \
file://dirfix.patch"
SRC_URI[md5sum] = "630d5278f1cd874dc3cc68cff3fddecf"
SRC_URI[sha256sum] = "59a46c75a99f2c373a81880051adc43a17b71c55478691e702c61c13c6d61b55"
S = "${WORKDIR}/diffstat-${PV}"
inherit autotools gettext
do_configure () {
if [ ! -e acinclude.m4 ]; then
mv aclocal.m4 acinclude.m4
fi
autotools_do_configure
}
@@ -0,0 +1,60 @@
SUMMARY = "A parallel build system"
DESCRIPTION = "distcc is a parallel build system that distributes \
compilation of C/C++/ObjC code across machines on a network."
SECTION = "devel"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
PR = "r7"
DEPENDS = "avahi ${GTKDEP}"
GTKDEP_libc-uclibc = ""
GTKDEP = "gtk+"
RRECOMMENDS_${PN} = "avahi-daemon"
# Upstream change this patch periodically so store locally
# http://0pointer.de/public/distcc-avahi.patch
SRC_URI = "http://distcc.googlecode.com/files/${BPN}-${PV}.tar.bz2 \
file://distcc-avahi.patch \
file://makefile-param-order.patch \
file://default \
file://distccmon-gnome.desktop \
file://distcc"
SRC_URI[md5sum] = "0d6b80a1efc3a3d816c4f4175f63eaa2"
SRC_URI[sha256sum] = "6500f1bc2a30b1f044ebed79c6ce15457d1712263e65f0db7d6046af262ba434"
inherit autotools pkgconfig update-rc.d
INITSCRIPT_NAME = "distcc"
EXTRA_OECONF = "--with-gtk"
EXTRA_OECONF_libc-uclibc = "--without-gtk --without-gnome"
do_install_append() {
install -d ${D}${sysconfdir}/init.d/
install -d ${D}${sysconfdir}/default
install -m 0755 ${WORKDIR}/distcc ${D}${sysconfdir}/init.d/
install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/distcc
${DESKTOPINSTALL}
}
DESKTOPINSTALL = ""
DESKTOPINSTALL_libc-glibc () {
install -d ${D}${datadir}/distcc/
install -m 0644 ${WORKDIR}/distccmon-gnome.desktop ${D}${datadir}/distcc/
}
PACKAGES += "distcc-distmon-gnome"
FILES_${PN} = " ${sysconfdir} \
${bindir}/distcc \
${bindir}/distccd \
${bindir}/distccmon-text"
FILES_distcc-distmon-gnome = " ${bindir}/distccmon-gnome \
${datadir}/distcc"
pkg_postinst_${PN} () {
if test "x$D" != "x"; then
exit 1
else
grep distcc /etc/passwd || adduser --system --home /dev/null --no-create-home --empty-password --ingroup nogroup distcc
fi
}
@@ -0,0 +1,19 @@
# Defaults for distcc initscript
# sourced by /etc/init.d/distcc
#
# should distcc be started on boot?
#
# STARTDISTCC="true"
STARTDISTCC="true"
#
# Which networks/hosts should be allowed to connect to the daemon?
# You can list multiple hosts/networks separated by spaces.
# Networks have to be in CIDR notation, f.e. 192.168.1.0/24
# Hosts are represented by a single IP Adress
#
# ALLOWEDNETS="127.0.0.1"
ALLOWEDNETS="192.168.7.0/24"
+106
View File
@@ -0,0 +1,106 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: distcc
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 1
# Short-Description: simple distributed compiler client and server
### END INIT INFO
#
# distccd Debian init.d script contributed by Jason Thomas. (Debian #161136)
#
# skeleton example file to build /etc/init.d/ scripts.
# This file should be used to construct scripts for /etc/init.d.
#
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
# Modified for Debian GNU/Linux
# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
#
# Version: @(#)skeleton 1.9.1 08-Apr-2002 miquels@cistron.nl
#
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/distccd
NAME=distcc
DESC="Distributed Compiler Daemon"
DAEMON_ARGS="--pid-file=/var/run/$NAME.pid --daemon"
# please change those variables by overriding them in /etc/defaults/distcc
ALLOWEDNETS="127.0.0.1"
# Reads config file (will override defaults above)
[ -r /etc/default/distcc ] && . /etc/default/distcc
test -x $DAEMON || exit 0
set -e
# construct access list
ALLOW=""
for net in $ALLOWEDNETS
do
ALLOW="$ALLOW --allow $net"
done
should_start() {
if [ "$STARTDISTCC" != "true" ] && [ "$STARTDISTCC" != "YES" ]; then
echo "STARTDISTCC is set to false in /etc/default/distcc"
echo "$DAEMON not starting"
exit 0
fi
}
case "$1" in
start)
should_start
echo -n "Starting $DESC: $NAME"
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
--exec $DAEMON -- $DAEMON_ARGS $ALLOW ||
{
code=$?
echo "$0: start failed with error code $code" >&2
exit $code
}
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME"
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
--exec $DAEMON ||
{
code=$?
echo "$0: stop failed with error code $code" >&2
exit $code
}
echo "."
;;
restart|force-reload)
#
# If the "reload" option is implemented, move the "force-reload"
# option to the "reload" entry above. If not, "force-reload" is
# just the same as "restart".
#
echo -n "Restarting $DESC: $NAME"
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
--exec $DAEMON
sleep 1
should_start
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
--exec $DAEMON -- $DAEMON_ARGS $ALLOW ||
{
code=$?
echo "$0: restart failed with error code $code" >&2
exit $code
}
echo "."
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,12 @@
[Desktop Entry]
Version=0.9.4
Exec=distccmon-gnome
Name=distcc monitor
GenericName=Distributed Compile Monitor
Comment=Graphical view of distributed compile tasks
Icon=distccmon-gnome-icon
TryExec=distccmon-gnome
Terminal=false
Type=Application
Categories=GNOME;Development;
StartupNotify=true
@@ -0,0 +1,20 @@
distcc: Put the "-lLIB" parameter in the end of the gcc command.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Upstream-Status: Pending
diff -ruN distcc-2.18.3-orig/Makefile.in distcc-2.18.3/Makefile.in
--- distcc-2.18.3-orig/Makefile.in 2011-07-25 16:43:21.000000000 +0800
+++ distcc-2.18.3/Makefile.in 2011-07-25 16:45:39.000000000 +0800
@@ -378,8 +378,8 @@
distccmon-gnome@EXEEXT@: $(mon_obj) $(gnome_obj)
$(CC) -o $@ $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(LIBS) \
- $(GNOME_CFLAGS) $(GNOME_LIBS) \
- $(mon_obj) $(gnome_obj)
+ $(GNOME_CFLAGS) \
+ $(mon_obj) $(gnome_obj) $(GNOME_LIBS)
## Dist targets
@@ -0,0 +1,60 @@
SUMMARY = "DSSSL stylesheets used to transform SGML and XML DocBook files"
DESCRIPTION = "DSSSL stylesheets used to transform SGML and XML DocBook files"
HOMEPAGE= "http://docbook.sourceforge.net"
# Simple persmissive
LICENSE = "DSSSL"
LIC_FILES_CHKSUM = "file://README;beginline=41;endline=74;md5=875385159b2ee76ecf56136ae7f542d6"
DEPENDS = "sgml-common-native"
PR = "r4"
SRC_URI = "${SOURCEFORGE_MIRROR}/docbook/docbook-dsssl-${PV}.tar.bz2"
SRC_URI[md5sum] = "bc192d23266b9a664ca0aba4a7794c7c"
SRC_URI[sha256sum] = "2f329e120bee9ef42fbdd74ddd60e05e49786c5a7953a0ff4c680ae6bdf0e2bc"
S = "${WORKDIR}/docbook-dsssl-${PV}"
inherit native
SSTATEPOSTINSTFUNCS += "docbook_dsssl_stylesheets_sstate_postinst"
SYSROOT_PREPROCESS_FUNCS += "docbook_dsssl_sysroot_preprocess"
do_install () {
# Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/docbook-dsssl.html
# for details.
install -d ${D}${bindir}
install -m 0755 bin/collateindex.pl ${D}${bindir}
install -d ${D}${datadir}/sgml/docbook/dsssl-stylesheets-${PV}
install -m 0644 catalog ${D}${datadir}/sgml/docbook/dsssl-stylesheets-${PV}
cp -v -R * ${D}${datadir}/sgml/docbook/dsssl-stylesheets-${PV}
install -d ${D}${sysconfdir}/sgml
echo "CATALOG ${datadir}/sgml/docbook/dsssl-stylesheets-${PV}/catalog" > \
${D}${sysconfdir}/sgml/dsssl-docbook-stylesheets.cat
echo "CATALOG ${datadir}/sgml/docbook/dsssl-stylesheets-${PV}/common/catalog" >> \
${D}${sysconfdir}/sgml/dsssl-docbook-stylesheets.cat
}
docbook_dsssl_stylesheets_sstate_postinst () {
if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
then
# Ensure that the catalog file sgml-docbook.cat is properly
# updated when the package is installed from sstate cache.
${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-docbook-dsssl \
--add ${sysconfdir}/sgml/sgml-docbook.bak \
${sysconfdir}/sgml/dsssl-docbook-stylesheets.cat
${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-docbook-dsssl \
--add ${sysconfdir}/sgml/sgml-docbook.cat \
${sysconfdir}/sgml/dsssl-docbook-stylesheets.cat
fi
}
docbook_dsssl_sysroot_preprocess () {
install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
install -m 755 ${STAGING_BINDIR_NATIVE}/install-catalog ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-docbook-dsssl
}
@@ -0,0 +1,23 @@
require docbook-sgml-dtd-native.inc
LICENSE = "OASIS"
LIC_FILES_CHKSUM = "file://LICENSE-OASIS;md5=c608985dd5f7f215e669e7639a0b1d2e"
DTD_VERSION = "3.1"
PR = "${INC_PR}.0"
# Note: the upstream sources are not distributed with a license file.
# LICENSE-OASIS is included as a "patch" to workaround this. When
# upgrading this recipe, please verify whether this is still needed.
SRC_URI = "http://www.docbook.org/sgml/3.1/docbk31.zip \
file://LICENSE-OASIS"
SRC_URI[md5sum] = "432749c0c806dbae81c8bcb70da3b5d3"
SRC_URI[sha256sum] = "20261d2771b9a052abfa3d8fab1aa62be05791a010281c566f9073bf0e644538"
do_compile() {
# Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/sgml-dtd-3.html
# for details.
sed -i -e '/ISO 8879/d' -e 's|DTDDECL "-//OASIS//DTD DocBook V3.1//EN"|SGMLDECL|g' docbook.cat
}
@@ -0,0 +1,23 @@
require docbook-sgml-dtd-native.inc
LICENSE = "OASIS"
LIC_FILES_CHKSUM = "file://LICENSE-OASIS;md5=c608985dd5f7f215e669e7639a0b1d2e"
DTD_VERSION = "4.1"
PR = "${INC_PR}.0"
# Note: the upstream sources are not distributed with a license file.
# LICENSE-OASIS is included as a "patch" to workaround this. When
# upgrading this recipe, please verify whether this is still needed.
SRC_URI = "http://docbook.org/sgml/4.1/docbk41.zip \
file://LICENSE-OASIS"
SRC_URI[md5sum] = "489f6ff2a2173eb1e14216c10533ede2"
SRC_URI[sha256sum] = "deaafcf0a3677692e7ad4412c0e41c1db3e9da6cdcdb3dd32b2cc1f9c97d6311"
do_compile() {
# Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/sgml-dtd.html
# for details.
sed -i -e '/ISO 8879/d' -e '/gml/d' docbook.cat
}
@@ -0,0 +1,17 @@
require docbook-sgml-dtd-native.inc
LICENSE = "OASIS"
LIC_FILES_CHKSUM = "file://LICENSE-OASIS;md5=c608985dd5f7f215e669e7639a0b1d2e"
DTD_VERSION = "4.5"
PR = "${INC_PR}.0"
SRC_URI[md5sum] = "07c581f4bbcba6d3aac85360a19f95f7"
SRC_URI[sha256sum] = "8043e514e80c6c19cb146b5d37937d1305bf3abf9b0097c36df7f70f611cdf43"
do_compile() {
# Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/sgml-dtd.html
# for details.
sed -i -e '/ISO 8879/d' -e'/gml/d' docbook.cat
}
@@ -0,0 +1,60 @@
# The DTDs of the various versions have to be installed in parallel and
# should not replace each other. The installation step is common for
# all versions and just differs in ${DTD_VERSION} which is set in each
# version recipe.
#
# The DTDs do have some quirks (see LFS documentation).
SUMMARY = "Document type definitions for verification of SGML data files"
DESCRIPTION = "Document type definitions for verification of SGML data \
files against the DocBook rule set"
HOMEPAGE = "http://www.docbook.org/sgml/"
DEPENDS = "sgml-common-native"
# Note: the upstream sources are not distributed with a license file.
# LICENSE-OASIS is included as a "patch" to workaround this. When
# upgrading this recipe, please verify whether this is still needed.
SRC_URI = "http://www.docbook.org/sgml/${DTD_VERSION}/docbook-${DTD_VERSION}.zip \
file://LICENSE-OASIS"
# The .zip file extracts to the current dir
S = "${WORKDIR}"
INC_PR = "r3"
SSTATEPOSTINSTFUNCS += "docbook_sgml_dtd_sstate_postinst"
SYSROOT_PREPROCESS_FUNCS += "docbook_sgml_dtd_sysroot_preprocess"
inherit native
do_install () {
# Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/sgml-dtd.html
# for details.
install -d -m 755 ${D}${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION}
install docbook.cat ${D}${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION}/catalog
cp -PpRr *.dtd *.mod *.dcl ${D}${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION}
install -d ${D}${sysconfdir}/sgml
echo "CATALOG ${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION}/catalog" > \
${D}${sysconfdir}/sgml/sgml-docbook-dtd-${DTD_VERSION}.cat
}
docbook_sgml_dtd_sstate_postinst () {
if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
then
# Ensure that the catalog file sgml-docbook.cat is properly
# updated when the package is installed from sstate cache.
${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-docbook-sgml-dtd-${DTD_VERSION} \
--add ${sysconfdir}/sgml/sgml-docbook.bak \
${sysconfdir}/sgml/sgml-docbook-dtd-${DTD_VERSION}.cat
${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-docbook-sgml-dtd-${DTD_VERSION} \
--add ${sysconfdir}/sgml/sgml-docbook.cat \
${sysconfdir}/sgml/sgml-docbook-dtd-${DTD_VERSION}.cat
fi
}
docbook_sgml_dtd_sysroot_preprocess () {
install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
install -m 755 ${STAGING_BINDIR_NATIVE}/install-catalog ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-docbook-sgml-dtd-${DTD_VERSION}
}
@@ -0,0 +1,16 @@
Permission to use, copy, modify and distribute the DocBook XML DTD
and its accompanying documentation for any purpose and without fee
is hereby granted in perpetuity, provided that the above copyright
notice and this paragraph appear in all copies. The copyright
holders make no representation about the suitability of the DTD for
any purpose. It is provided "as is" without expressed or implied
warranty.
If you modify the DocBook DTD in any way, except for declaring and
referencing additional sets of general entities and declaring
additional notations, label your DTD as a variant of DocBook. See
the maintenance documentation for more information.
Please direct all questions, bug reports, or suggestions for
changes to the docbook@lists.oasis-open.org mailing list. For more
information, see http://www.oasis-open.org/docbook/.
@@ -0,0 +1,50 @@
SUMMARY = "Utilities for formatting and manipulating DocBook documents"
DESCRIPTION = "A collection of all the free software tools you need to \
work on and format DocBook documents."
HOMEPAGE = "http://sources.redhat.com/docbook-tools/"
SECTION = "console/utils"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
DEPENDS = "openjade-native sgmlspl-native docbook-dsssl-stylesheets-native docbook-sgml-dtd-3.1-native"
PR = "r1"
SRC_URI = "ftp://sources.redhat.com/pub/docbook-tools/new-trials/SOURCES/docbook-utils-${PV}.tar.gz"
SRC_URI[md5sum] = "6b41b18c365c01f225bc417cf632d81c"
SRC_URI[sha256sum] = "48faab8ee8a7605c9342fb7b906e0815e3cee84a489182af38e8f7c0df2e92e9"
inherit autotools native
do_configure_prepend() {
# Fix hard-coded references to /etc/sgml
sed -i -e "s|/etc/sgml|${sysconfdir}/sgml|g" bin/jw.in
sed -i -e "s|/etc/sgml|${sysconfdir}/sgml|g" doc/man/Makefile.am
sed -i -e "s|/etc/sgml|${sysconfdir}/sgml|g" doc/HTML/Makefile.am
# Point jw to the native sysroot catalog
sed -i -e 's|^SGML_EXTRA_CATALOGS=""|SGML_EXTRA_CATALOGS=":${sysconfdir}/sgml/catalog"|g' bin/jw.in
}
do_install() {
install -d ${D}${bindir}
# Install the binaries and a bunch of other commonly used names for them.
for doctype in html ps dvi man pdf rtf tex texi txt
do
install -m 0755 ${S}/bin/docbook2$doctype ${D}${bindir}/
ln -sf docbook2x-$doctype ${D}${bindir}/db2$doctype
ln -sf docbook2$doctype ${D}${bindir}/db2$doctype
ln -sf docbook2$doctype ${D}${bindir}/docbook-to-$doctype
done
install -m 0755 ${S}/bin/jw ${D}${bindir}/
for i in backends/dvi backends/html backends/man \
backends/pdf backends/ps backends/rtf backends/tex \
backends/texi backends/txt frontends/docbook \
helpers/docbook2man-spec.pl helpers/docbook2texi-spec.pl \
docbook-utils.dsl
do
install -d ${D}${datadir}/sgml/docbook/utils-${PV}/`dirname $i`
install ${S}/$i ${D}${datadir}/sgml/docbook/utils-${PV}/$i
done
}
@@ -0,0 +1,38 @@
The problem is that unsigned char[2] is
guranteed to be 8Bit aligned on arm
but unsigned short is/needs to be 16bit aligned
the union { unsigned short; unsigned char[2] } trick
didn't work so no we use the alpha hack.
memcpy into an 16bit aligned
-zecke
Upstream-Status: Inappropriate [licensing]
We're tracking an old release of dosfstools due to licensing issues.
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
--- dosfstools/dosfsck/boot.c.orig 2003-05-15 19:32:23.000000000 +0200
+++ dosfstools/dosfsck/boot.c 2003-06-13 17:44:25.000000000 +0200
@@ -36,17 +36,15 @@
{ 0xff, "5.25\" 320k floppy 2s/40tr/8sec" },
};
-#if defined __alpha || defined __ia64__ || defined __s390x__ || defined __x86_64__ || defined __ppc64__
+
/* Unaligned fields must first be copied byte-wise */
#define GET_UNALIGNED_W(f) \
({ \
unsigned short __v; \
memcpy( &__v, &f, sizeof(__v) ); \
- CF_LE_W( *(unsigned short *)&f ); \
+ CF_LE_W( *(unsigned short *)&__v ); \
})
-#else
-#define GET_UNALIGNED_W(f) CF_LE_W( *(unsigned short *)&f )
-#endif
+
static char *get_media_descr( unsigned char media )
@@ -0,0 +1,37 @@
Ensure the __s8 type is properly defined.
Upstream-Status: Inappropriate [licensing]
We're tracking an old release of dosfstools due to licensing issues.
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
--- dosfstools-2.10/dosfsck/dosfsck.h.org 2006-02-21 08:36:14.000000000 -0700
+++ dosfstools-2.10/dosfsck/dosfsck.h 2006-02-21 08:40:12.000000000 -0700
@@ -22,6 +22,14 @@
#undef __KERNEL__
#endif
+#ifndef __s8
+#include <asm/types.h>
+#endif
+
+#ifndef __ASM_STUB_BYTEORDER_H__
+#include <asm/byteorder.h>
+#endif
+
#include <linux/msdos_fs.h>
/* 2.1 kernels use le16_to_cpu() type functions for CF_LE_W & Co., but don't
--- dosfstools-2.10/dosfsck/file.c.org 2006-02-21 08:37:36.000000000 -0700
+++ dosfstools-2.10/dosfsck/file.c 2006-02-21 08:37:47.000000000 -0700
@@ -23,6 +23,10 @@
#undef __KERNEL__
#endif
+#ifndef __s8
+#include <asm/types.h>
+#endif
+
#include <linux/msdos_fs.h>
#include "common.h"
@@ -0,0 +1,489 @@
Upstream-Status: Inappropriate
This patch fixes populated dosfs image creation with directory
structures. Earlier it was causing segfault; and only image
population with no subdirectories was working.
Issues fixed:
1. (dir->count == dir->entries) check was only needed for root
directory entries. And this check is wrong for non-root
directories.
2. For each dir entry 2 dir->table entries were needed, one for
the file/dir and 2nd for long file name support. Earlier long
name support was added for filenames but the 2nd entry
allocation, initialization & counting was missed.
3. The memory clearing was missed at the code path after dir->table
memroy allocation.
4. Add entries for . & .. directories in all non-root directories.
5. The . directory points to the correct entry in fat now.
6. All directoriy entries' size was not zero as required for dosfsck,
Now all directory entries' size is zero.
Enhancements:
1. Added support for long names for directory names. This is same
as the existing long name support for filenames.
2. Added error messages for previously silent memory allocation and
other errors.
3. -d options does not work correctly with fat32, so now throwing
an error for that.
4. Use predefined structures from kernel's msdos_fs.h file, rather
than defining again here. And accordingly change the names & use
of structure variables.
Outstanding Issues:
1. The .. directory entry do not point to the parent of current
directory. This issue can be fixed by running dosfsck -a after
image creation.
2. For files the filesize is correct, but the clusters size is more
than it needs to be, this also can be fixed by running dosfsck -a
after image creation.
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2011/12/13
Index: dosfstools-2.11/mkdosfs/mkdosfs.c
===================================================================
--- dosfstools-2.11.orig/mkdosfs/mkdosfs.c
+++ dosfstools-2.11/mkdosfs/mkdosfs.c
@@ -21,7 +21,17 @@
June 2004 - Jordan Crouse (info.linux@amd.com)
Added -d <directory> support to populate the image
Copyright (C) 2004, Advanced Micro Devices, All Rights Reserved
-
+
+ 2011-12-13: Nitin A Kamble <nitin.a.kamble@intel.com>
+ Enhanced the -d <directory> support for population of image while
+ creation. Earlier subdirectores support was broken, only files in
+ the rootdir were supported. Now directory hirarchy is supported.
+ Also added long filename support to directory names.
+ The -d <directory> option (image population while creation)
+ is broken with fat32.
+ Copyright (C) 2011, Intel Corporation, All Rights Reserved
+
+
Fixes/additions May 1998 by Roman Hodek
<Roman.Hodek@informatik.uni-erlangen.de>:
- Atari format support
@@ -86,23 +96,23 @@
# undef __KERNEL__
#endif
-#if __BYTE_ORDER == __BIG_ENDIAN
-
+#ifndef __ASM_STUB_BYTEORDER_H__
#include <asm/byteorder.h>
-#ifdef __le16_to_cpu
-/* ++roman: 2.1 kernel headers define these function, they're probably more
- * efficient then coding the swaps machine-independently. */
-#define CF_LE_W __le16_to_cpu
-#define CF_LE_L __le32_to_cpu
-#define CT_LE_W __cpu_to_le16
-#define CT_LE_L __cpu_to_le32
-#else
-#define CF_LE_W(v) ((((v) & 0xff) << 8) | (((v) >> 8) & 0xff))
-#define CF_LE_L(v) (((unsigned)(v)>>24) | (((unsigned)(v)>>8)&0xff00) | \
- (((unsigned)(v)<<8)&0xff0000) | ((unsigned)(v)<<24))
+#endif
+
+#include <linux/msdos_fs.h>
+
+#undef CF_LE_W
+#undef CF_LE_L
+#undef CT_LE_W
+#undef CT_LE_L
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+#include <byteswap.h>
+#define CF_LE_W(v) bswap_16(v)
+#define CF_LE_L(v) bswap_32(v)
#define CT_LE_W(v) CF_LE_W(v)
#define CT_LE_L(v) CF_LE_L(v)
-#endif /* defined(__le16_to_cpu) */
#else
@@ -253,33 +263,6 @@ struct fat32_fsinfo {
__u32 reserved2[4];
};
-/* This stores up to 13 chars of the name */
-
-struct msdos_dir_slot {
- __u8 id; /* sequence number for slot */
- __u8 name0_4[10]; /* first 5 characters in name */
- __u8 attr; /* attribute byte */
- __u8 reserved; /* always 0 */
- __u8 alias_checksum; /* checksum for 8.3 alias */
- __u8 name5_10[12]; /* 6 more characters in name */
- __u16 start; /* starting cluster number, 0 in long slots */
- __u8 name11_12[4]; /* last 2 characters in name */
-};
-
-struct msdos_dir_entry
- {
- char name[8], ext[3]; /* name and extension */
- __u8 attr; /* attribute bits */
- __u8 lcase; /* Case for base and extension */
- __u8 ctime_ms; /* Creation time, milliseconds */
- __u16 ctime; /* Creation time */
- __u16 cdate; /* Creation date */
- __u16 adate; /* Last access date */
- __u16 starthi; /* high 16 bits of first cl. (FAT32) */
- __u16 time, date, start; /* time, date and first cluster */
- __u32 size; /* file size (in bytes) */
- } __attribute__ ((packed));
-
/* The "boot code" we put into the filesystem... it writes a message and
tells the user to try again */
@@ -356,7 +339,6 @@ static struct msdos_dir_entry *root_dir;
static int size_root_dir; /* Size of the root directory in bytes */
static int sectors_per_cluster = 0; /* Number of sectors per disk cluster */
static int root_dir_entries = 0; /* Number of root directory entries */
-static int root_dir_num_entries = 0;
static int last_cluster_written = 0;
static char *blank_sector; /* Blank sector - all zeros */
@@ -1315,7 +1297,7 @@ setup_tables (void)
de->date = CT_LE_W((unsigned short)(ctime->tm_mday +
((ctime->tm_mon+1) << 5) +
((ctime->tm_year-80) << 9)));
- de->ctime_ms = 0;
+ de->ctime_cs = 0;
de->ctime = de->time;
de->cdate = de->date;
de->adate = de->date;
@@ -1451,16 +1433,23 @@ write_tables (void)
/* Add a file to the specified directory entry, and also write it into the image */
-static void copy_filename(char *filename, char *base, char *ext) {
+static void copy_filename(char *filename, char *dos_name) {
char *ch = filename;
int i, len;
- memset(base, 0x20, 8);
- memset(ext, 0x20, 3);
+ if (!strcmp(filename, ".")) {
+ strncpy(dos_name, MSDOS_DOT, MSDOS_NAME);
+ return;
+ }
+ if (!strcmp(filename, "..")) {
+ strncpy(dos_name, MSDOS_DOTDOT, MSDOS_NAME);
+ return;
+ }
+ memset(dos_name, 0x20, MSDOS_NAME);
for(len = 0 ; *ch && *ch != '.'; ch++) {
- base[len++] = toupper(*ch);
+ dos_name[len++] = toupper(*ch);
if (len == 8) break;
}
@@ -1468,7 +1457,7 @@ static void copy_filename(char *filename
if (*ch) ch++;
for(len = 0 ; *ch; ch++) {
- ext[len++] = toupper(*ch);
+ dos_name[8 + len++] = toupper(*ch);
if (len == 3) break;
}
}
@@ -1551,7 +1540,7 @@ static int add_file(char *filename, stru
int start;
int usedsec, totalsec;
- char name83[8], ext83[3];
+ char dos_name[MSDOS_NAME+1];
struct msdos_dir_slot *slot;
int i;
@@ -1562,23 +1551,22 @@ static int add_file(char *filename, stru
if (dir->root) {
if (dir->count == dir->entries) {
printf("Error - too many directory entries\n");
+ return;
}
}
else {
- if (dir->count == dir->entries) {
- if (!dir->table)
- dir->table =
- (struct msdos_dir_entry *) malloc(sizeof(struct msdos_dir_entry));
- else {
- dir->table =
- (struct msdos_dir_entry *) realloc(dir->table, (dir->entries + 1) *
- sizeof(struct msdos_dir_entry));
-
- memset(&dir->table[dir->entries], 0, sizeof(struct msdos_dir_entry));
- }
-
- dir->entries++;
- }
+ /* 2 entries, one extra for long filename */
+ if (!dir->table)
+ dir->table =
+ (struct msdos_dir_entry *) malloc(2 * sizeof(struct msdos_dir_entry));
+ else
+ dir->table =
+ (struct msdos_dir_entry *) realloc(dir->table, 2 * (dir->entries + 1) *
+ sizeof(struct msdos_dir_entry));
+ if (!dir->table)
+ printf("Error - realloc failed\n");
+ memset(&dir->table[dir->entries], 0, 2 * sizeof(struct msdos_dir_entry));
+ dir->entries += 2;
}
infile = open(filename, O_RDONLY, 0);
@@ -1611,13 +1599,13 @@ static int add_file(char *filename, stru
return -1;
}
- printf("ADD %s\n", filename);
+ printf("ADD FILE %s\n", filename);
/* Grab the basename of the file */
base = basename(filename);
- /* Extract out the 8.3 name */
- copy_filename(base, name83, ext83);
+ /* convert for dos fat structure */
+ copy_filename(base, dos_name);
/* Make an extended name slot */
@@ -1629,12 +1617,9 @@ static int add_file(char *filename, stru
slot->alias_checksum = 0;
- for(i = 0; i < 8; i++)
- slot->alias_checksum = (((slot->alias_checksum&1)<<7)|((slot->alias_checksum&0xfe)>>1)) + name83[i];
+ for(i = 0; i < MSDOS_NAME; i++)
+ slot->alias_checksum = (((slot->alias_checksum&1)<<7)|((slot->alias_checksum&0xfe)>>1)) + dos_name[i];
- for(i = 0; i < 3; i++)
- slot->alias_checksum = (((slot->alias_checksum&1)<<7)|((slot->alias_checksum&0xfe)>>1)) + ext83[i];
-
p = base;
copy_name(slot->name0_4, 10, &p);
@@ -1645,8 +1630,7 @@ static int add_file(char *filename, stru
/* Get the entry from the root filesytem */
entry = &dir->table[dir->count++];
- strncpy(entry->name, name83, 8);
- strncpy(entry->ext, ext83, 3);
+ strncpy(entry->name, dos_name, MSDOS_NAME);
/* If the user has it read only, then add read only to the incoming
@@ -1665,7 +1649,7 @@ static int add_file(char *filename, stru
((ctime->tm_mon+1) << 5) +
((ctime->tm_year-80) << 9)));
- entry->ctime_ms = 0;
+ entry->ctime_cs = 0;
entry->ctime = entry->time;
entry->cdate = entry->date;
entry->adate = entry->date;
@@ -1711,6 +1695,7 @@ static int add_file(char *filename, stru
exit_add:
if (infile) close(infile);
+ return 0;
}
/* Add a new directory to the specified directory entry, and in turn populate
@@ -1727,10 +1712,18 @@ static void add_directory(char *filename
struct dirent *dentry = 0;
int remain;
char *data;
+ char *base;
+ char dos_name[MSDOS_NAME+1];
+ struct msdos_dir_slot *slot;
+ int i;
+ char *p;
/* If the directory doesn't exist */
- if (!rddir) return;
-
+ if (!rddir) {
+ printf("Error - dir does not exist: %s\n", filename);
+ return;
+ }
+
if (dir->root) {
if (dir->count == dir->entries) {
printf("Error - too many directory entries\n");
@@ -1738,28 +1731,58 @@ static void add_directory(char *filename
}
}
else {
- if (dir->count == dir->entries) {
- if (!dir->table)
- dir->table = (struct msdos_dir_entry *) malloc(sizeof(struct msdos_dir_entry));
- else {
- dir->table = (struct msdos_dir_entry *) realloc(dir->table, (dir->entries + 1) *
- sizeof(struct msdos_dir_entry));
-
- /* Zero it out to avoid issues */
- memset(&dir->table[dir->entries], 0, sizeof(struct msdos_dir_entry));
- }
- dir->entries++;
+ /* 2 entries, one extra for long name of the directory */
+ if (!dir->table)
+ dir->table = (struct msdos_dir_entry *) malloc(2 * sizeof(struct msdos_dir_entry));
+ else
+ dir->table = (struct msdos_dir_entry *) realloc(dir->table, 2 * (dir->entries + 1) *
+ sizeof(struct msdos_dir_entry));
+ if (!dir->table) {
+ printf("Error - memory allocation failed\n");
+ goto exit_add_dir;
}
+ /* Zero it out to avoid issues */
+ memset(&dir->table[dir->entries], 0, 2 * sizeof(struct msdos_dir_entry));
+ dir->entries += 2;
}
+ printf("ADD DIR %s\n", filename);
/* Now, create a new directory entry for the new directory */
newdir = (struct dir_entry *) calloc(1, sizeof(struct dir_entry));
- if (!newdir) goto exit_add_dir;
+ if (!newdir) {
+ printf("Error - calloc failed\n");
+ goto exit_add_dir;
+ }
+
+ /* Grab the basename of the file */
+ base = basename(filename);
+
+ /* convert for dos structure */
+ copy_filename(base, dos_name);
+
+ /* Make an extended name slot */
+ slot = (struct msdos_dir_slot *) &dir->table[dir->count++];
+ slot->id = 'A';
+ slot->attr = 0x0F;
+ slot->reserved = 0;
+ slot->start = 0;
+
+ slot->alias_checksum = 0;
+ for (i = 0; i < MSDOS_NAME; i++)
+ slot->alias_checksum = (((slot->alias_checksum&1)<<7)|((slot->alias_checksum&0xfe)>>1)) + dos_name[i];
+
+ p = base;
+
+ copy_name(slot->name0_4, 10, &p);
+ copy_name(slot->name5_10, 12, &p);
+ copy_name(slot->name11_12, 4, &p);
+
+ /* Get the entry from the root filesytem */
entry = &dir->table[dir->count++];
- strncpy(entry->name, basename(filename), sizeof(entry->name));
-
+ strncpy(entry->name, dos_name, MSDOS_NAME);
+
entry->attr = ATTR_DIR;
ctime = localtime(&create_time);
@@ -1770,25 +1793,32 @@ static void add_directory(char *filename
((ctime->tm_mon+1) << 5) +
((ctime->tm_year-80) << 9)));
- entry->ctime_ms = 0;
+ entry->ctime_cs = 0;
entry->ctime = entry->time;
entry->cdate = entry->date;
entry->adate = entry->date;
/* Now, read the directory */
- while((dentry = readdir(rddir))) {
+
+ while((base[0] != '.') && (dentry = readdir(rddir))) {
struct stat st;
char *buffer;
-
- if (!strcmp(dentry->d_name, ".") || !strcmp(dentry->d_name, ".."))
- continue;
- /* DOS wouldn't like a typical unix . (dot) file, so we skip those too */
- if (dentry->d_name[0] == '.') continue;
+ if (dentry->d_name[0] == '.') {
+ /* dos also has . & .. directory entries */
+ if (! ((!strcmp(dentry->d_name, ".")) || (!strcmp(dentry->d_name, "..")))) {
+ /* ignore other .* files */
+ printf("Error - File/Dir name is not dos compatible, ignored: %s\n", dentry->d_name);
+ continue;
+ }
+ }
buffer = malloc(strlen(filename) + strlen(dentry->d_name) + 3);
- if (!buffer) continue;
+ if (!buffer) {
+ printf("Error - malloc failed\n");
+ goto exit_add_dir;
+ }
sprintf(buffer, "%s/%s", filename, dentry->d_name);
if (!stat(buffer, &st)) {
@@ -1806,11 +1836,23 @@ static void add_directory(char *filename
/* Now that the entire directory has been written, go ahead and write the directory
entry as well */
+ entry->size = 0; /* a directory has zero size */
+
+ if (base[0] == '.') { /* . & .. point to parent's cluster */
+ goto exit_add_dir;
+ }
+
entry->start = CT_LE_W(last_cluster_written);
entry->starthi = CT_LE_W((last_cluster_written & 0xFFFF0000) >> 16);
- entry->size = newdir->count * sizeof(struct msdos_dir_entry);
+
+/* . dir start points to parent */
+ newdir->table[1].start = entry->start;
+/* .. dir points to parent of parent*/
+/* .. dir start is not set yet, would need more changes to the code,
+ * but dosfsck can fix these .. entry start pointers correctly */
+
+ remain = newdir->count * sizeof(struct msdos_dir_entry);
- remain = entry->size;
data = (char *) newdir->table;
while(remain) {
@@ -1858,6 +1900,7 @@ static void add_root_directory(char *dir
if (!newdir) {
closedir(dir);
+ printf("Error - calloc failed!\n");
return;
}
@@ -1877,7 +1920,10 @@ static void add_root_directory(char *dir
if (entry->d_name[0] == '.') continue;
buffer = malloc(strlen(dirname) + strlen(entry->d_name) + 3);
- if (!buffer) continue;
+ if (!buffer) {
+ printf("Error - malloc failed!\n");
+ continue;
+ }
sprintf(buffer, "%s/%s", dirname, entry->d_name);
if (!stat(buffer, &st)) {
@@ -2245,6 +2291,9 @@ main (int argc, char **argv)
if (check && listfile) /* Auto and specified bad block handling are mutually */
die ("-c and -l are incompatible"); /* exclusive of each other! */
+ if (dirname && (size_fat == 32))
+ die ("-d is incompatible with FAT32");
+
if (!create) {
check_mount (device_name); /* Is the device already mounted? */
dev = open (device_name, O_RDWR); /* Is it a suitable device to build the FS on? */
@@ -0,0 +1,22 @@
mkdsofs is using types of the style __u8, which it gets with some
versions of libc headers via linux/hdreg.h including asm/types.h.
Newer version of fedora (at least) have a hdreg.h whichdoes not
include asm/types.h. To work around this patch mkdosfs.c to explicity
include linux/types.h which will in turn pull in asm/types.h which
defines these variables.
Upstream-Status: Inappropriate [licensing]
We're tracking an old release of dosfstools due to licensing issues.
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
--- dosfstools-2.10/mkdosfs/mkdosfs.c~ 2006-07-12 18:46:21.000000000 +1000
+++ dosfstools-2.10/mkdosfs/mkdosfs.c 2006-07-12 18:46:21.000000000 +1000
@@ -60,6 +60,7 @@
#include "../version.h"
#include <fcntl.h>
+#include <linux/types.h>
#include <linux/hdreg.h>
#include <linux/fs.h>
#include <linux/fd.h>
@@ -0,0 +1,241 @@
Add option to read in bootcode from a file.
Upstream-Status: Inappropriate [licensing]
We're tracking an old release of dosfstools due to licensing issues.
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Index: dosfstools-2.11/mkdosfs/ChangeLog
===================================================================
--- dosfstools-2.11.orig/mkdosfs/ChangeLog 1997-06-18 10:09:38.000000000 +0000
+++ dosfstools-2.11/mkdosfs/ChangeLog 2011-12-06 12:14:23.634011558 +0000
@@ -1,3 +1,14 @@
+19th June 2003 Sam Bingner (sam@bingner.com)
+
+ Added option to read in bootcode from a file so that if you have
+ for example Windows 2000 boot code, you can have it write that
+ as the bootcode. This is a dump of the behinning of a partition
+ generally 512 bytes, but can be up to reserved sectors*512 bytes.
+ Also writes 0x80 as the BIOS drive number if we are formatting a
+ hard drive, and sets the number of hidden sectors to be the
+ number of sectors in one track. These were required so that DOS
+ could boot using the bootcode.
+
28th January 1995 H. Peter Anvin (hpa@yggdrasil.com)
Better algorithm to select cluster sizes on large filesystems.
Index: dosfstools-2.11/mkdosfs/mkdosfs.8
===================================================================
--- dosfstools-2.11.orig/mkdosfs/mkdosfs.8 2004-02-25 19:36:07.000000000 +0000
+++ dosfstools-2.11/mkdosfs/mkdosfs.8 2011-12-06 12:19:54.777888434 +0000
@@ -44,6 +44,10 @@
.I message-file
]
[
+.B \-B
+.I bootcode-file
+]
+[
.B \-n
.I volume-name
]
@@ -165,6 +169,18 @@
carriage return-line feed combinations, and tabs have been expanded.
If the filename is a hyphen (-), the text is taken from standard input.
.TP
+.BI \-B " bootcode-file"
+Uses boot machine code from file "file". On any thing other than FAT32,
+this only writes the first 3 bytes, and 480 bytes from offset 3Eh. On
+FAT32, this writes the first 3 bytes, 420 bytes from offset 5Ah to both
+primary and backup boot sectors. Also writes all other reserved sectors
+excluding the sectors following boot sectors (usually sector 2 and 7).
+Does not require that the input file be as large as reserved_sectors*512.
+To make a FAT32 partition bootable, you will need at least the first
+13 sectors (6656 bytes). You can also specify a partition as the argument
+to clone the boot code from that partition.
+i.e mkdosfs -B /dev/sda1 /dev/sda1
+.TP
.BI \-n " volume-name"
Sets the volume name (label) of the filesystem. The volume name can
be up to 11 characters long. The default is no label.
@@ -198,8 +214,9 @@
simply will not support it ;)
.SH AUTHOR
Dave Hudson - <dave@humbug.demon.co.uk>; modified by Peter Anvin
-<hpa@yggdrasil.com>. Fixes and additions by Roman Hodek
-<roman@hodek.net> for Debian/GNU Linux.
+<hpa@yggdrasil.com> and Sam Bingner <sam@bingner.com>. Fixes and
+additions by Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
+for Debian/GNU Linux.
.SH ACKNOWLEDGEMENTS
.B mkdosfs
is based on code from
Index: dosfstools-2.11/mkdosfs/mkdosfs.c
===================================================================
--- dosfstools-2.11.orig/mkdosfs/mkdosfs.c 2005-03-12 16:12:16.000000000 +0000
+++ dosfstools-2.11/mkdosfs/mkdosfs.c 2011-12-06 12:27:55.121886076 +0000
@@ -24,6 +24,12 @@
- New options -A, -S, -C
- Support for filesystems > 2GB
- FAT32 support
+
+ Fixes/additions June 2003 by Sam Bingner
+ <sam@bingner.com>:
+ - Add -B option to read in bootcode from a file
+ - Write BIOS drive number so that FS can properly boot
+ - Set number of hidden sectors before boot code to be one track
Copying: Copyright 1993, 1994 David Hudson (dave@humbug.demon.co.uk)
@@ -153,6 +159,8 @@
#define FAT_BAD 0x0ffffff7
#define MSDOS_EXT_SIGN 0x29 /* extended boot sector signature */
+#define HD_DRIVE_NUMBER 0x80 /* Boot off first hard drive */
+#define FD_DRIVE_NUMBER 0x00 /* Boot off first floppy drive */
#define MSDOS_FAT12_SIGN "FAT12 " /* FAT12 filesystem signature */
#define MSDOS_FAT16_SIGN "FAT16 " /* FAT16 filesystem signature */
#define MSDOS_FAT32_SIGN "FAT32 " /* FAT32 filesystem signature */
@@ -175,6 +183,8 @@
#define BOOTCODE_SIZE 448
#define BOOTCODE_FAT32_SIZE 420
+#define MAX_RESERVED 0xFFFF
+
/* __attribute__ ((packed)) is used on all structures to make gcc ignore any
* alignments */
@@ -202,7 +212,7 @@
__u16 fat_length; /* sectors/FAT */
__u16 secs_track; /* sectors per track */
__u16 heads; /* number of heads */
- __u32 hidden; /* hidden sectors (unused) */
+ __u32 hidden; /* hidden sectors (one track) */
__u32 total_sect; /* number of sectors (if sectors == 0) */
union {
struct {
@@ -285,6 +295,8 @@
/* Global variables - the root of all evil :-) - see these and weep! */
+static char *template_boot_code; /* Variable to store a full template boot sector in */
+static int use_template = 0;
static char *program_name = "mkdosfs"; /* Name of the program */
static char *device_name = NULL; /* Name of the device on which to create the filesystem */
static int atari_format = 0; /* Use Atari variation of MS-DOS FS format */
@@ -837,6 +849,12 @@
vi->volume_id[2] = (unsigned char) ((volume_id & 0x00ff0000) >> 16);
vi->volume_id[3] = (unsigned char) (volume_id >> 24);
}
+ if (bs.media == 0xf8) {
+ vi->drive_number = HD_DRIVE_NUMBER; /* Set bios drive number to 80h */
+ }
+ else {
+ vi->drive_number = FD_DRIVE_NUMBER; /* Set bios drive number to 00h */
+ }
if (!atari_format) {
memcpy(vi->volume_label, volume_name, 11);
@@ -1362,6 +1380,32 @@
* dir area on FAT12/16, and the first cluster on FAT32. */
writebuf( (char *) root_dir, size_root_dir, "root directory" );
+ if (use_template == 1) {
+ /* dupe template into reserved sectors */
+ seekto( 0, "Start of partition" );
+ if (size_fat == 32) {
+ writebuf( template_boot_code, 3, "backup jmpBoot" );
+ seekto( 0x5a, "sector 1 boot area" );
+ writebuf( template_boot_code+0x5a, 420, "sector 1 boot area" );
+ seekto( 512*2, "third sector" );
+ if (backup_boot != 0) {
+ writebuf( template_boot_code+512*2, backup_boot*sector_size - 512*2, "data to backup boot" );
+ seekto( backup_boot*sector_size, "backup boot sector" );
+ writebuf( template_boot_code, 3, "backup jmpBoot" );
+ seekto( backup_boot*sector_size+0x5a, "backup boot sector boot area" );
+ writebuf( template_boot_code+0x5a, 420, "backup boot sector boot area" );
+ seekto( (backup_boot+2)*sector_size, "sector following backup code" );
+ writebuf( template_boot_code+(backup_boot+2)*sector_size, (reserved_sectors-backup_boot-2)*512, "remaining data" );
+ } else {
+ writebuf( template_boot_code+512*2, (reserved_sectors-2)*512, "remaining data" );
+ }
+ } else {
+ writebuf( template_boot_code, 3, "jmpBoot" );
+ seekto( 0x3e, "sector 1 boot area" );
+ writebuf( template_boot_code+0x3e, 448, "boot code" );
+ }
+ }
+
if (blank_sector) free( blank_sector );
if (info_sector) free( info_sector );
free (root_dir); /* Free up the root directory space from setup_tables */
@@ -1376,7 +1420,7 @@
{
fatal_error("\
Usage: mkdosfs [-A] [-c] [-C] [-v] [-I] [-l bad-block-file] [-b backup-boot-sector]\n\
- [-m boot-msg-file] [-n volume-name] [-i volume-id]\n\
+ [-m boot-msg-file] [-n volume-name] [-i volume-id] [-B bootcode]\n\
[-s sectors-per-cluster] [-S logical-sector-size] [-f number-of-FATs]\n\
[-h hidden-sectors] [-F fat-size] [-r root-dir-entries] [-R reserved-sectors]\n\
/dev/name [blocks]\n");
@@ -1439,7 +1483,7 @@
printf ("%s " VERSION " (" VERSION_DATE ")\n",
program_name);
- while ((c = getopt (argc, argv, "AbcCf:F:Ii:l:m:n:r:R:s:S:h:v")) != EOF)
+ while ((c = getopt (argc, argv, "AbcCf:F:Ii:l:m:n:r:R:s:S:v:B:")) != EOF)
/* Scan the command line for options */
switch (c)
{
@@ -1509,6 +1553,51 @@
listfile = optarg;
break;
+ case 'B': /* B : read in bootcode */
+ if ( strcmp(optarg, "-") )
+ {
+ msgfile = fopen(optarg, "r");
+ if ( !msgfile )
+ perror(optarg);
+ }
+ else
+ msgfile = stdin;
+
+ if ( msgfile )
+ {
+ if (!(template_boot_code = malloc( MAX_RESERVED )))
+ die( "Out of memory" );
+ /* The template boot sector including reserved must not be > 65535 */
+ use_template = 1;
+ i = 0;
+ do
+ {
+ ch = getc(msgfile);
+ switch (ch)
+ {
+ case EOF:
+ break;
+
+ default:
+ template_boot_code[i++] = ch; /* Store character */
+ break;
+ }
+ }
+ while ( ch != EOF && i < MAX_RESERVED );
+ ch = getc(msgfile); /* find out if we're at EOF */
+
+ /* Fill up with zeros */
+ while( i < MAX_RESERVED )
+ template_boot_code[i++] = '\0';
+
+ if ( ch != EOF )
+ printf ("Warning: template too long; truncated after %d bytes\n", i);
+
+ if ( msgfile != stdin )
+ fclose(msgfile);
+ }
+ break;
+
case 'm': /* m : Set boot message */
if ( strcmp(optarg, "-") )
{

Some files were not shown because too many files have changed in this diff Show More