recipes: Move out stale GPLv2 versions to a seperate layer

These are recipes where the upstream has moved to GPLv3 and these old
versions are the last ones under the GPLv2 license.

There are several reasons for making this move. There is a different
quality of service with these recipes in that they don't get security
fixes and upstream no longer care about them, in fact they're actively
hostile against people using old versions. The recipes tend to need a
different kind of maintenance to work with changes in the wider ecosystem
and there needs to be isolation between changes made in the v3 versions
and those in the v2 versions.

There are probably better ways to handle a "non-GPLv3" system but right
now having these in OE-Core makes them look like a first class citizen
when I believe they have potential for a variety of undesireable issues.

Moving them into a separate layer makes their different needs clearer, it
also makes it clear how many of these there are. Some are probably not
needed (e.g. mc), I also wonder whether some are useful (e.g. gmp)
since most things that use them are GPLv3 only already. Someone could
now more clearly see how to streamline the list of recipes here.

I'm proposing we mmove to this separate layer for 2.3 with its future
maintinership and testing to be determined in 2.4 and beyond.

(From OE-Core rev: 19b7e950346fb1dde6505c45236eba6cd9b33b4b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2017-03-02 12:04:08 +00:00
parent c4901328fe
commit 2345af9b48
164 changed files with 0 additions and 33689 deletions

View File

@ -1,21 +0,0 @@
Upstream-Status: Inappropriate [configuration]
---
configure.ac | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: grub-0.97/configure.ac
===================================================================
--- grub-0.97.orig/configure.ac 2008-09-12 17:39:52.000000000 +0200
+++ grub-0.97/configure.ac 2008-09-12 17:40:21.000000000 +0200
@@ -60,8 +60,8 @@ AC_PROG_CC
_AM_DEPENDENCIES(CC)
dnl Because recent automake complains about AS, set it here.
-CCAS="$CC"
-AC_SUBST(CCAS)
+AM_PROG_AS
+AC_SUBST(AS)
AC_ARG_WITH(binutils,
[ --with-binutils=DIR search the directory DIR to find binutils])

View File

@ -1,101 +0,0 @@
Upstream-Status: Inappropriate [No Longer Maintained]
diff -Naur grub-0.97-800/stage2/fsys_ext2fs.c grub-0.97-810/stage2/fsys_ext2fs.c
--- grub-0.97-800/stage2/fsys_ext2fs.c 2008-07-21 00:40:21.668879475 -0600
+++ grub-0.97-810/stage2/fsys_ext2fs.c 2008-07-21 01:01:11.063953773 -0600
@@ -79,7 +79,52 @@
__u32 s_rev_level; /* Revision level */
__u16 s_def_resuid; /* Default uid for reserved blocks */
__u16 s_def_resgid; /* Default gid for reserved blocks */
- __u32 s_reserved[235]; /* Padding to the end of the block */
+ /*
+ * These fields are for EXT2_DYNAMIC_REV superblocks only.
+ *
+ * Note: the difference between the compatible feature set and
+ * the incompatible feature set is that if there is a bit set
+ * in the incompatible feature set that the kernel doesn't
+ * know about, it should refuse to mount the filesystem.
+ *
+ * e2fsck's requirements are more strict; if it doesn't know
+ * about a feature in either the compatible or incompatible
+ * feature set, it must abort and not try to meddle with
+ * things it doesn't understand...
+ */
+ __u32 s_first_ino; /* First non-reserved inode */
+ __u16 s_inode_size; /* size of inode structure */
+ __u16 s_block_group_nr; /* block group # of this superblock */
+ __u32 s_feature_compat; /* compatible feature set */
+ __u32 s_feature_incompat; /* incompatible feature set */
+ __u32 s_feature_ro_compat; /* readonly-compatible feature set */
+ __u8 s_uuid[16]; /* 128-bit uuid for volume */
+ char s_volume_name[16]; /* volume name */
+ char s_last_mounted[64]; /* directory where last mounted */
+ __u32 s_algorithm_usage_bitmap; /* For compression */
+ /*
+ * Performance hints. Directory preallocation should only
+ * happen if the EXT2_FEATURE_COMPAT_DIR_PREALLOC flag is on.
+ */
+ __u8 s_prealloc_blocks; /* Nr of blocks to try to preallocate*/
+ __u8 s_prealloc_dir_blocks; /* Nr to preallocate for dirs */
+ __u16 s_reserved_gdt_blocks;/* Per group table for online growth */
+ /*
+ * Journaling support valid if EXT2_FEATURE_COMPAT_HAS_JOURNAL set.
+ */
+ __u8 s_journal_uuid[16]; /* uuid of journal superblock */
+ __u32 s_journal_inum; /* inode number of journal file */
+ __u32 s_journal_dev; /* device number of journal file */
+ __u32 s_last_orphan; /* start of list of inodes to delete */
+ __u32 s_hash_seed[4]; /* HTREE hash seed */
+ __u8 s_def_hash_version; /* Default hash version to use */
+ __u8 s_jnl_backup_type; /* Default type of journal backup */
+ __u16 s_reserved_word_pad;
+ __u32 s_default_mount_opts;
+ __u32 s_first_meta_bg; /* First metablock group */
+ __u32 s_mkfs_time; /* When the filesystem was created */
+ __u32 s_jnl_blocks[17]; /* Backup of the journal inode */
+ __u32 s_reserved[172]; /* Padding to the end of the block */
};
struct ext2_group_desc
@@ -218,6 +263,14 @@
#define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (__u32))
#define EXT2_ADDR_PER_BLOCK_BITS(s) (log2(EXT2_ADDR_PER_BLOCK(s)))
+#define EXT2_GOOD_OLD_REV 0 /* The good old (original) format */
+#define EXT2_DYNAMIC_REV 1 /* V2 format w/ dynamic inode sizes */
+#define EXT2_GOOD_OLD_INODE_SIZE 128
+#define EXT2_INODE_SIZE(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \
+ EXT2_GOOD_OLD_INODE_SIZE : \
+ (s)->s_inode_size)
+#define EXT2_INODES_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s)/EXT2_INODE_SIZE(s))
+
/* linux/ext2_fs.h */
#define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
/* kind of from ext2/super.c */
@@ -553,7 +606,7 @@
gdp = GROUP_DESC;
ino_blk = gdp[desc].bg_inode_table +
(((current_ino - 1) % (SUPERBLOCK->s_inodes_per_group))
- >> log2 (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode)));
+ >> log2 (EXT2_INODES_PER_BLOCK (SUPERBLOCK)));
#ifdef E2DEBUG
printf ("inode table fsblock=%d\n", ino_blk);
#endif /* E2DEBUG */
@@ -565,13 +618,12 @@
/* reset indirect blocks! */
mapblock2 = mapblock1 = -1;
- raw_inode = INODE +
- ((current_ino - 1)
- & (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode) - 1));
+ raw_inode = (struct ext2_inode *)((char *)INODE +
+ ((current_ino - 1) & (EXT2_INODES_PER_BLOCK (SUPERBLOCK) - 1)) *
+ EXT2_INODE_SIZE (SUPERBLOCK));
#ifdef E2DEBUG
printf ("ipb=%d, sizeof(inode)=%d\n",
- (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode)),
- sizeof (struct ext2_inode));
+ EXT2_INODES_PER_BLOCK (SUPERBLOCK), EXT2_INODE_SIZE (SUPERBLOCK));
printf ("inode=%x, raw_inode=%x\n", INODE, raw_inode);
printf ("offset into inode table block=%d\n", (int) raw_inode - (int) INODE);
for (i = (unsigned char *) INODE; i <= (unsigned char *) raw_inode;

View File

@ -1,74 +0,0 @@
Upstream-Status: Inappropriate
Subject: [PATCH] grub: fix for automake-1.12
automake 1.12 has depricated automatic de-ANSI-fication support
this patch avoids these kinds of errors:
| stage1/Makefile.am:2: error: 'pkglibdir' is not a legitimate directory for 'DATA'
| stage2/Makefile.am:35: error: 'pkglibdir' is not a legitimate directory for 'DATA'
| stage2/Makefile.am:46: error: 'pkglibdir' is not a legitimate directory for 'DATA'
| autoreconf: automake failed with exit status: 1
| ERROR: autoreconf execution failed.
The upstream status is marked as 'Inappropriate' because this problem is not uncommon,
it has been there for a long time and no change in upstream.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Index: grub-0.97/stage1/Makefile.am
===================================================================
--- a/stage1/Makefile.am
+++ b/stage1/Makefile.am
@@ -1,7 +1,7 @@
-pkglibdir = $(libdir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
-nodist_pkglib_DATA = stage1
+pkgdatadir = $(libdir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
+nodist_pkgdata_DATA = stage1
-CLEANFILES = $(nodist_pkglib_DATA)
+CLEANFILES = $(nodist_pkgdata_DATA)
# We can't use builtins or standard includes.
AM_CCASFLAGS = $(STAGE1_CFLAGS) -fno-builtin -nostdinc
Index: grub-0.97/stage2/Makefile.am
===================================================================
--- a/stage2/Makefile.am
+++ b/stage2/Makefile.am
@@ -27,12 +27,12 @@ libgrub_a_CFLAGS = $(GRUB_CFLAGS) -I$(top_srcdir)/lib \
-DUSE_MD5_PASSWORDS=1 -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1
# Stage 2 and Stage 1.5's.
-pkglibdir = $(libdir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
+pkgdatadir = $(libdir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
EXTRA_PROGRAMS = nbloader.exec pxeloader.exec diskless.exec
if DISKLESS_SUPPORT
-pkglib_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \
+pkgdata_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \
ffs_stage1_5 iso9660_stage1_5 jfs_stage1_5 minix_stage1_5 \
reiserfs_stage1_5 ufs2_stage1_5 vstafs_stage1_5 xfs_stage1_5 \
nbgrub pxegrub
@@ -43,7 +43,7 @@ noinst_PROGRAMS = pre_stage2.exec start.exec start_eltorito.exec \
reiserfs_stage1_5.exec ufs2_stage1_5.exec vstafs_stage1_5.exec \
xfs_stage1_5.exec nbloader.exec pxeloader.exec diskless.exec
else
-pkglib_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \
+pkgdata_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \
ffs_stage1_5 iso9660_stage1_5 jfs_stage1_5 minix_stage1_5 \
reiserfs_stage1_5 ufs2_stage1_5 vstafs_stage1_5 xfs_stage1_5
noinst_DATA = pre_stage2 start start_eltorito
@@ -105,7 +105,7 @@ else
BUILT_SOURCES = stage2_size.h
endif
-CLEANFILES = $(pkglib_DATA) $(noinst_DATA) $(BUILT_SOURCES)
+CLEANFILES = $(pkgdata_DATA) $(noinst_DATA) $(BUILT_SOURCES)
stage2_size.h: pre_stage2
-rm -f stage2_size.h
--
1.7.9.5

View File

@ -1,31 +0,0 @@
Upstream-Status: Inappropriate [disable feature]
After the commit "tcmode-default: switch to gcc 4.6.0 for x86, x86-64 & arm",
we got bug 1099 (http://bugzilla.yoctoproject.org/show_bug.cgi?id=1099):
Running "install --stage2=/ssd/boot/grub/stage2 /boot/grub/stage1(hd0)
/boot/grub/stage2 p /boot/grub/menu list" failed
Error 6: Mismatched or corrupt version of stage1/stage2
This turned out to be a gcc's bug. See
https://bugs.gentoo.org/show_bug.cgi?id=360513
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39333
Upstream gcc seems uninterested in the bug, so at present we can disable the
option as a workaround. Thanks Ryan Hill for the investigation and the
workaround patch.
Dexuan Cui <dexuan.cui@intel.com>
Wed Jun 29 20:21:39 CST 2011
--- grub-0.97/stage2/Makefile.am.orig
+++ grub-0.97/stage2/Makefile.am
@@ -79,7 +79,7 @@
HERCULES_FLAGS =
endif
-STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
+STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-reorder-functions -fno-builtin -nostdinc \
$(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS)
STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000

View File

@ -1,40 +0,0 @@
This patch is from ubuntu:
* objcopy-absolute.diff (update): Remove .note, .comment, and
.note.gnu.build-id sections from images (LP: #444703).
Upstream-Status: Inappropriate [no longer maintained]
Index: b/acinclude.m4
===================================================================
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -61,7 +61,7 @@
else
AC_MSG_ERROR([${CC-cc} cannot link at address $link_addr])
fi
- if AC_TRY_COMMAND([${OBJCOPY-objcopy} -O binary conftest.exec conftest]); then :
+ if AC_TRY_COMMAND([${OBJCOPY-objcopy} --only-section=.text -O binary conftest.exec conftest]); then :
else
AC_MSG_ERROR([${OBJCOPY-objcopy} cannot create binary files])
fi
Index: b/stage1/Makefile.am
===================================================================
--- a/stage1/Makefile.am
+++ b/stage1/Makefile.am
@@ -12,4 +12,4 @@
SUFFIXES = .exec
.exec:
- $(OBJCOPY) -O binary $< $@
+ $(OBJCOPY) -O binary -R .note -R .comment -R .note.gnu.build-id $< $@
Index: b/stage2/Makefile.am
===================================================================
--- a/stage2/Makefile.am
+++ b/stage2/Makefile.am
@@ -293,4 +293,4 @@
# General rule for making a raw binary.
SUFFIXES = .exec
.exec:
- $(OBJCOPY) -O binary $< $@
+ $(OBJCOPY) -O binary -R .note -R .comment -R .note.gnu.build-id $< $@

View File

@ -1,35 +0,0 @@
SUMMARY = "GRUB is the GRand Unified Bootloader"
DESCRIPTION = "GRUB is a GPLed bootloader intended to unify bootloading across x86 \
operating systems. In addition to loading the Linux kernel, it implements the Multiboot \
standard, which allows for flexible loading of multiple boot images."
HOMEPAGE = "http://www.gnu.org/software/grub/"
SECTION = "bootloaders"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b \
file://grub/main.c;beginline=3;endline=9;md5=22a5f28d2130fff9f2a17ed54be90ed6"
RDEPENDS_${PN} = "diffutils"
PR = "r6"
SRC_URI = "ftp://alpha.gnu.org/gnu/grub/grub-${PV}.tar.gz; \
file://no-reorder-functions.patch \
file://autohell.patch \
file://grub_fix_for_automake-1.12.patch \
file://objcopy-absolute.patch \
file://grub-support-256byte-inode.patch \
"
SRC_URI[md5sum] = "cd3f3eb54446be6003156158d51f4884"
SRC_URI[sha256sum] = "4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b"
inherit autotools texinfo
COMPATIBLE_HOST = "i.86.*-linux"
EXTRA_OECONF = "--without-curses"
do_install_append_vmware() {
mkdir -p ${D}/boot/
ln -sf ../usr/lib/grub/{$TARGET_ARCH}{$TARGET_VENDOR}/ ${D}/boot/grub
}

View File

@ -1,120 +0,0 @@
Upstream-Status: Inappropriate [legacy version]
This patch was imported from the Fedora Core 8 coreutils-6.9-9 package.
The package is stated as being Licensed as GPLv2+.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
----
When "cp -i --update old new" would do nothing because "new" is
newer than "old", cp would nonetheless prompt for whether it is
ok to overwrite "new". Then, regardless of the response (because
of the --update option), cp would do nothing.
The following patch eliminates the unnecessary prompt in that case.
diff --git a/src/copy.c b/src/copy.c
index b7bf73b..0e549d2 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -1210,6 +1210,30 @@ copy_internal (char const *src_name, char const *dst_name,
return false;
}
+ if (!S_ISDIR (src_mode) && x->update)
+ {
+ /* When preserving time stamps (but not moving within a file
+ system), don't worry if the destination time stamp is
+ less than the source merely because of time stamp
+ truncation. */
+ int options = ((x->preserve_timestamps
+ && ! (x->move_mode
+ && dst_sb.st_dev == src_sb.st_dev))
+ ? UTIMECMP_TRUNCATE_SOURCE
+ : 0);
+
+ if (0 <= utimecmp (dst_name, &dst_sb, &src_sb, options))
+ {
+ /* We're using --update and the destination is not older
+ than the source, so do not copy or move. Pretend the
+ rename succeeded, so the caller (if it's mv) doesn't
+ end up removing the source file. */
+ if (rename_succeeded)
+ *rename_succeeded = true;
+ return true;
+ }
+ }
+
/* When there is an existing destination file, we may end up
returning early, and hence not copying/moving the file.
This may be due to an interactive `negative' reply to the
@@ -1302,30 +1326,6 @@ copy_internal (char const *src_name, char const *dst_name,
return false;
}
}
-
- if (x->update)
- {
- /* When preserving time stamps (but not moving within a file
- system), don't worry if the destination time stamp is
- less than the source merely because of time stamp
- truncation. */
- int options = ((x->preserve_timestamps
- && ! (x->move_mode
- && dst_sb.st_dev == src_sb.st_dev))
- ? UTIMECMP_TRUNCATE_SOURCE
- : 0);
-
- if (0 <= utimecmp (dst_name, &dst_sb, &src_sb, options))
- {
- /* We're using --update and the destination is not older
- than the source, so do not copy or move. Pretend the
- rename succeeded, so the caller (if it's mv) doesn't
- end up removing the source file. */
- if (rename_succeeded)
- *rename_succeeded = true;
- return true;
- }
- }
}
if (x->move_mode)
diff --git a/tests/mv/update b/tests/mv/update
index 0c06024..6c3d149 100755
--- a/tests/mv/update
+++ b/tests/mv/update
@@ -1,7 +1,7 @@
#!/bin/sh
# make sure --update works as advertised
-# Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2004, 2006-2007 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -46,11 +46,16 @@ fi
fail=0
-for cp_or_mv in cp mv; do
- # This is a no-op.
- $cp_or_mv --update old new || fail=1
- case "`cat new`" in new) ;; *) fail=1 ;; esac
- case "`cat old`" in old) ;; *) fail=1 ;; esac
+for interactive in '' -i; do
+ for cp_or_mv in cp mv; do
+ # This is a no-op, with no prompt.
+ # With coreutils-6.9 and earlier, using --update with -i would
+ # mistakenly elicit a prompt.
+ $cp_or_mv $interactive --update old new < /dev/null > out 2>&1 || fail=1
+ test -s out && fail=1
+ case "`cat new`" in new) ;; *) fail=1 ;; esac
+ case "`cat old`" in old) ;; *) fail=1 ;; esac
+ done
done
# This will actually perform the rename.
--
1.5.3.rc1.16.g9d6f

View File

@ -1,101 +0,0 @@
Upstream-Status: Inappropriate [legacy version]
The install command doesn't over write the dangling symlink, for
example:
$ install fileA /tmp/fileA
If /tmp/fileA is a dangling symlink, there would be an error:
install: cannot create regular file '/tmp/fileA': File exists
This is because of the following code in copy.c:
if (!new_dst)
{
if (XSTAT (x, dst_name, &dst_sb) != 0)
{
if (errno != ENOENT)
{
error (0, errno, _("cannot stat %s"), quote (dst_name));
return false;
}
else
{
new_dst = true;
}
}
XSTAT() use stat() for dst_name(the dangling symlink /tmp/fileA) when
install.c invokes it, and stat will set errno to ENOENT, and then
new_dst will be set to true which means that /tmp/fileA doesn't exist,
then we will create /tmp/fileA without remove it first, so the error
comes.
This is fixed in a way which adds the member cmd_install in
struct cp_options to make sure my change only affected to the install
command and use lstat to fix the problem.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
src/copy.c | 10 +++++++++-
src/copy.h | 3 +++
src/install.c | 1 +
3 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/src/copy.c b/src/copy.c
--- a/src/copy.c
+++ b/src/copy.c
@@ -1029,6 +1029,7 @@ copy_internal (char const *src_name, char const *dst_name,
bool delayed_ok;
bool copied_as_regular = false;
bool preserve_metadata;
+ int dst_stat_result;
if (x->move_mode && rename_succeeded)
*rename_succeeded = false;
@@ -1069,7 +1070,14 @@ copy_internal (char const *src_name, char const *dst_name,
if (!new_dst)
{
- if (XSTAT (x, dst_name, &dst_sb) != 0)
+ if ( x->cmd_install && ( x->backup_type == no_backups))
+ dst_stat_result = lstat (dst_name, &dst_sb);
+ else
+ {
+ dst_stat_result = XSTAT (x, dst_name, &dst_sb);
+ }
+
+ if (dst_stat_result != 0)
{
if (errno != ENOENT)
{
diff --git a/src/copy.h b/src/copy.h
--- a/src/copy.h
+++ b/src/copy.h
@@ -114,6 +114,9 @@ struct cp_options
If that fails, then resort to copying. */
bool move_mode;
+ /* For the install command */
+ bool cmd_install;
+
/* Whether this process has appropriate privileges to chown a file
whose owner is not the effective user ID. */
bool chown_privileges;
diff --git a/src/install.c b/src/install.c
--- a/src/install.c
+++ b/src/install.c
@@ -149,6 +149,7 @@ cp_option_init (struct cp_options *x)
x->hard_link = false;
x->interactive = I_UNSPECIFIED;
x->move_mode = false;
+ x->cmd_install = true;
x->chown_privileges = chown_privileges ();
x->one_file_system = false;
x->preserve_ownership = false;
--
1.7.0.1

View File

@ -1,375 +0,0 @@
From 170be4023bbf9e9698a709e03265945588ac8e01 Mon Sep 17 00:00:00 2001
From: Robert Yang <liezhi.yang@windriver.com>
Date: Tue, 26 Nov 2013 00:21:50 +0800
Subject: [PATCH] doc/coreutils.texi: Use '@item' instead of '@itemx'
Use '@item' instead of '@itemx' in several places, as Texinfo 5 refuses
to process an '@itemx' that is not preceded by an '@item'. Ensure that
node extended names in menus and sectioning are consistent, and that
ordering and presence of nodes in menus and in the actual text are
consistent as well.
Upstream-Status: Backport [From: coreutils.7620.n7.nabble.com, bug#11828]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
doc/coreutils.texi | 82 +++++++++++++++++++++++++++---------------------------
1 file changed, 41 insertions(+), 41 deletions(-)
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 588147f..2dae3fe 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -555,7 +555,7 @@ symbolic link to a directory. @xref{Target directory}.
@end macro
@macro optSi
-@itemx --si
+@item --si
@opindex --si
@cindex SI output
Append an SI-style abbreviation to each size, such as @samp{M} for
@@ -578,7 +578,7 @@ Use the @option{--si} option if you prefer powers of 1000.
@end macro
@macro optStripTrailingSlashes
-@itemx @w{@kbd{--strip-trailing-slashes}}
+@item @w{@kbd{--strip-trailing-slashes}}
@opindex --strip-trailing-slashes
@cindex stripping trailing slashes
Remove any trailing slashes from each @var{source} argument.
@@ -2496,7 +2496,7 @@ by 1048576.
However, if @var{n} starts with a @samp{-},
print all but the last @var{n} bytes of each file.
-@itemx -n @var{n}
+@item -n @var{n}
@itemx --lines=@var{n}
@opindex -n
@opindex --lines
@@ -2633,7 +2633,7 @@ This option is the same as @option{--follow=name --retry}. That is, tail
will attempt to reopen a file when it is removed. Should this fail, tail
will keep trying until it becomes accessible again.
-@itemx --retry
+@item --retry
@opindex --retry
This option is useful mainly when following by name (i.e., with
@option{--follow=name}).
@@ -2641,7 +2641,7 @@ Without this option, when tail encounters a file that doesn't
exist or is otherwise inaccessible, it reports that fact and
never checks it again.
-@itemx --sleep-interval=@var{number}
+@item --sleep-interval=@var{number}
@opindex --sleep-interval
Change the number of seconds to wait between iterations (the default is 1.0).
During one iteration, every specified file is checked to see if it has
@@ -2651,7 +2651,7 @@ Historical implementations of @command{tail} have required that
an arbitrary floating point number (using a period before any
fractional digits).
-@itemx --pid=@var{pid}
+@item --pid=@var{pid}
@opindex --pid
When following by name or by descriptor, you may specify the process ID,
@var{pid}, of the sole writer of all @var{file} arguments. Then, shortly
@@ -2674,7 +2674,7 @@ terminate until long after the real writer has terminated.
Note that @option{--pid} cannot be supported on some systems; @command{tail}
will print a warning if this is the case.
-@itemx --max-unchanged-stats=@var{n}
+@item --max-unchanged-stats=@var{n}
@opindex --max-unchanged-stats
When tailing a file by name, if there have been @var{n} (default
n=@value{DEFAULT_MAX_N_UNCHANGED_STATS_BETWEEN_OPENS}) consecutive
@@ -2686,7 +2686,7 @@ number of seconds between when tail prints the last pre-rotation lines
and when it prints the lines that have accumulated in the new log file.
This option is meaningful only when following by name.
-@itemx -n @var{n}
+@item -n @var{n}
@itemx --lines=@var{n}
@opindex -n
@opindex --lines
@@ -2817,7 +2817,7 @@ option.
@opindex --numeric-suffixes
Use digits in suffixes rather than lower-case letters.
-@itemx --verbose
+@item --verbose
@opindex --verbose
Write a diagnostic to standard error just before each output file is opened.
@@ -3055,7 +3055,7 @@ Print only the newline counts.
@opindex --max-line-length
Print only the maximum line lengths.
-@itemx --files0-from=@var{FILE}
+@item --files0-from=@var{FILE}
@opindex --files0-from=@var{FILE}
@cindex including files from @command{du}
Rather than processing files named on the command line, process those
@@ -3250,7 +3250,7 @@ an MD5 checksum inconsistent with the associated file, or if no valid
line is found, @command{md5sum} exits with nonzero status. Otherwise,
it exits successfully.
-@itemx --status
+@item --status
@opindex --status
@cindex verifying MD5 checksums
This option is useful only when verifying checksums.
@@ -5837,7 +5837,7 @@ command line unless the @option{--dereference-command-line} (@option{-H}),
If a command line argument specifies a symbolic link, show information
for the file the link references rather than for the link itself.
-@itemx --dereference-command-line-symlink-to-dir
+@item --dereference-command-line-symlink-to-dir
@opindex --dereference-command-line-symlink-to-dir
@cindex symbolic links, dereferencing
Do not dereference symbolic links, with one exception:
@@ -7015,15 +7015,15 @@ If specified, the @var{attribute_list} must be a comma-separated list
of one or more of the following strings:
@table @samp
-@itemx mode
+@item mode
Preserve the file mode bits and access control lists.
-@itemx ownership
+@item ownership
Preserve the owner and group. On most modern systems,
only users with appropriate privileges may change the owner of a file,
and ordinary users
may preserve the group ownership of a file only if they happen to be
a member of the desired group.
-@itemx timestamps
+@item timestamps
Preserve the times of last access and last modification, when possible.
In general, it is not possible to preserve these attributes
when the affected file is a symbolic link.
@@ -7031,12 +7031,12 @@ However, FreeBSD now provides the @code{lutimes} function, which makes
it possibile even for symbolic links. However, this implementation does
not yet take advantage of that.
@c FIXME: once we provide lutimes support, update the above.
-@itemx links
+@item links
Preserve in the destination files
any links between corresponding source files.
@c Give examples illustrating how hard links are preserved.
@c Also, show how soft links map to hard links with -L and -H.
-@itemx all
+@item all
Preserve all file attributes.
Equivalent to specifying all of the above.
@end table
@@ -7049,12 +7049,12 @@ mode bits of the corresponding source file, minus the bits set in the
umask and minus the set-user-ID and set-group-ID bits.
@xref{File permissions}.
-@itemx @w{@kbd{--no-preserve}=@var{attribute_list}}
+@item @w{@kbd{--no-preserve}=@var{attribute_list}}
@cindex file information, preserving
Do not preserve the specified attributes. The @var{attribute_list}
has the same form as for @option{--preserve}.
-@itemx --parents
+@item --parents
@opindex --parents
@cindex parent directories and @command{cp}
Form the name of each destination file by appending to the target
@@ -7070,7 +7070,7 @@ cp --parents a/b/c existing_dir
copies the file @file{a/b/c} to @file{existing_dir/a/b/c}, creating
any missing intermediate directories.
-@itemx @w{@kbd{--reply}=@var{how}}
+@item @w{@kbd{--reply}=@var{how}}
@opindex --reply
@cindex interactivity
@c FIXME: remove in 2008
@@ -7742,7 +7742,7 @@ Prompt whether to overwrite each existing destination file, regardless
of its permissions.
If the response is not affirmative, the file is skipped.
-@itemx @w{@kbd{--reply}=@var{how}}
+@item @w{@kbd{--reply}=@var{how}}
@opindex --reply
@cindex interactivity
@c FIXME: remove in 2008
@@ -7847,7 +7847,7 @@ files are named or if a recursive removal is requested. Ignore any
previous @option{--force} (@option{-f}) option. Equivalent to
@option{--interactive=once}.
-@itemx --interactive [=@var{when}]
+@item --interactive [=@var{when}]
@opindex --interactive
Specify when to issue an interactive prompt. @var{when} may be
omitted, or one of:
@@ -7866,7 +7866,7 @@ removal is requested. Equivalent to @option{-I}.
Specifying @option{--interactive} and no @var{when} is equivalent to
@option{--interactive=always}.
-@itemx --one-file-system
+@item --one-file-system
@opindex --one-file-system
@cindex one file system, restricting @command{rm} to
When removing a hierarchy recursively, skip any directory that is on a
@@ -7884,7 +7884,7 @@ warn about and skip directories on other file systems.
Of course, this will not save your @file{/home} if it and your
chroot happen to be on the same file system.
-@itemx --preserve-root
+@item --preserve-root
@opindex --preserve-root
@cindex root directory, disallow recursive destruction
Fail upon any attempt to remove the root directory, @file{/},
@@ -7892,7 +7892,7 @@ when used with the @option{--recursive} option.
This is the default behavior.
@xref{Treating / specially}.
-@itemx --no-preserve-root
+@item --no-preserve-root
@opindex --no-preserve-root
@cindex root directory, allow recursive destruction
Do not treat @file{/} specially when removing recursively.
@@ -8874,7 +8874,7 @@ actually changes.
Do not print error messages about files whose ownership cannot be
changed.
-@itemx @w{@kbd{--from}=@var{old-owner}}
+@item @w{@kbd{--from}=@var{old-owner}}
@opindex --from
@cindex symbolic links, changing owner
Change a @var{file}'s ownership only if it has current attributes specified
@@ -8928,14 +8928,14 @@ is a symbolic link.
By default, no diagnostic is issued for symbolic links encountered
during a recursive traversal, but see @option{--verbose}.
-@itemx --preserve-root
+@item --preserve-root
@opindex --preserve-root
@cindex root directory, disallow recursive modification
Fail upon any attempt to recursively change the root directory, @file{/}.
Without @option{--recursive}, this option has no effect.
@xref{Treating / specially}.
-@itemx --no-preserve-root
+@item --no-preserve-root
@opindex --no-preserve-root
@cindex root directory, allow recursive modification
Cancel the effect of any preceding @option{--preserve-root} option.
@@ -9054,14 +9054,14 @@ is a symbolic link.
By default, no diagnostic is issued for symbolic links encountered
during a recursive traversal, but see @option{--verbose}.
-@itemx --preserve-root
+@item --preserve-root
@opindex --preserve-root
@cindex root directory, disallow recursive modification
Fail upon any attempt to recursively change the root directory, @file{/}.
Without @option{--recursive}, this option has no effect.
@xref{Treating / specially}.
-@itemx --no-preserve-root
+@item --no-preserve-root
@opindex --no-preserve-root
@cindex root directory, allow recursive modification
Cancel the effect of any preceding @option{--preserve-root} option.
@@ -9175,14 +9175,14 @@ actually changes.
Do not print error messages about files whose permissions cannot be
changed.
-@itemx --preserve-root
+@item --preserve-root
@opindex --preserve-root
@cindex root directory, disallow recursive modification
Fail upon any attempt to recursively change the root directory, @file{/}.
Without @option{--recursive}, this option has no effect.
@xref{Treating / specially}.
-@itemx --no-preserve-root
+@item --no-preserve-root
@opindex --no-preserve-root
@cindex root directory, allow recursive modification
Cancel the effect of any preceding @option{--preserve-root} option.
@@ -9603,7 +9603,7 @@ The program accepts the following options. Also see @ref{Common options}.
@opindex --all
Show counts for all files, not just directories.
-@itemx --apparent-size
+@item --apparent-size
@opindex --apparent-size
Print apparent sizes, rather than disk usage. The apparent size of a
file is the number of bytes reported by @code{wc -c} on regular files,
@@ -9654,7 +9654,7 @@ Does not affect other symbolic links. This is helpful for finding
out the disk usage of directories, such as @file{/usr/tmp}, which
are often symbolic links.
-@itemx --files0-from=@var{FILE}
+@item --files0-from=@var{FILE}
@opindex --files0-from=@var{FILE}
@cindex including files from @command{du}
Rather than processing files named on the command line, process those
@@ -9733,7 +9733,7 @@ Output a null byte at the end of each line, rather than a newline.
This option enables other programs to parse the output of @command{du}
even when that output would contain file names with embedded newlines.
-@itemx --si
+@item --si
@opindex --si
@cindex SI output
Append an SI-style abbreviation to each size, such as @samp{MB} for
@@ -9754,13 +9754,13 @@ Display only a total for each argument.
Report the size of each directory separately, not including the sizes
of subdirectories.
-@itemx --time
+@item --time
@opindex --time
@cindex last modified dates, displaying in @command{du}
Show time of the most recent modification of any file in the directory,
or any of its subdirectories.
-@itemx --time=ctime
+@item --time=ctime
@itemx --time=status
@itemx --time=use
@opindex --time
@@ -9770,7 +9770,7 @@ or any of its subdirectories.
Show the most recent status change time (the @samp{ctime} in the inode) of
any file in the directory, instead of the modification time.
-@itemx --time=atime
+@item --time=atime
@itemx --time=access
@opindex --time
@opindex atime@r{, show the most recent}
@@ -9911,7 +9911,7 @@ $ stat --format=%d:%i / /usr
2057:2
@end example
-@itemx --printf=@var{format}
+@item --printf=@var{format}
@opindex --printf=@var{format}
@cindex output format
Use @var{format} rather than the default format.
@@ -12240,7 +12240,7 @@ Overrides all other options.
@opindex -s
Ignored; for compatibility with other versions of @command{who}.
-@itemx -u
+@item -u
@opindex -u
@cindex idle time
After the login time, print the number of hours and minutes that the
@@ -12254,7 +12254,7 @@ user has been idle. @samp{.} means the user was active in the last minute.
List only the entries that correspond to processes via which the
system is waiting for a user to login. The user name is always @samp{LOGIN}.
-@itemx --lookup
+@item --lookup
@opindex --lookup
Attempt to canonicalize hostnames found in utmp through a DNS lookup. This
is not the default because it can cause significant delays on systems with
--
1.8.3.1

File diff suppressed because it is too large Load Diff

View File

@ -1,117 +0,0 @@
Upstream-Status: Inappropriate [legacy version]
This patch was imported from the Fedora Core 8 coreutils-6.9-9 package.
The package is stated as being Licensed as GPLv2+.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
--- coreutils-6.9/src/ls.c.ls-x 2007-06-13 14:27:36.000000000 +0100
+++ coreutils-6.9/src/ls.c 2007-06-13 14:28:42.000000000 +0100
@@ -4151,16 +4151,16 @@
size_t pos = 0;
size_t cols = calculate_columns (false);
struct column_info const *line_fmt = &column_info[cols - 1];
- size_t name_length = length_of_file_name_and_frills (cwd_file);
+ struct fileinfo const *f = sorted_file[0];
+ size_t name_length = length_of_file_name_and_frills (f);
size_t max_name_length = line_fmt->col_arr[0];
/* Print first entry. */
- print_file_name_and_frills (cwd_file);
+ print_file_name_and_frills (f);
/* Now the rest. */
for (filesno = 1; filesno < cwd_n_used; ++filesno)
{
- struct fileinfo const *f;
size_t col = filesno % cols;
if (col == 0)
--- coreutils-6.9/tests/ls/Makefile.am.ls-x 2007-03-18 21:36:43.000000000 +0000
+++ coreutils-6.9/tests/ls/Makefile.am 2007-06-13 14:28:42.000000000 +0100
@@ -24,7 +24,7 @@
stat-dtype \
inode dangle file-type recursive dired infloop \
rt-1 time-1 symlink-slash follow-slink no-arg m-option \
- stat-vs-dirent
+ stat-vs-dirent x-option
EXTRA_DIST = $(TESTS)
TESTS_ENVIRONMENT = \
--- /dev/null 2007-06-13 08:43:51.993263382 +0100
+++ coreutils-6.9/tests/ls/x-option 2007-06-13 14:28:42.000000000 +0100
@@ -0,0 +1,59 @@
+#!/bin/sh
+# Exercise the -x option.
+
+# Copyright (C) 2007 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+if test "$VERBOSE" = yes; then
+ set -x
+ ls --version
+fi
+
+. $srcdir/../envvar-check
+. $srcdir/../lang-default
+
+pwd=`pwd`
+t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
+trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
+trap '(exit $?); exit $?' 1 2 13 15
+
+framework_failure=0
+mkdir -p $tmp || framework_failure=1
+cd $tmp || framework_failure=1
+mkdir subdir || framework_failure=1
+touch subdir/b || framework_failure=1
+touch subdir/a || framework_failure=1
+
+if test $framework_failure = 1; then
+ echo "$0: failure in testing framework" 1>&2
+ (exit 1); exit 1
+fi
+
+fail=0
+
+# Coreutils 6.8 and 6.9 would output this in the wrong order.
+ls -x subdir > out || fail=1
+ls -rx subdir >> out || fail=1
+cat <<\EOF > exp || fail=1
+a b
+b a
+EOF
+
+cmp out exp || fail=1
+test $fail = 1 && diff out exp 2> /dev/null
+
+(exit $fail); exit $fail
--- coreutils-6.9/NEWS.ls-x 2007-03-22 21:19:45.000000000 +0000
+++ coreutils-6.9/NEWS 2007-06-13 14:28:42.000000000 +0100
@@ -13,6 +13,11 @@
Using pr -m -s (i.e. merging files, with TAB as the output separator)
no longer inserts extraneous spaces between output columns.
+** Bug fixes
+
+ ls -x DIR would sometimes output the wrong string in place of the
+ first entry. [introduced in coreutils-6.8]
+
* Noteworthy changes in release 6.8 (2007-02-24) [not-unstable]

View File

@ -1,19 +0,0 @@
Upstream-Status: Inappropriate [legacy version]
This patch was imported from the Fedora Core 8 coreutils-6.9-9 package.
The package is stated as being Licensed as GPLv2+.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
--- coreutils-5.2.1/src/who.c.overflow 2005-05-25 09:59:06.000000000 +0100
+++ coreutils-5.2.1/src/who.c 2005-05-25 10:00:31.000000000 +0100
@@ -75,7 +75,7 @@
# define NEW_TIME 0
#endif
-#define IDLESTR_LEN 6
+#define IDLESTR_LEN 10
#if HAVE_STRUCT_XTMP_UT_PID
# define PIDSTR_DECL_AND_INIT(Var, Utmp_ent) \

View File

@ -1,32 +0,0 @@
Upstream-Status: Pending
automake 1.12 has depricated automatic de-ANSI-fication support
this patch avoids these kinds of errors:
| configure.ac:40: error: automatic de-ANSI-fication support has been removed
| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from...
| /srv/home/nitin/builds/build-gcc47/tmp/work/x86_64-linux/coreutils-native-6.9-r2/coreutils-6.9/m4/jm-macros.m4:138: gl_CHECK_ALL_TYPES is expanded from...
| /srv/home/nitin/builds/build-gcc47/tmp/work/x86_64-linux/coreutils-native-6.9-r2/coreutils-6.9/m4/jm-macros.m4:24: coreutils_MACROS is expanded from...
| configure.ac:40: the top level
| autom4te: m4 failed with exit status: 1
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/05/04
Index: coreutils-6.9/m4/jm-macros.m4
===================================================================
--- coreutils-6.9.orig/m4/jm-macros.m4
+++ coreutils-6.9/m4/jm-macros.m4
@@ -142,11 +142,6 @@ AC_DEFUN([gl_CHECK_ALL_TYPES],
dnl whether functions and headers are available, whether they work, etc.
AC_REQUIRE([AC_SYS_LARGEFILE])
- dnl This test must precede tests of compiler characteristics like
- dnl that for the inline keyword, since it may change the degree to
- dnl which the compiler supports such features.
- AC_REQUIRE([AM_C_PROTOTYPES])
-
dnl Checks for typedefs, structures, and compiler characteristics.
AC_REQUIRE([AC_C_BIGENDIAN])
AC_REQUIRE([AC_C_VOLATILE])

View File

@ -1,85 +0,0 @@
Upstream-Status: Inappropriate [legacy version]
Use native coreutils binaries to build manpages in cross environment.
This avoids man page build issues like this:
| Making all in man
| make[1]: Entering directory `/build_disk/poky_build/build1/tmp/work/i586-poky-linux/coreutils-6.9-r0/coreutils-6.9/man'
| Updating man page cut.1
| Updating man page dir.1
| Updating man page expand.1
| Updating man page fold.1
| Updating man page install.1
| Updating man page join.1
| Updating man page pr.1
| Updating man page ls.1
| Updating man page sort.1
| Updating man page unexpand.1
| Updating man page uniq.1
| Updating man page who.1
| Updating man page vdir.1
| help2man: can't get `--help' info from dir.td/dir
| help2man: can't get `--help' info from cut.td/cut
| make[1]: *** [dir.1] Error 126
| make[1]: *** Waiting for unfinished jobs....
| help2man: can't get `--help' info from fold.td/fold
| help2man: can't get `--help' info from install.td/install
| help2man: can't get `--help' info from expand.td/expand
| help2man: can't get `--help' info from join.td/join
| make[1]: *** [cut.1] Error 126
| make[1]: *** [fold.1] Error 126
| make[1]: *** [install.1] Error 126
| help2man: can't get `--help' info from sort.td/sort
| make[1]: *** [expand.1] Error 126
| help2man: can't get `--help' info from pr.td/pr
| make[1]: *** [join.1] Error 126
| help2man: can't get `--help' info from ls.td/ls
| help2man: can't get `--help' info from unexpand.td/unexpand
| help2man: can't get `--help' info from uniq.td/uniq
| help2man: can't get `--help' info from who.td/who
| make[1]: *** [sort.1] Error 126
| make[1]: *** [pr.1] Error 126
| help2man: can't get `--help' info from vdir.td/vdir
| make[1]: *** [ls.1] Error 126
| make[1]: *** [uniq.1] Error 126
| make[1]: *** [unexpand.1] Error 126
| make[1]: *** [who.1] Error 126
| make[1]: *** [vdir.1] Error 126
| make[1]: Leaving directory `/build_disk/poky_build/build1/tmp/work/i586-poky-linux/coreutils-6.9-r0/coreutils-6.9/man'
| make: *** [all-recursive] Error 1
| FATAL: oe_runmake failed
| ERROR: Function 'do_compile' failed (see /build_disk/poky_build/build1/tmp/work/i586-poky-linux/coreutils-6.9-r0/temp/log.do_compile.12780 for further information)
NOTE: package coreutils-6.9-r0: task do_compile: Failed
ERROR: Task 8 (/home/nitin/prj/poky.git/meta/recipes-core/coreutils/coreutils_6.9.bb, do_compile) failed with exit code '1'
This patch is made for gplv2 coreutils the recipe
Nitin A Kamble <nitin.a.kamble@intel.com>
2011/03/17
Index: man/Makefile.am
===================================================================
--- a/man.orig/Makefile.am
+++ b/man/Makefile.am
@@ -167,7 +167,7 @@ mapped_name = `echo $*|sed 's/install/gi
$(PERL) -- $(srcdir)/help2man \
--source='$(PACKAGE_STRING)' \
--include=$(srcdir)/$*.x \
- --output=$t/$@ $t/$*; \
+ --output=$t/$@ $*; \
} \
&& sed 's|$*\.td/||g' $t/$@ > $@ \
&& chmod a-w $@ \
Index: man/Makefile.in
===================================================================
--- a/man.orig/Makefile.in
+++ b/man/Makefile.in
@@ -865,7 +865,7 @@ yes.1: $(common_dep) $(srcdir)/yes.x .
$(PERL) -- $(srcdir)/help2man \
--source='$(PACKAGE_STRING)' \
--include=$(srcdir)/$*.x \
- --output=$t/$@ $t/$*; \
+ --output=$t/$@ $*; \
} \
&& sed 's|$*\.td/||g' $t/$@ > $@ \
&& chmod a-w $@ \

View File

@ -1,63 +0,0 @@
Upstream-Status: Inappropriate [legacy version]
# coreutils uses gnulib which conflicts with newer libc header on futimens
# this patch simply renames coreutils futimes to avoid confliction
#
# Signed-off-by: Kevin Tian <kevin.tian@intel.com>, 2010-08-18
# (this patch is licensed under GPLv2)
diff --git a/lib/utimens.c b/lib/utimens.c
index 71bc510..ae870b8 100644
--- a/lib/utimens.c
+++ b/lib/utimens.c
@@ -75,7 +75,7 @@ struct utimbuf
Return 0 on success, -1 (setting errno) on failure. */
int
-futimens (int fd ATTRIBUTE_UNUSED,
+futimens_coreutils (int fd ATTRIBUTE_UNUSED,
char const *file, struct timespec const timespec[2])
{
/* Some Linux-based NFS clients are buggy, and mishandle time stamps
@@ -185,5 +185,5 @@ futimens (int fd ATTRIBUTE_UNUSED,
int
utimens (char const *file, struct timespec const timespec[2])
{
- return futimens (-1, file, timespec);
+ return futimens_coreutils (-1, file, timespec);
}
diff --git a/lib/utimens.h b/lib/utimens.h
index 0097aaa..13fc45a 100644
--- a/lib/utimens.h
+++ b/lib/utimens.h
@@ -1,3 +1,3 @@
#include <time.h>
-int futimens (int, char const *, struct timespec const [2]);
+int futimens_coreutils (int, char const *, struct timespec const [2]);
int utimens (char const *, struct timespec const [2]);
diff --git a/src/copy.c b/src/copy.c
index 4bdb75c..04634f1 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -518,7 +518,7 @@ copy_reg (char const *src_name, char const *dst_name,
timespec[0] = get_stat_atime (src_sb);
timespec[1] = get_stat_mtime (src_sb);
- if (futimens (dest_desc, dst_name, timespec) != 0)
+ if (futimens_coreutils (dest_desc, dst_name, timespec) != 0)
{
error (0, errno, _("preserving times for %s"), quote (dst_name));
if (x->require_preserve)
diff --git a/src/touch.c b/src/touch.c
index a79c26d..6ef317d 100644
--- a/src/touch.c
+++ b/src/touch.c
@@ -182,7 +182,7 @@ touch (const char *file)
t = timespec;
}
- ok = (futimens (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0);
+ ok = (futimens_coreutils (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0);
if (fd == STDIN_FILENO)
{

View File

@ -1,21 +0,0 @@
Upstream-Status: Inappropriate [legacy version]
# remove the line to cause recursive inclusion error from autoreconf, sicne
# newer autoconf has included this definition. Simply rename it here.
#
# Signed-off-by: Kevin Tian <kevin.tian@intel.com>, 2010-08-18
# (this patch is licensed under GPLv2)
diff --git a/extensions.m4 b/extensions.m4
index 143a9e5..f6558f1 100644
--- a/m4/extensions.m4
+++ b/m4/extensions.m4
@@ -16,7 +16,7 @@
# ------------------------
# Enable extensions on systems that normally disable them,
# typically due to standards-conformance issues.
-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
+AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS_DUMMY],
[
AC_BEFORE([$0], [AC_COMPILE_IFELSE])
AC_BEFORE([$0], [AC_RUN_IFELSE])

View File

@ -1,18 +0,0 @@
Remove hardcoded paths so OE's configure QA does not detect it and fail the builds
For cross compilation is less interesting to look into host paths for target libraries anyway
Upstream-Status: Inappropriate [OE Specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Index: coreutils-6.9/m4/getloadavg.m4
===================================================================
--- coreutils-6.9.orig/m4/getloadavg.m4
+++ coreutils-6.9/m4/getloadavg.m4
@@ -49,7 +49,6 @@ if test $gl_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.
gl_getloadavg_LIBS=$LIBS
- LIBS="-L/usr/local/lib $LIBS"
AC_CHECK_LIB(getloadavg, getloadavg,
[LIBS="-lgetloadavg $LIBS"], [LIBS=$gl_getloadavg_LIBS])
fi

View File

@ -1,24 +0,0 @@
Upstream-Status: Inappropriate [legacy version]
# man page for 'touch' is generated differently from others. All other utilities
# are provided static man source files, while for 'touch' it requires help2man
# to invoke "touch --help" and then convert the output into the manual. Since touch
# is with target format which can't be invoked on build system, disable building
# 'touch' man page here.
#
# Signed-off-by: Kevin Tian <kevin.tian@intel.com>, 2010-08-18
# (this patch is licensed under GPLv2)
diff --git a/man/Makefile.am b/man/Makefile.am
index 32df9d1..37b09e3 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -27,7 +27,7 @@ dist_man_MANS = \
paste.1 pathchk.1 pr.1 printenv.1 printf.1 ptx.1 pwd.1 readlink.1 \
rm.1 rmdir.1 seq.1 sha1sum.1 sha224sum.1 sha256sum.1 sha384sum.1 sha512sum.1 \
shred.1 shuf.1 sleep.1 sort.1 split.1 stat.1 \
- su.1 sum.1 sync.1 tac.1 tail.1 tee.1 test.1 touch.1 tr.1 true.1 tsort.1 \
+ su.1 sum.1 sync.1 tac.1 tail.1 tee.1 test.1 tr.1 true.1 tsort.1 \
tty.1 unexpand.1 uniq.1 unlink.1 vdir.1 wc.1 \
whoami.1 yes.1 $(MAN)
optional_mans = \

View File

@ -1,107 +0,0 @@
SUMMARY = "The basic file, shell and text manipulation utilities"
DESCRIPTION = "The GNU Core Utilities provide the basic file, shell and text \
manipulation utilities. These are the core utilities which are expected to exist on \
every system."
HOMEPAGE = "http://www.gnu.org/software/coreutils/"
BUGTRACKER = "http://debbugs.gnu.org/coreutils"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
file://src/ls.c;beginline=4;endline=16;md5=15ed60f67b1db5fedd5dbc37cf8a9543"
PR = "r5"
DEPENDS = "virtual/libiconv"
inherit autotools gettext texinfo
SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.bz2 \
file://gnulib_m4.patch \
file://futimens.patch \
file://coreutils-ls-x.patch \
file://coreutils-6.9-cp-i-u.patch \
file://coreutils-i18n.patch \
file://coreutils-overflow.patch \
file://coreutils-fix-install.patch \
file://man-touch.patch \
file://coreutils_fix_for_automake-1.12.patch \
file://coreutils-fix-texinfo.patch \
file://fix_for_manpage_building.patch \
file://loadavg.patch \
"
SRC_URI[md5sum] = "c9607d8495f16e98906e7ed2d9751a06"
SRC_URI[sha256sum] = "89c2895ad157de50e53298b22d91db116ee4e1dd3fdf4019260254e2e31497b0"
EXTRA_OECONF += "ac_cv_func_getgroups_works=yes \
ac_cv_func_strcoll_works=yes"
# acl is not a default feature
#
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)}"
# with, without, depends, rdepends
#
PACKAGECONFIG[acl] = "ac_cv_header_sys_acl_h=yes ac_cv_header_acl_libacl_h=yes ac_cv_search_acl_get_file=-lacl,ac_cv_header_sys_acl_h=no ac_cv_header_acl_libacl_h=no ac_cv_search_acl_get_file=,acl,"
# [ gets a special treatment and is not included in this
bindir_progs = "base64 basename cksum comm csplit cut dir dircolors dirname du \
env expand expr factor fmt fold groups head hostid id install \
join link logname md5sum mkfifo nice nl nohup od paste pathchk \
pinky pr printenv printf ptx readlink seq sha1sum sha224sum sha256sum \
sha384sum sha512sum shred shuf sort split sum tac tail tee test \
tr tsort tty unexpand uniq unlink users vdir wc who whoami yes uptime"
# hostname gets a special treatment and is not included in this
base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
mknod mv pwd rm rmdir sleep stty sync touch true uname hostname stat"
sbindir_progs= "chroot"
# Let aclocal use the relative path for the m4 file rather than the
# absolute since coreutils has a lot of m4 files, otherwise there might
# be an "Argument list too long" error when it is built in a long/deep
# directory.
acpaths = "-I ./m4"
do_install() {
autotools_do_install
install -d ${D}${base_bindir}
[ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done
install -d ${D}${sbindir}
[ "${bindir}" != "${sbindir}" ] && for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i; done
# [ requires special handling because [.coreutils will cause the sed stuff
# in update-alternatives to fail, therefore use lbracket - the name used
# for the actual source file.
mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
# Newer versions of coreutils do not include su, to mimic this behavior
# we simply remove it.
rm -f ${D}${bindir}/su
}
inherit update-alternatives
ALTERNATIVE_PRIORITY = "100"
ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs}"
ALTERNATIVE_${PN}-doc = "su.1 hostname.1"
ALTERNATIVE_LINK_NAME[su.1] = "${mandir}/man1/su.1"
ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
ALTERNATIVE_PRIORITY[uptime] = "10"
ALTERNATIVE_PRIORITY[hostname] = "10"
ALTERNATIVE_LINK_NAME[lbracket] = "${bindir}/["
ALTERNATIVE_TARGET[lbracket] = "${bindir}/lbracket.${BPN}"
python __anonymous() {
for prog in d.getVar('base_bindir_progs').split():
d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog))
for prog in d.getVar('sbindir_progs').split():
d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir'), prog))
}

View File

@ -1,39 +0,0 @@
# Pulled from OpenEmbedded
#
# Commented by: Saul Wold <saul.wold@intel.com>
Upstream-Status: Inappropriate [licensing]
Index: gettext-0.16.1/gettext-tools/configure.ac
===================================================================
--- gettext-0.16.1.orig/gettext-tools/configure.ac 2006-11-27 09:02:01.000000000 -0800
+++ gettext-0.16.1/gettext-tools/configure.ac 2011-03-16 16:55:36.111396557 -0700
@@ -36,27 +36,15 @@
gt_JAVA_CHOICE
gt_GCJ
-if test -n "$HAVE_GCJ" && test "$JAVA_CHOICE" = yes; then
- BUILDJAVAEXE=yes
-else
BUILDJAVAEXE=no
-fi
AC_SUBST(BUILDJAVAEXE)
gt_JAVAEXEC
gt_JAVACOMP([1.3])
AC_CHECK_PROG(JAR, jar, jar)
-if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
- BUILDJAVA=yes
-else
BUILDJAVA=no
-fi
AC_SUBST(BUILDJAVA)
-if test -n "$HAVE_JAVAEXEC" && test $BUILDJAVA = yes; then
- TESTJAVA=yes
-else
TESTJAVA=no
-fi
AC_SUBST(TESTJAVA)
gt_CSHARPCOMP

View File

@ -1,110 +0,0 @@
This patch updates the required version number from 2.61 to the
current 2.65 version of aclocal, this will need to be updated
when we update aclocal
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Index: gettext-0.16.1/autoconf-lib-link/m4/lib-link.m4
===================================================================
--- gettext-0.16.1.orig/autoconf-lib-link/m4/lib-link.m4 2011-03-17 02:24:36.391519775 -0700
+++ gettext-0.16.1/autoconf-lib-link/m4/lib-link.m4 2011-03-17 02:24:45.569526073 -0700
@@ -148,7 +148,7 @@
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
dnl Autoconf >= 2.61 supports dots in --with options.
- define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
+ define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.65]),[-1],[translit([$1],[.],[_])],[$1])])
dnl By default, look in $includedir and $libdir.
use_additional=yes
AC_LIB_WITH_FINAL_PREFIX([
Index: gettext-0.16.1/autoconf-lib-link/tests/rpathly/aclocal.m4
===================================================================
--- gettext-0.16.1.orig/autoconf-lib-link/tests/rpathly/aclocal.m4 2011-03-17 02:24:36.391519775 -0700
+++ gettext-0.16.1/autoconf-lib-link/tests/rpathly/aclocal.m4 2011-03-17 02:24:45.570526904 -0700
@@ -11,8 +11,8 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-m4_if(m4_PACKAGE_VERSION, [2.61],,
-[m4_fatal([this file was generated for autoconf 2.61.
+m4_if(m4_PACKAGE_VERSION, [2.65],,
+[m4_fatal([this file was generated for autoconf 2.65.
You have another version of autoconf. If you want to use that,
you should regenerate the build system entirely.], [63])])
Index: gettext-0.16.1/autoconf-lib-link/tests/rpathx/aclocal.m4
===================================================================
--- gettext-0.16.1.orig/autoconf-lib-link/tests/rpathx/aclocal.m4 2011-03-17 02:24:36.391519775 -0700
+++ gettext-0.16.1/autoconf-lib-link/tests/rpathx/aclocal.m4 2011-03-17 02:24:45.572525773 -0700
@@ -11,8 +11,8 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-m4_if(m4_PACKAGE_VERSION, [2.61],,
-[m4_fatal([this file was generated for autoconf 2.61.
+m4_if(m4_PACKAGE_VERSION, [2.65],,
+[m4_fatal([this file was generated for autoconf 2.65.
You have another version of autoconf. If you want to use that,
you should regenerate the build system entirely.], [63])])
Index: gettext-0.16.1/autoconf-lib-link/tests/rpathy/aclocal.m4
===================================================================
--- gettext-0.16.1.orig/autoconf-lib-link/tests/rpathy/aclocal.m4 2011-03-17 02:24:36.391519775 -0700
+++ gettext-0.16.1/autoconf-lib-link/tests/rpathy/aclocal.m4 2011-03-17 02:24:45.578394916 -0700
@@ -11,7 +11,7 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-m4_if(m4_PACKAGE_VERSION, [2.61],,
+m4_if(m4_PACKAGE_VERSION, [2.65],,
[m4_fatal([this file was generated for autoconf 2.61.
You have another version of autoconf. If you want to use that,
you should regenerate the build system entirely.], [63])])
Index: gettext-0.16.1/autoconf-lib-link/tests/rpathz/aclocal.m4
===================================================================
--- gettext-0.16.1.orig/autoconf-lib-link/tests/rpathz/aclocal.m4 2011-03-17 02:24:36.391519775 -0700
+++ gettext-0.16.1/autoconf-lib-link/tests/rpathz/aclocal.m4 2011-03-17 02:24:45.586395416 -0700
@@ -11,8 +11,8 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-m4_if(m4_PACKAGE_VERSION, [2.61],,
-[m4_fatal([this file was generated for autoconf 2.61.
+m4_if(m4_PACKAGE_VERSION, [2.65],,
+[m4_fatal([this file was generated for autoconf 2.65.
You have another version of autoconf. If you want to use that,
you should regenerate the build system entirely.], [63])])
Index: gettext-0.16.1/gettext-tools/aclocal.m4
===================================================================
--- gettext-0.16.1.orig/gettext-tools/aclocal.m4 2006-11-27 09:34:32.000000000 -0800
+++ gettext-0.16.1/gettext-tools/aclocal.m4 2011-03-17 02:27:01.135682807 -0700
@@ -11,8 +11,8 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-m4_if(m4_PACKAGE_VERSION, [2.61],,
-[m4_fatal([this file was generated for autoconf 2.61.
+m4_if(m4_PACKAGE_VERSION, [2.65],,
+[m4_fatal([this file was generated for autoconf 2.65.
You have another version of autoconf. If you want to use that,
you should regenerate the build system entirely.], [63])])
Index: gettext-0.16.1/gettext-tools/examples/aclocal.m4
===================================================================
--- gettext-0.16.1.orig/gettext-tools/examples/aclocal.m4 2006-11-27 09:16:23.000000000 -0800
+++ gettext-0.16.1/gettext-tools/examples/aclocal.m4 2011-03-17 02:26:52.589396683 -0700
@@ -11,8 +11,8 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-m4_if(m4_PACKAGE_VERSION, [2.61],,
-[m4_fatal([this file was generated for autoconf 2.61.
+m4_if(m4_PACKAGE_VERSION, [2.65],,
+[m4_fatal([this file was generated for autoconf 2.65.
You have another version of autoconf. If you want to use that,
you should regenerate the build system entirely.], [63])])

View File

@ -1,348 +0,0 @@
This patch removes the circular dependency on AC_GNU_SOURCE in
AC_USE_SYSTEM_EXTENSIONS.
Thanks to Mark Hatle for the timely pointers and fixes.
Upstream-Status: Inappropriate [licensing]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
diff -ru gettext-0.16.1/gettext-runtime/gnulib-m4/extensions.m4 gettext.patched/gettext-runtime/gnulib-m4/extensions.m4
--- gettext-0.16.1/gettext-runtime/gnulib-m4/extensions.m4 2006-11-27 09:14:38.000000000 -0800
+++ gettext.patched/gettext-runtime/gnulib-m4/extensions.m4 2011-03-16 23:54:01.711923448 -0700
@@ -16,43 +16,47 @@
# ------------------------
# Enable extensions on systems that normally disable them,
# typically due to standards-conformance issues.
-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
-[
- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
- AC_BEFORE([$0], [AC_RUN_IFELSE])
-
- AC_REQUIRE([AC_GNU_SOURCE])
- AC_REQUIRE([AC_AIX])
- AC_REQUIRE([AC_MINIX])
-
- AH_VERBATIM([__EXTENSIONS__],
-[/* Enable extensions on Solaris. */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
-#endif
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# undef _POSIX_PTHREAD_SEMANTICS
-#endif
-#ifndef _TANDEM_SOURCE
-# undef _TANDEM_SOURCE
-#endif])
- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
- [ac_cv_safe_to_define___extensions__],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([
-# define __EXTENSIONS__ 1
- AC_INCLUDES_DEFAULT])],
- [ac_cv_safe_to_define___extensions__=yes],
- [ac_cv_safe_to_define___extensions__=no])])
- test $ac_cv_safe_to_define___extensions__ = yes &&
- AC_DEFINE([__EXTENSIONS__])
- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
- AC_DEFINE([_TANDEM_SOURCE])
-])
+#AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
+#[
+# AC_BEFORE([$0], [AC_COMPILE_IFELSE])
+# AC_BEFORE([$0], [AC_RUN_IFELSE])
+#
+# AC_REQUIRE([AC_GNU_SOURCE])
+# AC_REQUIRE([AC_AIX])
+# AC_REQUIRE([AC_MINIX])
+#
+# AH_VERBATIM([__EXTENSIONS__],
+#[/* Enable extensions on Solaris. */
+##ifndef __EXTENSIONS__
+## undef __EXTENSIONS__
+##endif
+##ifndef _POSIX_PTHREAD_SEMANTICS
+## undef _POSIX_PTHREAD_SEMANTICS
+##endif
+##ifndef _TANDEM_SOURCE
+## undef _TANDEM_SOURCE
+##endif])
+# AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
+# [ac_cv_safe_to_define___extensions__],
+# [AC_COMPILE_IFELSE(
+# [AC_LANG_PROGRAM([
+## define __EXTENSIONS__ 1
+# AC_INCLUDES_DEFAULT])],
+# [ac_cv_safe_to_define___extensions__=yes],
+# [ac_cv_safe_to_define___extensions__=no])])
+# test $ac_cv_safe_to_define___extensions__ = yes &&
+# AC_DEFINE([__EXTENSIONS__])
+# AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+# AC_DEFINE([_TANDEM_SOURCE])
+#])
# gl_USE_SYSTEM_EXTENSIONS
# ------------------------
# Enable extensions on systems that normally disable them,
# typically due to standards-conformance issues.
AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS],
- [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])])
+[
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+])
diff -ru gettext-0.16.1/gettext-runtime/gnulib-m4/gnulib-comp.m4 gettext.patched/gettext-runtime/gnulib-m4/gnulib-comp.m4
--- gettext-0.16.1/gettext-runtime/gnulib-m4/gnulib-comp.m4 2006-11-27 09:33:19.000000000 -0800
+++ gettext.patched/gettext-runtime/gnulib-m4/gnulib-comp.m4 2011-03-16 23:50:17.471531838 -0700
@@ -25,7 +25,7 @@
m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
AC_REQUIRE([AC_PROG_RANLIB])
- AC_REQUIRE([AC_GNU_SOURCE])
+ dnl AC_REQUIRE([AC_GNU_SOURCE])
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
])
diff -ru gettext-0.16.1/gettext-runtime/gnulib-m4/mbchar.m4 gettext.patched/gettext-runtime/gnulib-m4/mbchar.m4
--- gettext-0.16.1/gettext-runtime/gnulib-m4/mbchar.m4 2006-11-27 09:14:38.000000000 -0800
+++ gettext.patched/gettext-runtime/gnulib-m4/mbchar.m4 2011-03-16 23:50:10.814396529 -0700
@@ -9,7 +9,7 @@
AC_DEFUN([gl_MBCHAR],
[
- AC_REQUIRE([AC_GNU_SOURCE])
+ dnl AC_REQUIRE([AC_GNU_SOURCE])
dnl The following line is that so the user can test HAVE_WCHAR_H
dnl before #include "mbchar.h".
AC_CHECK_HEADERS_ONCE([wchar.h])
diff -ru gettext-0.16.1/gettext-runtime/gnulib-m4/wcwidth.m4 gettext.patched/gettext-runtime/gnulib-m4/wcwidth.m4
--- gettext-0.16.1/gettext-runtime/gnulib-m4/wcwidth.m4 2006-11-27 09:14:38.000000000 -0800
+++ gettext.patched/gettext-runtime/gnulib-m4/wcwidth.m4 2011-03-16 23:50:08.357396247 -0700
@@ -7,7 +7,7 @@
AC_DEFUN([gl_FUNC_WCWIDTH],
[
dnl Persuade glibc <wchar.h> to declare wcwidth().
- AC_REQUIRE([AC_GNU_SOURCE])
+ dnl AC_REQUIRE([AC_GNU_SOURCE])
AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([gt_TYPE_WCHAR_T])
diff -ru gettext-0.16.1/gettext-runtime/m4/lock.m4 gettext.patched/gettext-runtime/m4/lock.m4
--- gettext-0.16.1/gettext-runtime/m4/lock.m4 2006-10-24 13:59:59.000000000 -0700
+++ gettext.patched/gettext-runtime/m4/lock.m4 2011-03-16 23:50:04.355891676 -0700
@@ -35,7 +35,7 @@
AC_BEFORE([$0], [gl_ARGP])dnl
AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_GNU_SOURCE]) dnl needed for pthread_rwlock_t on glibc systems
+ dnl AC_REQUIRE([AC_GNU_SOURCE]) dnl needed for pthread_rwlock_t on glibc systems
dnl Check for multithreading.
AC_ARG_ENABLE(threads,
AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API])
diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/extensions.m4 gettext.patched/gettext-tools/gnulib-m4/extensions.m4
--- gettext-0.16.1/gettext-tools/gnulib-m4/extensions.m4 2006-11-27 09:14:54.000000000 -0800
+++ gettext.patched/gettext-tools/gnulib-m4/extensions.m4 2011-03-16 23:53:28.487671266 -0700
@@ -16,43 +16,47 @@
# ------------------------
# Enable extensions on systems that normally disable them,
# typically due to standards-conformance issues.
-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
-[
- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
- AC_BEFORE([$0], [AC_RUN_IFELSE])
-
- AC_REQUIRE([AC_GNU_SOURCE])
- AC_REQUIRE([AC_AIX])
- AC_REQUIRE([AC_MINIX])
-
- AH_VERBATIM([__EXTENSIONS__],
-[/* Enable extensions on Solaris. */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
-#endif
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# undef _POSIX_PTHREAD_SEMANTICS
-#endif
-#ifndef _TANDEM_SOURCE
-# undef _TANDEM_SOURCE
-#endif])
- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
- [ac_cv_safe_to_define___extensions__],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([
-# define __EXTENSIONS__ 1
- AC_INCLUDES_DEFAULT])],
- [ac_cv_safe_to_define___extensions__=yes],
- [ac_cv_safe_to_define___extensions__=no])])
- test $ac_cv_safe_to_define___extensions__ = yes &&
- AC_DEFINE([__EXTENSIONS__])
- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
- AC_DEFINE([_TANDEM_SOURCE])
-])
+#AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
+#[
+# AC_BEFORE([$0], [AC_COMPILE_IFELSE])
+# AC_BEFORE([$0], [AC_RUN_IFELSE])
+#
+# AC_REQUIRE([AC_GNU_SOURCE])
+# AC_REQUIRE([AC_AIX])
+# AC_REQUIRE([AC_MINIX])
+#
+# AH_VERBATIM([__EXTENSIONS__],
+#[/* Enable extensions on Solaris. */
+##ifndef __EXTENSIONS__
+## undef __EXTENSIONS__
+##endif
+##ifndef _POSIX_PTHREAD_SEMANTICS
+## undef _POSIX_PTHREAD_SEMANTICS
+##endif
+##ifndef _TANDEM_SOURCE
+## undef _TANDEM_SOURCE
+##endif])
+# AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
+# [ac_cv_safe_to_define___extensions__],
+# [AC_COMPILE_IFELSE(
+# [AC_LANG_PROGRAM([
+## define __EXTENSIONS__ 1
+# AC_INCLUDES_DEFAULT])],
+# [ac_cv_safe_to_define___extensions__=yes],
+# [ac_cv_safe_to_define___extensions__=no])])
+# test $ac_cv_safe_to_define___extensions__ = yes &&
+# AC_DEFINE([__EXTENSIONS__])
+# AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+# AC_DEFINE([_TANDEM_SOURCE])
+#])
# gl_USE_SYSTEM_EXTENSIONS
# ------------------------
# Enable extensions on systems that normally disable them,
# typically due to standards-conformance issues.
AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS],
- [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])])
+[
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+])
diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/fnmatch.m4 gettext.patched/gettext-tools/gnulib-m4/fnmatch.m4
--- gettext-0.16.1/gettext-tools/gnulib-m4/fnmatch.m4 2006-11-27 09:14:54.000000000 -0800
+++ gettext.patched/gettext-tools/gnulib-m4/fnmatch.m4 2011-03-16 23:52:06.477463671 -0700
@@ -91,7 +91,7 @@
AC_DEFUN([gl_FUNC_FNMATCH_GNU],
[
dnl Persuade glibc <fnmatch.h> to declare FNM_CASEFOLD etc.
- AC_REQUIRE([AC_GNU_SOURCE])
+ dnl AC_REQUIRE([AC_GNU_SOURCE])
FNMATCH_H=
_AC_FUNC_FNMATCH_IF([GNU], [ac_cv_func_fnmatch_gnu],
diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/getdelim.m4 gettext.patched/gettext-tools/gnulib-m4/getdelim.m4
--- gettext-0.16.1/gettext-tools/gnulib-m4/getdelim.m4 2006-11-27 09:14:54.000000000 -0800
+++ gettext.patched/gettext-tools/gnulib-m4/getdelim.m4 2011-03-16 23:52:22.871674845 -0700
@@ -12,7 +12,7 @@
[
dnl Persuade glibc <stdio.h> to declare getdelim().
- AC_REQUIRE([AC_GNU_SOURCE])
+ dnl AC_REQUIRE([AC_GNU_SOURCE])
AC_REPLACE_FUNCS(getdelim)
AC_CHECK_DECLS_ONCE(getdelim)
diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/getline.m4 gettext.patched/gettext-tools/gnulib-m4/getline.m4
--- gettext-0.16.1/gettext-tools/gnulib-m4/getline.m4 2006-11-27 09:14:54.000000000 -0800
+++ gettext.patched/gettext-tools/gnulib-m4/getline.m4 2011-03-16 23:51:49.829971108 -0700
@@ -16,7 +16,7 @@
AC_DEFUN([gl_FUNC_GETLINE],
[
dnl Persuade glibc <stdio.h> to declare getline().
- AC_REQUIRE([AC_GNU_SOURCE])
+ dnl AC_REQUIRE([AC_GNU_SOURCE])
AC_CHECK_DECLS([getline])
diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/gnulib-comp.m4 gettext.patched/gettext-tools/gnulib-m4/gnulib-comp.m4
--- gettext-0.16.1/gettext-tools/gnulib-m4/gnulib-comp.m4 2006-11-27 09:33:36.000000000 -0800
+++ gettext.patched/gettext-tools/gnulib-m4/gnulib-comp.m4 2011-03-16 23:52:18.970450488 -0700
@@ -25,7 +25,7 @@
m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
AC_REQUIRE([AC_PROG_RANLIB])
- AC_REQUIRE([AC_GNU_SOURCE])
+ dnl AC_REQUIRE([AC_GNU_SOURCE])
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_LOCK_EARLY])
])
diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/mbchar.m4 gettext.patched/gettext-tools/gnulib-m4/mbchar.m4
--- gettext-0.16.1/gettext-tools/gnulib-m4/mbchar.m4 2006-11-27 09:14:55.000000000 -0800
+++ gettext.patched/gettext-tools/gnulib-m4/mbchar.m4 2011-03-16 23:51:40.844410216 -0700
@@ -9,7 +9,7 @@
AC_DEFUN([gl_MBCHAR],
[
- AC_REQUIRE([AC_GNU_SOURCE])
+ dnl AC_REQUIRE([AC_GNU_SOURCE])
dnl The following line is that so the user can test HAVE_WCHAR_H
dnl before #include "mbchar.h".
AC_CHECK_HEADERS_ONCE([wchar.h])
diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/stpcpy.m4 gettext.patched/gettext-tools/gnulib-m4/stpcpy.m4
--- gettext-0.16.1/gettext-tools/gnulib-m4/stpcpy.m4 2006-11-27 09:14:55.000000000 -0800
+++ gettext.patched/gettext-tools/gnulib-m4/stpcpy.m4 2011-03-16 23:52:14.691396045 -0700
@@ -7,7 +7,7 @@
AC_DEFUN([gl_FUNC_STPCPY],
[
dnl Persuade glibc <string.h> to declare stpcpy().
- AC_REQUIRE([AC_GNU_SOURCE])
+ dnl AC_REQUIRE([AC_GNU_SOURCE])
AC_REPLACE_FUNCS(stpcpy)
if test $ac_cv_func_stpcpy = no; then
diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/stpncpy.m4 gettext.patched/gettext-tools/gnulib-m4/stpncpy.m4
--- gettext-0.16.1/gettext-tools/gnulib-m4/stpncpy.m4 2006-11-27 09:14:55.000000000 -0800
+++ gettext.patched/gettext-tools/gnulib-m4/stpncpy.m4 2011-03-16 23:52:10.356641459 -0700
@@ -7,7 +7,7 @@
AC_DEFUN([gl_FUNC_STPNCPY],
[
dnl Persuade glibc <string.h> to declare stpncpy().
- AC_REQUIRE([AC_GNU_SOURCE])
+ dnl AC_REQUIRE([AC_GNU_SOURCE])
dnl Both glibc and AIX (4.3.3, 5.1) have an stpncpy() function
dnl declared in <string.h>. Its side effects are the same as those
diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/wcwidth.m4 gettext.patched/gettext-tools/gnulib-m4/wcwidth.m4
--- gettext-0.16.1/gettext-tools/gnulib-m4/wcwidth.m4 2006-11-27 09:14:55.000000000 -0800
+++ gettext.patched/gettext-tools/gnulib-m4/wcwidth.m4 2011-03-16 23:51:08.260324221 -0700
@@ -7,7 +7,7 @@
AC_DEFUN([gl_FUNC_WCWIDTH],
[
dnl Persuade glibc <wchar.h> to declare wcwidth().
- AC_REQUIRE([AC_GNU_SOURCE])
+ dnl AC_REQUIRE([AC_GNU_SOURCE])
AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([gt_TYPE_WCHAR_T])
diff -ru gettext-0.16.1/gettext-tools/libgettextpo/gnulib-m4/gnulib-comp.m4 gettext.patched/gettext-tools/libgettextpo/gnulib-m4/gnulib-comp.m4
--- gettext-0.16.1/gettext-tools/libgettextpo/gnulib-m4/gnulib-comp.m4 2006-11-27 09:33:45.000000000 -0800
+++ gettext.patched/gettext-tools/libgettextpo/gnulib-m4/gnulib-comp.m4 2011-03-16 23:51:02.036061317 -0700
@@ -25,7 +25,7 @@
m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
AC_REQUIRE([AC_PROG_RANLIB])
- AC_REQUIRE([AC_GNU_SOURCE])
+ dnl AC_REQUIRE([AC_GNU_SOURCE])
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_LOCK_EARLY])
])
diff -ru gettext-0.16.1/gettext-tools/m4/regex.m4 gettext.patched/gettext-tools/m4/regex.m4
--- gettext-0.16.1/gettext-tools/m4/regex.m4 2006-11-27 09:02:05.000000000 -0800
+++ gettext.patched/gettext-tools/m4/regex.m4 2011-03-16 23:50:53.533477195 -0700
@@ -116,7 +116,7 @@
dnl to get them.
dnl Persuade glibc <string.h> to declare mempcpy().
- AC_REQUIRE([AC_GNU_SOURCE])
+ dnl AC_REQUIRE([AC_GNU_SOURCE])
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([AC_FUNC_ALLOCA])

View File

@ -1,19 +0,0 @@
# Pulled from OpenEmbedded
#
# Commented by: Saul Wold <saul.wold@intel.com>
Upstream-Status: Inappropriate [licensing]
--- gettext-0.17/autoconf-lib-link/m4/lib-link.m4~ 2009-04-17 15:12:30.000000000 -0700
+++ gettext-0.17/autoconf-lib-link/m4/lib-link.m4 2009-04-17 15:37:39.000000000 -0700
@@ -267,6 +267,9 @@
fi
fi
fi
+ dnl Just let the compiler find the library, the compiler and user are smarter then this script
+ dnl when cross compiling and working with a relocated install.
+ found_dir=""
if test "X$found_dir" = "X"; then
for x in $LDFLAGS $LTLIB[]NAME; do
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])

View File

@ -1,20 +0,0 @@
# Pulled from OpenEmbedded
#
# Commented by: Saul Wold <saul.wold@intel.com>
Upstream-Status: Inappropriate [licensing]
Index: gettext-0.16.1/gettext-runtime/intl/Makefile.in
===================================================================
--- gettext-0.16.1.orig/gettext-runtime/intl/Makefile.in 2006-11-27 09:02:00.000000000 -0800
+++ gettext-0.16.1/gettext-runtime/intl/Makefile.in 2011-03-16 16:04:49.175419930 -0700
@@ -35,7 +35,7 @@
# 'make' does the wrong thing if GNU gettext was configured with
# "./configure --srcdir=`pwd`", namely it gets confused by the .lo and .la
# files it finds in srcdir = ../../gettext-runtime/intl.
-VPATH = $(srcdir)
+#VPATH = $(srcdir)
prefix = @prefix@
exec_prefix = @exec_prefix@

View File

@ -1,51 +0,0 @@
This patch hardcodes in version 0.17 for the GETTEXT_MACRO_VERSION,
the version check is only part of 0.17 and will not affect any 0.16.1
operations
Upstream-Status: Inappropriate [licensing]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Index: gettext-0.16.1/gettext-runtime/m4/po.m4
===================================================================
--- gettext-0.16.1.orig/gettext-runtime/m4/po.m4 2011-03-17 02:24:28.953520231 -0700
+++ gettext-0.16.1/gettext-runtime/m4/po.m4 2011-03-17 02:28:25.455396862 -0700
@@ -27,6 +27,9 @@
AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
AC_REQUIRE([AM_NLS])dnl
+ dnl Hardcode the MACRO_VERSION to 0.17 for gnutls
+ AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
+
dnl Perform the following tests also if --disable-nls has been given,
dnl because they are needed for "make dist" to work.
Index: gettext-0.16.1/gettext-runtime/po/Makefile.in.in
===================================================================
--- gettext-0.16.1.orig/gettext-runtime/po/Makefile.in.in 2011-03-17 02:24:28.953520231 -0700
+++ gettext-0.16.1/gettext-runtime/po/Makefile.in.in 2011-03-17 02:28:07.574395144 -0700
@@ -10,6 +10,9 @@
#
# Origin: gettext-0.16
+# Hardcode this value for gnutls building against gplv2 code
+GETTEXT_MACRO_VERSION = 0.17
+
PACKAGE = @PACKAGE@
VERSION = @VERSION@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
Index: gettext-0.16.1/gettext-tools/po/Makefile.in.in
===================================================================
--- gettext-0.16.1.orig/gettext-tools/po/Makefile.in.in 2011-03-17 02:24:28.953520231 -0700
+++ gettext-0.16.1/gettext-tools/po/Makefile.in.in 2011-03-17 02:28:07.574395144 -0700
@@ -10,6 +10,9 @@
#
# Origin: gettext-0.16
+# Hardcode this value for gnutls building against gplv2 code
+GETTEXT_MACRO_VERSION = 0.17
+
PACKAGE = @PACKAGE@
VERSION = @VERSION@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@

View File

@ -1,720 +0,0 @@
# Pulled from OpenEmbedded
#
# Commented by: Saul Wold <saul.wold@intel.com>
Upstream-Status: Inappropriate [licensing]
Index: gettext-0.16.1/autoconf-lib-link/m4/lib-link.m4
===================================================================
--- gettext-0.16.1.orig/autoconf-lib-link/m4/lib-link.m4 2006-11-27 09:01:58.000000000 -0800
+++ gettext-0.16.1/autoconf-lib-link/m4/lib-link.m4 2011-03-17 00:36:08.710836720 -0700
@@ -6,12 +6,14 @@
dnl From Bruno Haible.
-AC_PREREQ(2.50)
+AC_PREREQ(2.54)
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
dnl the libraries corresponding to explicit and implicit dependencies.
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
dnl augments the CPPFLAGS variable.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
AC_DEFUN([AC_LIB_LINKFLAGS],
[
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
@@ -24,13 +26,16 @@
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+ ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
])
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+ LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
AC_SUBST([LIB]NAME)
AC_SUBST([LTLIB]NAME)
+ AC_SUBST([LIB]NAME[_PREFIX])
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
dnl results of this search when this library appears as a dependency.
HAVE_LIB[]NAME=yes
@@ -46,6 +51,8 @@
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
[
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
@@ -82,17 +89,24 @@
CPPFLAGS="$ac_save_CPPFLAGS"
LIB[]NAME=
LTLIB[]NAME=
+ LIB[]NAME[]_PREFIX=
+
fi
AC_SUBST([HAVE_LIB]NAME)
AC_SUBST([LIB]NAME)
AC_SUBST([LTLIB]NAME)
+ AC_SUBST([LIB]NAME[_PREFIX])
undefine([Name])
undefine([NAME])
])
dnl Determine the platform dependent parameters needed to use rpath:
-dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
-dnl hardcode_direct, hardcode_minus_L.
+dnl acl_libext,
+dnl acl_shlibext,
+dnl acl_hardcode_libdir_flag_spec,
+dnl acl_hardcode_libdir_separator,
+dnl acl_hardcode_direct,
+dnl acl_hardcode_minus_L.
AC_DEFUN([AC_LIB_RPATH],
[
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
@@ -109,12 +123,14 @@
acl_cv_rpath=done
])
wl="$acl_cv_wl"
- libext="$acl_cv_libext"
- shlibext="$acl_cv_shlibext"
- hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
- hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
- hardcode_direct="$acl_cv_hardcode_direct"
- hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ acl_libext="$acl_cv_libext"
+ acl_shlibext="$acl_cv_shlibext"
+ acl_libname_spec="$acl_cv_libname_spec"
+ acl_library_names_spec="$acl_cv_library_names_spec"
+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ acl_hardcode_direct="$acl_cv_hardcode_direct"
+ acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
dnl Determine whether the user wants rpath handling at all.
AC_ARG_ENABLE(rpath,
[ --disable-rpath do not hardcode runtime library paths],
@@ -124,20 +140,24 @@
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
dnl the libraries corresponding to explicit and implicit dependencies.
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
[
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ dnl Autoconf >= 2.61 supports dots in --with options.
+ define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
dnl By default, look in $includedir and $libdir.
use_additional=yes
AC_LIB_WITH_FINAL_PREFIX([
eval additional_includedir=\"$includedir\"
eval additional_libdir=\"$libdir\"
])
- AC_LIB_ARG_WITH([lib$1-prefix],
-[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
- --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
+ AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
+[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
+ --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir],
[
if test "X$withval" = "Xno"; then
use_additional=no
@@ -158,6 +178,7 @@
LIB[]NAME=
LTLIB[]NAME=
INC[]NAME=
+ LIB[]NAME[]_PREFIX=
rpathdirs=
ltrpathdirs=
names_already_handled=
@@ -197,27 +218,53 @@
found_la=
found_so=
found_a=
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
+ if test -n "$acl_shlibext"; then
+ shrext=".$acl_shlibext" # typically: shrext=.so
+ else
+ shrext=
+ fi
if test $use_additional = yes; then
- if test -n "$shlibext" \
- && { test -f "$additional_libdir/lib$name.$shlibext" \
- || { test "$shlibext" = dll \
- && test -f "$additional_libdir/lib$name.dll.a"; }; }; then
- found_dir="$additional_libdir"
- if test -f "$additional_libdir/lib$name.$shlibext"; then
- found_so="$additional_libdir/lib$name.$shlibext"
+ dir="$additional_libdir"
+ dnl The same code as in the loop below:
+ dnl First look for a shared library.
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
else
- found_so="$additional_libdir/lib$name.dll.a"
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
fi
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
+ fi
+ dnl Then look for a static library.
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
fi
- else
- if test -f "$additional_libdir/lib$name.$libext"; then
- found_dir="$additional_libdir"
- found_a="$additional_libdir/lib$name.$libext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
fi
fi
fi
@@ -227,26 +274,44 @@
case "$x" in
-L*)
dir=`echo "X$x" | sed -e 's/^X-L//'`
- if test -n "$shlibext" \
- && { test -f "$dir/lib$name.$shlibext" \
- || { test "$shlibext" = dll \
- && test -f "$dir/lib$name.dll.a"; }; }; then
- found_dir="$dir"
- if test -f "$dir/lib$name.$shlibext"; then
- found_so="$dir/lib$name.$shlibext"
+ dnl First look for a shared library.
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
else
- found_so="$dir/lib$name.dll.a"
- fi
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
fi
- else
- if test -f "$dir/lib$name.$libext"; then
+ fi
+ dnl Then look for a static library.
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
found_dir="$dir"
- found_a="$dir/lib$name.$libext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
fi
fi
;;
@@ -282,12 +347,12 @@
ltrpathdirs="$ltrpathdirs $found_dir"
fi
dnl The hardcoding into $LIBNAME is system dependent.
- if test "$hardcode_direct" = yes; then
+ if test "$acl_hardcode_direct" = yes; then
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
dnl resulting binary.
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
else
- if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
dnl Use an explicit option to hardcode DIR into the resulting
dnl binary.
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
@@ -318,13 +383,13 @@
if test -z "$haveit"; then
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
fi
- if test "$hardcode_minus_L" != no; then
+ if test "$acl_hardcode_minus_L" != no; then
dnl FIXME: Not sure whether we should use
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
dnl here.
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
else
- dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
+ dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
dnl here, because this doesn't fit in flags passed to the
dnl compiler. So give up. No hardcoding. This affects only
dnl very old systems.
@@ -512,18 +577,18 @@
done
done
if test "X$rpathdirs" != "X"; then
- if test -n "$hardcode_libdir_separator"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
dnl Weird platform: only the last -rpath option counts, the user must
dnl pass all path elements in one option. We can arrange that for a
dnl single library, but not when more than one $LIBNAMEs are used.
alldirs=
for found_dir in $rpathdirs; do
- alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
done
- dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
+ dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
acl_save_libdir="$libdir"
libdir="$alldirs"
- eval flag=\"$hardcode_libdir_flag_spec\"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
libdir="$acl_save_libdir"
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
else
@@ -531,7 +596,7 @@
for found_dir in $rpathdirs; do
acl_save_libdir="$libdir"
libdir="$found_dir"
- eval flag=\"$hardcode_libdir_flag_spec\"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
libdir="$acl_save_libdir"
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
done
@@ -642,3 +707,79 @@
fi
AC_SUBST([$1])
])
+
+dnl For those cases where a variable contains several -L and -l options
+dnl referring to unknown libraries and directories, this macro determines the
+dnl necessary additional linker options for the runtime path.
+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
+dnl otherwise linking without libtool is assumed.
+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
+[
+ AC_REQUIRE([AC_LIB_RPATH])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ $1=
+ if test "$enable_rpath" != no; then
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode directories into the resulting
+ dnl binary.
+ rpathdirs=
+ next=
+ for opt in $2; do
+ if test -n "$next"; then
+ dir="$next"
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next=
+ else
+ case $opt in
+ -L) next=yes ;;
+ -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next= ;;
+ *) next= ;;
+ esac
+ fi
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n ""$3""; then
+ dnl libtool is used for linking. Use -R options.
+ for dir in $rpathdirs; do
+ $1="${$1}${$1:+ }-R$dir"
+ done
+ else
+ dnl The linker is used for linking directly.
+ if test -n "$acl_hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user
+ dnl must pass all path elements in one option.
+ alldirs=
+ for dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="${$1}${$1:+ }$flag"
+ done
+ fi
+ fi
+ fi
+ fi
+ fi
+ AC_SUBST([$1])
+])
Index: gettext-0.16.1/autoconf-lib-link/config.rpath
===================================================================
--- gettext-0.16.1.orig/autoconf-lib-link/config.rpath 2006-11-27 09:01:58.000000000 -0800
+++ gettext-0.16.1/autoconf-lib-link/config.rpath 2011-03-17 00:33:23.336539490 -0700
@@ -2,7 +2,7 @@
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
-# Copyright 1996-2006 Free Software Foundation, Inc.
+# Copyright 1996-2007 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
@@ -47,6 +47,18 @@
done
cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
+# Code taken from libtool.m4's _LT_CC_BASENAME.
+
+for cc_temp in $CC""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
+
# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
wl=
@@ -64,7 +76,14 @@
;;
esac
;;
- mingw* | pw32* | os2*)
+ darwin*)
+ case $cc_basename in
+ xlc*)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ mingw* | cygwin* | pw32* | os2*)
;;
hpux9* | hpux10* | hpux11*)
wl='-Wl,'
@@ -74,7 +93,7 @@
;;
newsos6)
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
icc* | ecc*)
wl='-Wl,'
@@ -100,7 +119,7 @@
osf3* | osf4* | osf5*)
wl='-Wl,'
;;
- sco3.2v5*)
+ rdos*)
;;
solaris*)
wl='-Wl,'
@@ -108,11 +127,14 @@
sunos4*)
wl='-Qoption ld '
;;
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ sysv4 | sysv4.2uw2* | sysv4.3*)
wl='-Wl,'
;;
sysv4*MP*)
;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ wl='-Wl,'
+ ;;
unicos*)
wl='-Wl,'
;;
@@ -141,6 +163,10 @@
# we just hope/assume this is gcc and not c89 (= MSVC++)
with_gnu_ld=yes
;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
openbsd*)
with_gnu_ld=no
;;
@@ -189,11 +215,11 @@
ld_shlibs=no
fi
;;
- interix3*)
+ interix[3-9]*)
hardcode_direct=no
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
- linux*)
+ gnu* | linux* | k*bsd*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
@@ -280,7 +306,7 @@
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- hardcode_direct=yes
+ :
else
# We have old collect2
hardcode_direct=unsupported
@@ -359,7 +385,7 @@
hardcode_direct=yes
hardcode_minus_L=yes
;;
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
@@ -412,18 +438,22 @@
hardcode_libdir_separator=:
;;
openbsd*)
- hardcode_direct=yes
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ else
+ case "$host_os" in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
else
- case "$host_os" in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- hardcode_libdir_flag_spec='-R$libdir'
- ;;
- *)
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- ;;
- esac
+ ld_shlibs=no
fi
;;
os2*)
@@ -471,7 +501,7 @@
ld_shlibs=yes
fi
;;
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* |sco3.2v5.0.[024]*)
;;
sysv5* | sco3.2v5* | sco5v6*)
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
@@ -488,33 +518,51 @@
# Check dynamic linker characteristics
# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
+# Unlike libtool.m4, here we don't care about _all_ names of the library, but
+# only about the one the linker finds when passed -lNAME. This is the last
+# element of library_names_spec in libtool.m4, or possibly two of them if the
+# linker has special search rules.
+library_names_spec= # the last element of library_names_spec in libtool.m4
libname_spec='lib$name'
case "$host_os" in
aix3*)
+ library_names_spec='$libname.a'
;;
aix4* | aix5*)
+ library_names_spec='$libname$shrext'
;;
amigaos*)
+ library_names_spec='$libname.a'
;;
beos*)
+ library_names_spec='$libname$shrext'
;;
bsdi[45]*)
+ library_names_spec='$libname$shrext'
;;
cygwin* | mingw* | pw32*)
shrext=.dll
+ library_names_spec='$libname.dll.a $libname.lib'
;;
darwin* | rhapsody*)
shrext=.dylib
+ library_names_spec='$libname$shrext'
;;
dgux*)
+ library_names_spec='$libname$shrext'
;;
freebsd1*)
;;
- kfreebsd*-gnu)
- ;;
freebsd* | dragonfly*)
+ case "$host_os" in
+ freebsd[123]*)
+ library_names_spec='$libname$shrext$versuffix' ;;
+ *)
+ library_names_spec='$libname$shrext' ;;
+ esac
;;
gnu*)
+ library_names_spec='$libname$shrext'
;;
hpux9* | hpux10* | hpux11*)
case $host_cpu in
@@ -528,10 +576,13 @@
shrext=.sl
;;
esac
+ library_names_spec='$libname$shrext'
;;
- interix3*)
+ interix[3-9]*)
+ library_names_spec='$libname$shrext'
;;
irix5* | irix6* | nonstopux*)
+ library_names_spec='$libname$shrext'
case "$host_os" in
irix5* | nonstopux*)
libsuff= shlibsuff=
@@ -548,33 +599,46 @@
;;
linux*oldld* | linux*aout* | linux*coff*)
;;
- linux*)
+ linux* | k*bsd*-gnu)
+ library_names_spec='$libname$shrext'
;;
knetbsd*-gnu)
+ library_names_spec='$libname$shrext'
;;
netbsd*)
+ library_names_spec='$libname$shrext'
;;
newsos6)
+ library_names_spec='$libname$shrext'
;;
nto-qnx*)
+ library_names_spec='$libname$shrext'
;;
openbsd*)
+ library_names_spec='$libname$shrext$versuffix'
;;
os2*)
libname_spec='$name'
shrext=.dll
+ library_names_spec='$libname.a'
;;
osf3* | osf4* | osf5*)
+ library_names_spec='$libname$shrext'
;;
solaris*)
+ library_names_spec='$libname$shrext'
;;
sunos4*)
+ library_names_spec='$libname$shrext$versuffix'
;;
sysv4 | sysv4.3*)
+ library_names_spec='$libname$shrext'
;;
sysv4*MP*)
+ library_names_spec='$libname$shrext'
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ library_names_spec='$libname$shrext'
;;
uts4*)
;;
@@ -583,6 +647,8 @@
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
@@ -596,6 +662,12 @@
# Shared library suffix (normally "so").
shlibext="$shlibext"
+# Format of library name prefix.
+libname_spec="$escaped_libname_spec"
+
+# Library names that the linker finds when passed -lNAME.
+library_names_spec="$escaped_library_names_spec"
+
# Flag to hardcode \$libdir into a binary during linking.
# This must work even if \$libdir does not exist.
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"

View File

@ -1,124 +0,0 @@
SUMMARY = "Utilities and libraries for producing multi-lingual messages"
DESCRIPTION = "GNU gettext is a set of tools that provides a framework to help other programs produce multi-lingual messages. These tools include a set of conventions about how programs should be written to support message catalogs, a directory and file naming organization for the message catalogs themselves, a runtime library supporting the retrieval of translated messages, and a few stand-alone programs to massage in various ways the sets of translatable and already translated strings."
HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html"
SECTION = "libs"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=9ea3144f04c41cd2eada5d3f472e6ea5"
PR = "r6"
DEPENDS = "virtual/libiconv"
DEPENDS_class-native = ""
PROVIDES = "virtual/libintl virtual/gettext"
PROVIDES_class-native = "virtual/gettext-native"
SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
file://gettext-vpath.patch \
file://linklib_from_0.17.patch \
file://gettext-autoconf-lib-link-no-L.patch \
file://disable_java.patch \
file://fix_aclocal_version.patch \
file://fix_gnu_source_circular.patch \
file://hardcode_macro_version.patch \
"
SRC_URI[md5sum] = "3d9ad24301c6d6b17ec30704a13fe127"
SRC_URI[sha256sum] = "0bf850d1a079fb5a61f0a47b1a9efd35eb44032255375e1cedb0253bc27b376d"
PARALLEL_MAKE = ""
LDFLAGS_prepend_libc-uclibc = " -lrt -lpthread "
inherit autotools texinfo
EXTRA_OECONF += "--without-lispdir \
--disable-csharp \
--disable-libasprintf \
--disable-java \
--disable-native-java \
--disable-openmp \
--without-emacs \
"
EXTRA_OECONF_append_libc-musl = "\
gt_cv_func_gnugettext1_libc=yes \
gt_cv_func_gnugettext2_libc=yes \
"
acpaths = '-I ${S}/autoconf-lib-link/m4/ \
-I ${S}/gettext-runtime/m4 \
-I ${S}/gettext-tools/m4'
do_configure_prepend() {
rm -f ${S}/config/m4/libtool.m4
}
do_install_append_libc-musl () {
rm -f ${D}${libdir}/charset.alias
}
# these lack the .x behind the .so, but shouldn't be in the -dev package
# Otherwise you get the following results:
# 7.4M glibc/images/ep93xx/Angstrom-console-image-glibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz
# 25M uclibc/images/ep93xx/Angstrom-console-image-uclibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz
# because gettext depends on gettext-dev, which pulls in more -dev packages:
# 15228 KiB /ep93xx/libstdc++-dev_4.2.2-r2_ep93xx.ipk
# 1300 KiB /ep93xx/uclibc-dev_0.9.29-r8_ep93xx.ipk
# 140 KiB /armv4t/gettext-dev_0.14.1-r6_armv4t.ipk
# 4 KiB /ep93xx/libgcc-s-dev_4.2.2-r2_ep93xx.ipk
PACKAGES =+ "libgettextlib libgettextsrc"
FILES_libgettextlib = "${libdir}/libgettextlib-*.so*"
FILES_libgettextsrc = "${libdir}/libgettextsrc-*.so*"
PACKAGES =+ "gettext-runtime gettext-runtime-dev gettext-runtime-staticdev gettext-runtime-doc"
FILES_${PN} += "${libdir}/${BPN}/*"
FILES_gettext-runtime = "${bindir}/gettext \
${bindir}/ngettext \
${bindir}/envsubst \
${bindir}/gettext.sh \
${libdir}/libasprintf${SODEV} \
${libdir}/GNU.Gettext.dll \
"
FILES_gettext-runtime_append_libc-uclibc = " ${libdir}/libintl.so.* \
${libdir}/charset.alias \
"
FILES_gettext-runtime-staticdev += "${libdir}/libasprintf.a"
FILES_gettext-runtime-dev += "${includedir}/autosprintf.h \
${libdir}/libasprintf${SOLIBDEV}"
FILES_gettext-runtime-dev_append_libc-uclibc = " ${libdir}/libintl.so \
${includedir}/libintl.h \
"
FILES_gettext-runtime-doc = "${mandir}/man1/gettext.* \
${mandir}/man1/ngettext.* \
${mandir}/man1/envsubst.* \
${mandir}/man1/.* \
${mandir}/man3/* \
${docdir}/gettext/gettext.* \
${docdir}/gettext/ngettext.* \
${docdir}/gettext/envsubst.* \
${docdir}/gettext/*.3.html \
${datadir}/gettext/ABOUT-NLS \
${docdir}/gettext/csharpdoc/* \
${docdir}/libasprintf/autosprintf.html \
${infodir}/autosprintf.info \
"
do_install_append() {
rm -f ${D}${libdir}/preloadable_libintl.so
}
do_install_append_class-native () {
rm ${D}${datadir}/aclocal/*
rm ${D}${datadir}/gettext/config.rpath
rm ${D}${datadir}/gettext/po/Makefile.in.in
rm ${D}${datadir}/gettext/po/remove-potcdate.sin
}
# Anyone inheriting gettext will have both gettext-native and gettext
# available, and we don't want to use older macros from the target gettext in
# a non-gplv3 build, so kill them and let dependent recipes rely on
# gettext-native.
SYSROOT_DIRS_BLACKLIST += "${datadir}/aclocal"
BBCLASSEXTEND = "native nativesdk"

View File

@ -1,26 +0,0 @@
Upstream-Status: Pending
Without this it fails to link against libtermcap causing various missing symbols
issues.
RP - 8/10/08
Index: readline-5.2/configure.in
===================================================================
--- readline-5.2.orig/configure.in 2008-10-08 09:58:52.000000000 +0100
+++ readline-5.2/configure.in 2008-10-08 09:59:03.000000000 +0100
@@ -211,10 +211,10 @@
AC_MSG_CHECKING(configuration for building shared libraries)
eval `TERMCAP_LIB=$TERMCAP_LIB ${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
-# case "$SHLIB_LIBS" in
-# *curses*|*termcap*|*termlib*) ;;
-# *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;;
-# esac
+ case "$SHLIB_LIBS" in
+ *curses*|*termcap*|*termlib*) ;;
+ *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;;
+ esac
AC_SUBST(SHOBJ_CC)
AC_SUBST(SHOBJ_CFLAGS)

View File

@ -1,21 +0,0 @@
This support script ends up hardcoding unnecessary rpaths into the libraries. We
will search $libdir automatically so this is just wastes space. There may be some
cases this is necessary but our use cases aren't one of them.
Upstream-Status: Inappropriate
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Index: readline-5.2/support/shobj-conf
===================================================================
--- readline-5.2.orig/support/shobj-conf
+++ readline-5.2/support/shobj-conf
@@ -110,7 +110,7 @@ linux*-*|gnu*-*|k*bsd*-gnu-*)
SHOBJ_LD='${CC}'
SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
- SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
+ SHLIB_XLDFLAGS='-Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
;;

View File

@ -1,84 +0,0 @@
SUMMARY = "Library for editing typed command lines"
DESCRIPTION = "The GNU Readline library provides a set of functions for use by applications that allow users to edit \
command lines as they are typed in. Both Emacs and vi editing modes are available. The Readline library includes \
additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those \
lines, and perform csh-like history expansion on previous commands."
SECTION = "libs"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=03b36fdd84f74b8d8189a202b980b67f"
DEPENDS += "ncurses"
PR = "r9"
SRC_URI = "${GNU_MIRROR}/readline/${BPN}-${PV}.tar.gz;name=archive \
${GNU_MIRROR}/readline/readline-5.2-patches/readline52-001;name=patch1;apply=yes;striplevel=0 \
${GNU_MIRROR}/readline/readline-5.2-patches/readline52-002;name=patch2;apply=yes;striplevel=0 \
${GNU_MIRROR}/readline/readline-5.2-patches/readline52-003;name=patch3;apply=yes;striplevel=0 \
${GNU_MIRROR}/readline/readline-5.2-patches/readline52-004;name=patch4;apply=yes;striplevel=0 \
${GNU_MIRROR}/readline/readline-5.2-patches/readline52-005;name=patch5;apply=yes;striplevel=0 \
${GNU_MIRROR}/readline/readline-5.2-patches/readline52-006;name=patch6;apply=yes;striplevel=0 \
${GNU_MIRROR}/readline/readline-5.2-patches/readline52-007;name=patch7;apply=yes;striplevel=0 \
${GNU_MIRROR}/readline/readline-5.2-patches/readline52-008;name=patch8;apply=yes;striplevel=0 \
${GNU_MIRROR}/readline/readline-5.2-patches/readline52-009;name=patch9;apply=yes;striplevel=0 \
${GNU_MIRROR}/readline/readline-5.2-patches/readline52-010;name=patch10;apply=yes;striplevel=0 \
${GNU_MIRROR}/readline/readline-5.2-patches/readline52-011;name=patch11;apply=yes;striplevel=0 \
${GNU_MIRROR}/readline/readline-5.2-patches/readline52-012;name=patch12;apply=yes;striplevel=0 \
${GNU_MIRROR}/readline/readline-5.2-patches/readline52-013;name=patch13;apply=yes;striplevel=0 \
${GNU_MIRROR}/readline/readline-5.2-patches/readline52-014;name=patch14;apply=yes;striplevel=0 \
file://configure-fix.patch \
file://config-dirent-symbols.patch \
file://fix-redundant-rpath.patch"
SRC_URI[archive.md5sum] = "e39331f32ad14009b9ff49cc10c5e751"
SRC_URI[archive.sha256sum] = "12e88d96aee2cd1192500356f0535540db499282ca7f76339fb4228c31249f45"
SRC_URI[patch1.md5sum] = "9d4d41622aa9b230c57f68548ce87d8f"
SRC_URI[patch1.sha256sum] = "eac304c369154059f93049ada328739faaf40338d3cb1fb4b544c93d5ce3f8d5"
SRC_URI[patch2.md5sum] = "f03e512d14206e37f7d6a748b56b9476"
SRC_URI[patch2.sha256sum] = "9deacaef25507a0c2ae0b661bf9342559b59a2954d66ea3c5f5bcd900fdfcf78"
SRC_URI[patch3.md5sum] = "252b42d8750f1a94b6bdf086612dceb2"
SRC_URI[patch3.sha256sum] = "2a55d2ecb1c9b0147aeb193a6323616ab31c1c525a83b2db3a994b15594ba934"
SRC_URI[patch4.md5sum] = "a32333c2e603a3ed250514e91050e552"
SRC_URI[patch4.sha256sum] = "a03b65633781efa7c3aae5d57162985e7b7a3c10acf0f2621be610e16f27e5f2"
SRC_URI[patch5.md5sum] = "8106796c09b789523a3a78ab69c04b6d"
SRC_URI[patch5.sha256sum] = "06001896514148a757ea6edbbd40c4fc4331dc653847244386c37b138b150f64"
SRC_URI[patch6.md5sum] = "512188e2bf0837f7eca19dbf71f182ae"
SRC_URI[patch6.sha256sum] = "dfef3e982c0adf8bb5a9b7d0468ec8f5f18138b325e28759437464de5be71013"
SRC_URI[patch7.md5sum] = "ac17aca62eb6fb398c9f2fe9de540aff"
SRC_URI[patch7.sha256sum] = "775b028c7b761397ac6ae1bdfbac7e896dc3b9b3adc2f91312499180ca13bdd1"
SRC_URI[patch8.md5sum] = "2484c392db021905f112cf97a94dfd4c"
SRC_URI[patch8.sha256sum] = "a21b4e0bf0530b878bad24d5be23d18a9e03a75a31ae30844dc0933bb3d77ecd"
SRC_URI[patch9.md5sum] = "fc6eb35d07914fae5c57d49c12483ff7"
SRC_URI[patch9.sha256sum] = "138d5e0f0709a47a2d1621295a3dd5e3cc73b63b5cc28dab03abc4e94fe95ecf"
SRC_URI[patch10.md5sum] = "7a2bf3dc7ac7680b1461a5701100e91b"
SRC_URI[patch10.sha256sum] = "83f8c1aadb86b1a2fad8821a9c6be72a8de5afd7fd9fde58a30b3b57d939693e"
SRC_URI[patch11.md5sum] = "ef6cef6822663470f6ac8c517c5a7ec6"
SRC_URI[patch11.sha256sum] = "08ad3384ab0906e6fa4cc417eb8c43ff59375bcead15fd5c8e31730f0413b3d6"
SRC_URI[patch12.md5sum] = "e3e9f441c8111589855bc363e5640f6c"
SRC_URI[patch12.sha256sum] = "20f0243be2299c23213492cc2c19cfd15cc528d2b566a76a2de58306bb9e4c9e"
SRC_URI[patch13.md5sum] = "3e2e5f543ed268a68fd1fa839faade1a"
SRC_URI[patch13.sha256sum] = "0cc649516a5bdfa61c5e56937407570288b6972d75aa1bd060ad30ebe98144d5"
SRC_URI[patch14.md5sum] = "a1be30e1c6f1099bb5fcef00a2631fb8"
SRC_URI[patch14.sha256sum] = "6f1a68320d01522ca1ea5a737124ecc8739f3dcbfea2dee21e3ccf839a21a817"
inherit autotools
EXTRA_AUTORECONF += "--exclude=autoheader"
LEAD_SONAME = "libreadline.so"
do_configure_prepend () {
if [ ! -e ${S}/acinclude.m4 ]; then
cat ${S}/aclocal.m4 > ${S}/acinclude.m4
fi
}
do_install_append () {
# Make install doesn't properly install these
oe_libinstall -so -C shlib libhistory ${D}${libdir}
oe_libinstall -so -C shlib libreadline ${D}${libdir}
}
BBCLASSEXTEND = "native nativesdk"

View File

@ -1,26 +0,0 @@
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"
SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.gz \
file://bison-2.3_m4.patch"
SRC_URI[md5sum] = "22327efdd5080e2b1acb6e560a04b43a"
SRC_URI[sha256sum] = "52f78aa4761a74ceb7fdf770f3554dd84308c3b93c4255e3a5c17558ecda293e"
inherit autotools gettext texinfo
acpaths = "-I ${S}/m4"
do_configure_prepend () {
rm -f ${S}/m4/*gl.m4
cp ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/runtime-po/
}

View File

@ -1,41 +0,0 @@
From b7c42c6a9829bea911b22201edd7df2a9bec1a14 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 13 Apr 2015 17:52:34 -0700
Subject: [PATCH] Include fcntl.h for getting loff_t definition
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
dosfsck/dosfsck.h | 2 ++
dosfsck/lfn.c | 1 +
2 files changed, 3 insertions(+)
diff --git a/dosfsck/dosfsck.h b/dosfsck/dosfsck.h
index d9314b1..2076d5f 100644
--- a/dosfsck/dosfsck.h
+++ b/dosfsck/dosfsck.h
@@ -50,6 +50,8 @@
#define CT_LE_L(v) (v)
#endif /* __BIG_ENDIAN */
+#include <fcntl.h>
+
#define VFAT_LN_ATTR (ATTR_RO | ATTR_HIDDEN | ATTR_SYS | ATTR_VOLUME)
/* ++roman: Use own definition of boot sector structure -- the kernel headers'
diff --git a/dosfsck/lfn.c b/dosfsck/lfn.c
index 9b2cfc3..bb04fda 100644
--- a/dosfsck/lfn.c
+++ b/dosfsck/lfn.c
@@ -7,6 +7,7 @@
#include <string.h>
#include <limits.h>
#include <time.h>
+#include <fcntl.h>
#include "common.h"
#include "io.h"
--
2.1.4

View File

@ -1,38 +0,0 @@
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 )

View File

@ -1,37 +0,0 @@
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"

View File

@ -1,489 +0,0 @@
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? */

View File

@ -1,22 +0,0 @@
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>

View File

@ -1,241 +0,0 @@
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, "-") )
{

View File

@ -1,639 +0,0 @@
Add -d <directory> support to populate the image.
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/mkdosfs.c
===================================================================
--- dosfstools-2.11.orig/mkdosfs/mkdosfs.c 2011-12-06 12:27:55.000000000 +0000
+++ dosfstools-2.11/mkdosfs/mkdosfs.c 2011-12-06 12:37:13.445950703 +0000
@@ -18,6 +18,10 @@
as a rule), and not the block. For example the boot block does not
occupy a full cluster.
+ 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
+
Fixes/additions May 1998 by Roman Hodek
<Roman.Hodek@informatik.uni-erlangen.de>:
- Atari format support
@@ -71,6 +75,8 @@
#include <unistd.h>
#include <time.h>
#include <errno.h>
+#include <libgen.h>
+#include <dirent.h>
#include <linux/version.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
@@ -110,6 +116,8 @@
* sufficient (or even better :) for 64 bit offsets in the meantime */
#define llseek lseek
+#define ROUND_UP(value, divisor) (value + (divisor - (value % divisor))) / divisor
+
/* Constant definitions */
#define TRUE 1 /* Boolean constants */
@@ -149,7 +157,6 @@
#define ATTR_VOLUME 8 /* volume label */
#define ATTR_DIR 16 /* directory */
#define ATTR_ARCH 32 /* archived */
-
#define ATTR_NONE 0 /* no attribute bits */
#define ATTR_UNUSED (ATTR_VOLUME | ATTR_ARCH | ATTR_SYS | ATTR_HIDDEN)
/* attribute bits that are copied "as is" */
@@ -245,6 +252,19 @@
__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 */
@@ -293,6 +313,15 @@
#define MESSAGE_OFFSET 29 /* Offset of message in above code */
+/* Special structure to keep track of directories as we add them for the -d option */
+
+struct dir_entry {
+ int root; /* Specifies if this is the root dir or not */
+ int count; /* Number of items in the table */
+ int entries; /* Number of entries in the table */
+ struct msdos_dir_entry *table; /* Pointer to the entry table */
+};
+
/* 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 */
@@ -326,6 +355,9 @@
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 */
static int hidden_sectors = 0; /* Number of hidden sectors */
@@ -399,7 +431,6 @@
}
}
-
/* Mark a specified sector as having a particular value in it's FAT entry */
static void
@@ -1266,6 +1297,9 @@
die ("unable to allocate space for root directory in memory");
}
+
+ last_cluster_written = 2;
+
memset(root_dir, 0, size_root_dir);
if ( memcmp(volume_name, " ", 11) )
{
@@ -1314,11 +1348,11 @@
}
if (!(blank_sector = malloc( sector_size )))
- die( "Out of memory" );
+ die( "Out of memory" );
+
memset(blank_sector, 0, sector_size);
}
-
-
+
/* Write the new filesystem's data tables to wherever they're going to end up! */
#define error(str) \
@@ -1340,7 +1374,7 @@
do { \
int __size = (size); \
if (write (dev, buf, __size) != __size) \
- error ("failed whilst writing " errstr); \
+ error ("failed whilst writing " errstr); \
} while(0)
@@ -1412,6 +1446,452 @@
free (fat); /* Free up the fat table space reserved during setup_tables */
}
+/* 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) {
+
+ char *ch = filename;
+ int i, len;
+
+ memset(base, 0x20, 8);
+ memset(ext, 0x20, 3);
+
+ for(len = 0 ; *ch && *ch != '.'; ch++) {
+ base[len++] = toupper(*ch);
+ if (len == 8) break;
+ }
+
+ for ( ; *ch && *ch != '.'; ch++);
+ if (*ch) ch++;
+
+ for(len = 0 ; *ch; ch++) {
+ ext[len++] = toupper(*ch);
+ if (len == 3) break;
+ }
+}
+
+/* Check for an .attrib.<filename> file, and read the attributes therein */
+
+/* We are going to be pretty pedantic about this. The file needs 3
+ bytes at the beginning, the attributes are listed in this order:
+
+ (H)idden|(S)ystem|(A)rchived
+
+ A capital HSA means to enable it, anything else will disable it
+ (I recommend a '-') The unix user attributes will still be used
+ for write access.
+
+ For example, to enable system file access for ldlinux.sys, write
+ the following to .attrib.ldlinux.sys: -S-
+*/
+
+unsigned char check_attrib_file(char *dir, char *filename) {
+
+ char attrib[4] = { '-', '-', '-' };
+ unsigned char *buffer = 0;
+ int ret = ATTR_NONE;
+ int fd = -1;
+
+ buffer = (char *) calloc(1, strlen(dir) + strlen(filename) + 10);
+ if (!buffer) return ATTR_NONE;
+
+ sprintf(buffer, "%s/.attrib.%s", dir, filename);
+
+ if (access(buffer, R_OK))
+ goto exit_attrib;
+
+ if ((fd = open(buffer, O_RDONLY, 0)) < 0)
+ goto exit_attrib;
+
+ if (read(fd, attrib, 3) < 0)
+ goto exit_attrib;
+
+ if (attrib[0] == 'H') ret |= ATTR_HIDDEN;
+ if (attrib[1] == 'S') ret |= ATTR_SYS;
+ if (attrib[2] == 'A') ret |= ATTR_ARCH;
+
+ printf("%s: Setting atrribute %x\n", filename, ret);
+
+ exit_attrib:
+ if (fd >= 0) close(fd);
+ if (buffer) free(buffer);
+
+ return ret;
+}
+
+static void copy_name(char *buffer, int size, char **pointer) {
+ int i;
+
+ for(i = 0; i < size; i += 2) {
+ if (*pointer) {
+ buffer[i] = **pointer;
+ buffer[i + 1] = 0x00;
+ *pointer = **pointer ? *pointer + 1 : 0;
+ }
+ else {
+ buffer[i] = 0xFF;
+ buffer[i + 1] = 0xFF;
+ }
+ }
+}
+
+static int add_file(char *filename, struct dir_entry *dir, unsigned char attr)
+{
+ struct stat stat;
+ struct msdos_dir_entry *entry;
+ int infile = 0;
+ int sectors, clusters;
+ struct tm *ctime;
+ int c, s;
+ int ptr;
+ char *buffer, *base;
+ int start;
+ int usedsec, totalsec;
+
+ char name83[8], ext83[3];
+
+ struct msdos_dir_slot *slot;
+ int i;
+ char *p;
+
+ /* The root directory is static, everything else grows as needed */
+
+ if (dir->root) {
+ if (dir->count == dir->entries) {
+ printf("Error - too many directory entries\n");
+ }
+ }
+ 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++;
+ }
+ }
+
+ infile = open(filename, O_RDONLY, 0);
+ if (!infile) return;
+
+ if (fstat(infile, &stat))
+ goto exit_add;
+
+ if (S_ISCHR(stat.st_mode) ||S_ISBLK(stat.st_mode) ||
+ S_ISFIFO(stat.st_mode) || S_ISLNK(stat.st_mode)) {
+ printf("Error - cannot create a special file in a FATFS\n");
+ goto exit_add;
+ }
+
+ /* FIXME: This isn't very pretty */
+
+ usedsec = start_data_sector + (size_root_dir / sector_size) +
+ (last_cluster_written * bs.cluster_size);
+
+ totalsec = blocks * BLOCK_SIZE / sector_size;
+
+ /* Figure out how many sectors / clustors the file requires */
+
+ sectors = ROUND_UP(stat.st_size, sector_size);
+ clusters = ROUND_UP(sectors, (int) bs.cluster_size);
+
+ if (usedsec + sectors > totalsec) {
+ printf("Error - %s is too big (%d vs %d)\n", filename, sectors, totalsec - usedsec);
+ close(infile);
+ return -1;
+ }
+
+ printf("ADD %s\n", filename);
+
+ /* Grab the basename of the file */
+ base = basename(filename);
+
+ /* Extract out the 8.3 name */
+ copy_filename(base, name83, ext83);
+
+ /* 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 < 8; i++)
+ slot->alias_checksum = (((slot->alias_checksum&1)<<7)|((slot->alias_checksum&0xfe)>>1)) + name83[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);
+ 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, name83, 8);
+ strncpy(entry->ext, ext83, 3);
+
+
+ /* If the user has it read only, then add read only to the incoming
+ attribute settings */
+
+ if (!(stat.st_mode & S_IWUSR)) attr |= ATTR_RO;
+ entry->attr = attr;
+
+ /* Set the access time on the file */
+ ctime = localtime(&create_time);
+
+ entry->time = CT_LE_W((unsigned short)((ctime->tm_sec >> 1) +
+ (ctime->tm_min << 5) + (ctime->tm_hour << 11)));
+
+ entry->date = CT_LE_W((unsigned short)(ctime->tm_mday +
+ ((ctime->tm_mon+1) << 5) +
+ ((ctime->tm_year-80) << 9)));
+
+ entry->ctime_ms = 0;
+ entry->ctime = entry->time;
+ entry->cdate = entry->date;
+ entry->adate = entry->date;
+ entry->size = stat.st_size;
+
+ start = last_cluster_written;
+
+ entry->start = CT_LE_W(start); /* start sector */
+ entry->starthi = CT_LE_W((start & 0xFFFF0000) >> 16); /* High start sector (for FAT32) */
+
+ /* We mark all of the clusters we use in the FAT */
+
+ for(c = 0; c < clusters; c++ ) {
+ int free;
+ int next = c == (clusters - 1) ? FAT_EOF : start + c + 1;
+ mark_FAT_cluster(start + c, next);
+ last_cluster_written++;
+ }
+
+ /* This confused me too - cluster 2 starts after the
+ root directory data - search me as to why */
+
+ ptr = (start_data_sector * sector_size) + size_root_dir;
+ ptr += (start - 2) * bs.cluster_size * sector_size;
+
+ buffer = (char *) malloc(sector_size);
+
+ if (!buffer) {
+ printf("Error - couldn't allocate memory\n");
+ goto exit_add;
+ }
+
+ /* Write the file into the file block */
+
+ seekto(ptr, "datafile");
+
+ while(1) {
+ int size = read(infile, buffer, sector_size);
+ if (size <= 0) break;
+
+ writebuf(buffer, size, "data");
+ }
+
+ exit_add:
+ if (infile) close(infile);
+}
+
+/* Add a new directory to the specified directory entry, and in turn populate
+ it with its own files */
+
+/* FIXME: This should check to make sure there is enough size to add itself */
+
+static void add_directory(char *filename, struct dir_entry *dir) {
+
+ struct dir_entry *newdir = 0;
+ struct msdos_dir_entry *entry;
+ struct tm *ctime;
+ DIR *rddir = opendir(filename);
+ struct dirent *dentry = 0;
+ int remain;
+ char *data;
+
+ /* If the directory doesn't exist */
+ if (!rddir) return;
+
+ if (dir->root) {
+ if (dir->count == dir->entries) {
+ printf("Error - too many directory entries\n");
+ goto exit_add_dir;
+ }
+ }
+ 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++;
+ }
+ }
+
+ /* 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;
+
+ entry = &dir->table[dir->count++];
+
+ strncpy(entry->name, basename(filename), sizeof(entry->name));
+
+ entry->attr = ATTR_DIR;
+ ctime = localtime(&create_time);
+
+ entry->time = CT_LE_W((unsigned short)((ctime->tm_sec >> 1) +
+ (ctime->tm_min << 5) + (ctime->tm_hour << 11)));
+
+ entry->date = CT_LE_W((unsigned short)(ctime->tm_mday +
+ ((ctime->tm_mon+1) << 5) +
+ ((ctime->tm_year-80) << 9)));
+
+ entry->ctime_ms = 0;
+ entry->ctime = entry->time;
+ entry->cdate = entry->date;
+ entry->adate = entry->date;
+
+ /* Now, read the directory */
+
+ while((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;
+
+ buffer = malloc(strlen(filename) + strlen(dentry->d_name) + 3);
+ if (!buffer) continue;
+
+ sprintf(buffer, "%s/%s", filename, dentry->d_name);
+ if (!stat(buffer, &st)) {
+ if (S_ISDIR(st.st_mode))
+ add_directory(buffer, newdir);
+ else if (S_ISREG(st.st_mode)) {
+ unsigned char attrib = check_attrib_file(filename, dentry->d_name);
+ add_file(buffer, newdir, attrib);
+ }
+ }
+
+ free(buffer);
+ }
+
+ /* Now that the entire directory has been written, go ahead and write the directory
+ entry as well */
+
+ 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);
+
+ remain = entry->size;
+ data = (char *) newdir->table;
+
+ while(remain) {
+ int size =
+ remain > bs.cluster_size * sector_size ? bs.cluster_size * sector_size : remain;
+
+ int pos = (start_data_sector * sector_size) + size_root_dir;
+ pos += (last_cluster_written - 2) * bs.cluster_size * sector_size;
+
+ seekto(pos, "add_dir");
+ writebuf(data, size, "add_dir");
+
+ remain -= size;
+ data += size;
+
+ mark_FAT_cluster(last_cluster_written, remain ? last_cluster_written + 1 : FAT_EOF);
+ last_cluster_written++;
+ }
+
+ exit_add_dir:
+ if (rddir) closedir(rddir);
+ if (newdir->table) free(newdir->table);
+ if (newdir) free(newdir);
+}
+
+/* Given a directory, add all the files and directories to the root directory of the
+ image.
+*/
+
+static void add_root_directory(char *dirname)
+{
+ DIR *dir = opendir(dirname);
+ struct dirent *entry = 0;
+ struct dir_entry *newdir = 0;
+
+ if (!dir) {
+ printf("Error - directory %s does not exist\n", dirname);
+ return;
+ }
+
+ /* Create the root directory structure - this is a bit different then
+ above, because the table already exists, we just refer to it. */
+
+ newdir = (struct dir_entry *) calloc(1,sizeof(struct dir_entry));
+
+ if (!newdir) {
+ closedir(dir);
+ return;
+ }
+
+ newdir->entries = root_dir_entries;
+ newdir->root = 1;
+ newdir->count = 0;
+ newdir->table = root_dir;
+
+ while((entry = readdir(dir))) {
+ struct stat st;
+ char *buffer;
+
+ if (!strcmp(entry->d_name, ".") || !strcmp(entry->d_name, ".."))
+ continue;
+
+ /* DOS wouldn't like a typical unix . (dot) file, so we skip those too */
+ if (entry->d_name[0] == '.') continue;
+
+ buffer = malloc(strlen(dirname) + strlen(entry->d_name) + 3);
+ if (!buffer) continue;
+
+ sprintf(buffer, "%s/%s", dirname, entry->d_name);
+ if (!stat(buffer, &st)) {
+ if (S_ISDIR(st.st_mode))
+ add_directory(buffer, newdir);
+ else if (S_ISREG(st.st_mode)) {
+ unsigned char attrib = check_attrib_file(dirname, entry->d_name);
+ add_file(buffer, newdir, attrib);
+ }
+ }
+
+ free(buffer);
+ }
+
+ closedir(dir);
+ if (newdir) free(newdir);
+}
/* Report the command usage and return a failure error code */
@@ -1423,7 +1903,7 @@
[-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");
+ [-d directory] /dev/name [blocks]\n");
}
/*
@@ -1463,6 +1943,8 @@
int c;
char *tmp;
char *listfile = NULL;
+ char *dirname = NULL;
+
FILE *msgfile;
struct stat statbuf;
int i = 0, pos, ch;
@@ -1483,7 +1965,7 @@
printf ("%s " VERSION " (" VERSION_DATE ")\n",
program_name);
- while ((c = getopt (argc, argv, "AbcCf:F:Ii:l:m:n:r:R:s:S:v:B:")) != EOF)
+ while ((c = getopt (argc, argv, "AbcCd:f:F:Ii:l:m:n:r:R:s:S:v:B:")) != EOF)
/* Scan the command line for options */
switch (c)
{
@@ -1508,6 +1990,10 @@
create = TRUE;
break;
+ case 'd':
+ dirname = optarg;
+ break;
+
case 'f': /* f : Choose number of FATs */
nr_fats = (int) strtol (optarg, &tmp, 0);
if (*tmp || nr_fats < 1 || nr_fats > 4)
@@ -1811,8 +2297,10 @@
else if (listfile)
get_list_blocks (listfile);
- write_tables (); /* Write the file system tables away! */
+ if (dirname) add_root_directory(dirname);
+
+ write_tables (); /* Write the file system tables away! */
exit (0); /* Terminate with no errors! */
}

View File

@ -1,19 +0,0 @@
Fix a compilation error due to undefined MSDOS_FAT12.
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/boot.c.orig 2004-10-15 08:51:42.394725176 -0600
+++ dosfstools-2.10/dosfsck/boot.c 2004-10-15 08:49:16.776862456 -0600
@@ -14,6 +14,9 @@
#include "io.h"
#include "boot.h"
+#ifndef MSDOS_FAT12
+#define MSDOS_FAT12 4084
+#endif
#define ROUND_TO_MULTIPLE(n,m) ((n) && (m) ? (n)+(m)-1-((n)-1)%(m) : 0)
/* don't divide by zero */

View File

@ -1,27 +0,0 @@
FAT32 appears to be broken when used with the -d option to populate the msdos
image. This disables the FAT32 autoselection code which means we don't get
broken images with the -d option. It can still be enabled on the commandline
at the users own risk. This changes us back to the 2.10 version's behaviour
which was known to work well even with large images.
Upstream-Status: Inappropriate [depends on other patches we apply]
RP 2011/12/13
Index: dosfstools-2.11/mkdosfs/mkdosfs.c
===================================================================
--- dosfstools-2.11.orig/mkdosfs/mkdosfs.c 2011-12-13 13:54:37.538509391 +0000
+++ dosfstools-2.11/mkdosfs/mkdosfs.c 2011-12-13 13:55:10.258508631 +0000
@@ -808,10 +808,12 @@
bs.media = (char) 0xf8; /* Set up the media descriptor for a hard drive */
bs.dir_entries[0] = (char) 0; /* Default to 512 entries */
bs.dir_entries[1] = (char) 2;
+/*
if (!size_fat && blocks*SECTORS_PER_BLOCK > 1064960) {
if (verbose) printf("Auto-selecting FAT32 for large filesystem\n");
size_fat = 32;
}
+*/
if (size_fat == 32) {
/* For FAT32, try to do the same as M$'s format command:
* fs size < 256M: 0.5k clusters

View File

@ -1,34 +0,0 @@
# dosfstools OE build file
# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
# Released under the MIT license (see packages/COPYING)
SUMMARY = "DOS FAT Filesystem Utilities"
HOMEPAGE = "https://github.com/dosfstools/dosfstools"
SECTION = "base"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://mkdosfs/COPYING;md5=cbe67f08d6883bff587f615f0cc81aa8"
PR = "r5"
SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.src.tar.gz/407d405ade410f7597d364ab5dc8c9f6/${BP}.src.tar.gz \
file://mkdosfs-bootcode.patch \
file://mkdosfs-dir.patch \
file://alignment_hack.patch \
file://msdos_fat12_undefined.patch \
file://dosfstools-msdos_fs-types.patch \
file://include-linux-types.patch \
file://nofat32_autoselect.patch \
file://fix_populated_dosfs_creation.patch \
file://0001-Include-fcntl.h-for-getting-loff_t-definition.patch \
"
SRC_URI[md5sum] = "407d405ade410f7597d364ab5dc8c9f6"
SRC_URI[sha256sum] = "0eac6d12388b3d9ed78684529c1b0d9346fa2abbe406c4d4a3eb5a023c98a484"
CFLAGS += "-D_GNU_SOURCE ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', '', d)}"
EXTRA_OEMAKE = "CC='${CC}' CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'"
do_install () {
oe_runmake "PREFIX=${D}" "SBINDIR=${D}${base_sbindir}" \
"MANDIR=${D}${mandir}/man8" install
}

View File

@ -1,449 +0,0 @@
Upstream-Status: Backport
Index: elfutils-0.146/backends/arm_init.c
===================================================================
--- elfutils-0.146.orig/backends/arm_init.c 2009-04-21 14:50:01.000000000 +0000
+++ elfutils-0.146/backends/arm_init.c 2010-04-24 10:11:13.000000000 +0000
@@ -32,21 +32,32 @@
#define RELOC_PREFIX R_ARM_
#include "libebl_CPU.h"
+#include "libebl_arm.h"
+
/* This defines the common reloc hooks based on arm_reloc.def. */
#include "common-reloc.c"
const char *
arm_init (elf, machine, eh, ehlen)
- Elf *elf __attribute__ ((unused));
+ Elf *elf;
GElf_Half machine __attribute__ ((unused));
Ebl *eh;
size_t ehlen;
{
+ int soft_float = 0;
+
/* Check whether the Elf_BH object has a sufficent size. */
if (ehlen < sizeof (Ebl))
return NULL;
+ if (elf) {
+ GElf_Ehdr ehdr_mem;
+ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
+ if (ehdr && (ehdr->e_flags & EF_ARM_SOFT_FLOAT))
+ soft_float = 1;
+ }
+
/* We handle it. */
eh->name = "ARM";
arm_init_reloc (eh);
@@ -58,7 +69,10 @@
HOOK (eh, core_note);
HOOK (eh, auxv_info);
HOOK (eh, check_object_attribute);
- HOOK (eh, return_value_location);
+ if (soft_float)
+ eh->return_value_location = arm_return_value_location_soft;
+ else
+ eh->return_value_location = arm_return_value_location_hard;
return MODVERSION;
}
Index: elfutils-0.146/backends/arm_regs.c
===================================================================
--- elfutils-0.146.orig/backends/arm_regs.c 2009-04-21 14:50:01.000000000 +0000
+++ elfutils-0.146/backends/arm_regs.c 2010-04-24 10:11:13.000000000 +0000
@@ -28,6 +28,7 @@
#endif
#include <string.h>
+#include <stdio.h>
#include <dwarf.h>
#define BACKEND arm_
@@ -58,7 +59,15 @@
namelen = 2;
break;
- case 10 ... 12:
+ case 10 ... 11:
+ name[0] = 'r';
+ name[1] = '1';
+ name[2] = regno % 10 + '0';
+ namelen = 3;
+ break;
+
+ case 12:
+ *type = DW_ATE_unsigned;
name[0] = 'r';
name[1] = '1';
name[2] = regno % 10 + '0';
@@ -73,6 +82,9 @@
break;
case 16 + 0 ... 16 + 7:
+ /* AADWARF says that there are no registers in that range,
+ * but gcc maps FPA registers here
+ */
regno += 96 - 16;
/* Fall through. */
case 96 + 0 ... 96 + 7:
@@ -84,11 +96,139 @@
namelen = 2;
break;
+ case 64 + 0 ... 64 + 9:
+ *setname = "VFP";
+ *bits = 32;
+ *type = DW_ATE_float;
+ name[0] = 's';
+ name[1] = regno - 64 + '0';
+ namelen = 2;
+ break;
+
+ case 64 + 10 ... 64 + 31:
+ *setname = "VFP";
+ *bits = 32;
+ *type = DW_ATE_float;
+ name[0] = 's';
+ name[1] = (regno - 64) / 10 + '0';
+ name[2] = (regno - 64) % 10 + '0';
+ namelen = 3;
+ break;
+
+ case 104 + 0 ... 104 + 7:
+ /* XXX TODO:
+ * This can be either intel wireless MMX general purpose/control
+ * registers or xscale accumulator, which have different usage.
+ * We only have the intel wireless MMX here now.
+ * The name needs to be changed for the xscale accumulator too. */
+ *setname = "MMX";
+ *type = DW_ATE_unsigned;
+ *bits = 32;
+ memcpy(name, "wcgr", 4);
+ name[4] = regno - 104 + '0';
+ namelen = 5;
+ break;
+
+ case 112 + 0 ... 112 + 9:
+ *setname = "MMX";
+ *type = DW_ATE_unsigned;
+ *bits = 64;
+ name[0] = 'w';
+ name[1] = 'r';
+ name[2] = regno - 112 + '0';
+ namelen = 3;
+ break;
+
+ case 112 + 10 ... 112 + 15:
+ *setname = "MMX";
+ *type = DW_ATE_unsigned;
+ *bits = 64;
+ name[0] = 'w';
+ name[1] = 'r';
+ name[2] = '1';
+ name[3] = regno - 112 - 10 + '0';
+ namelen = 4;
+ break;
+
case 128:
+ *setname = "special";
*type = DW_ATE_unsigned;
return stpcpy (name, "spsr") + 1 - name;
+ case 129:
+ *setname = "special";
+ *type = DW_ATE_unsigned;
+ return stpcpy(name, "spsr_fiq") + 1 - name;
+
+ case 130:
+ *setname = "special";
+ *type = DW_ATE_unsigned;
+ return stpcpy(name, "spsr_irq") + 1 - name;
+
+ case 131:
+ *setname = "special";
+ *type = DW_ATE_unsigned;
+ return stpcpy(name, "spsr_abt") + 1 - name;
+
+ case 132:
+ *setname = "special";
+ *type = DW_ATE_unsigned;
+ return stpcpy(name, "spsr_und") + 1 - name;
+
+ case 133:
+ *setname = "special";
+ *type = DW_ATE_unsigned;
+ return stpcpy(name, "spsr_svc") + 1 - name;
+
+ case 144 ... 150:
+ *setname = "integer";
+ *type = DW_ATE_signed;
+ *bits = 32;
+ return sprintf(name, "r%d_usr", regno - 144 + 8) + 1;
+
+ case 151 ... 157:
+ *setname = "integer";
+ *type = DW_ATE_signed;
+ *bits = 32;
+ return sprintf(name, "r%d_fiq", regno - 151 + 8) + 1;
+
+ case 158 ... 159:
+ *setname = "integer";
+ *type = DW_ATE_signed;
+ *bits = 32;
+ return sprintf(name, "r%d_irq", regno - 158 + 13) + 1;
+
+ case 160 ... 161:
+ *setname = "integer";
+ *type = DW_ATE_signed;
+ *bits = 32;
+ return sprintf(name, "r%d_abt", regno - 160 + 13) + 1;
+
+ case 162 ... 163:
+ *setname = "integer";
+ *type = DW_ATE_signed;
+ *bits = 32;
+ return sprintf(name, "r%d_und", regno - 162 + 13) + 1;
+
+ case 164 ... 165:
+ *setname = "integer";
+ *type = DW_ATE_signed;
+ *bits = 32;
+ return sprintf(name, "r%d_svc", regno - 164 + 13) + 1;
+
+ case 192 ... 199:
+ *setname = "MMX";
+ *bits = 32;
+ *type = DW_ATE_unsigned;
+ name[0] = 'w';
+ name[1] = 'c';
+ name[2] = regno - 192 + '0';
+ namelen = 3;
+ break;
+
case 256 + 0 ... 256 + 9:
+ /* XXX TODO: Neon also uses those registers and can contain
+ * both float and integers */
*setname = "VFP";
*type = DW_ATE_float;
*bits = 64;
Index: elfutils-0.146/backends/arm_retval.c
===================================================================
--- elfutils-0.146.orig/backends/arm_retval.c 2010-01-12 16:57:54.000000000 +0000
+++ elfutils-0.146/backends/arm_retval.c 2010-04-24 10:11:13.000000000 +0000
@@ -45,6 +45,13 @@
#define nloc_intreg 1
#define nloc_intregs(n) (2 * (n))
+/* f1 */ /* XXX TODO: f0 can also have number 96 if program was compiled with -mabi=aapcs */
+static const Dwarf_Op loc_fpreg[] =
+ {
+ { .atom = DW_OP_reg16 },
+ };
+#define nloc_fpreg 1
+
/* The return value is a structure and is actually stored in stack space
passed in a hidden argument by the caller. But, the compiler
helpfully returns the address of that space in r0. */
@@ -55,8 +62,9 @@
#define nloc_aggregate 1
-int
-arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+static int
+arm_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp,
+ int soft_float)
{
/* Start with the function's type, and get the DW_AT_type attribute,
which is the type of the return value. */
@@ -109,14 +117,31 @@
else
return -1;
}
+ if (tag == DW_TAG_base_type)
+ {
+ Dwarf_Word encoding;
+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
+ &attr_mem), &encoding) != 0)
+ return -1;
+
+ if ((encoding == DW_ATE_float) && !soft_float)
+ {
+ *locp = loc_fpreg;
+ if (size <= 8)
+ return nloc_fpreg;
+ goto aggregate;
+ }
+ }
if (size <= 16)
{
intreg:
*locp = loc_intreg;
return size <= 4 ? nloc_intreg : nloc_intregs ((size + 3) / 4);
}
+ /* fall through. */
aggregate:
+ /* XXX TODO sometimes aggregates are returned in r0 (-mabi=aapcs) */
*locp = loc_aggregate;
return nloc_aggregate;
@@ -135,3 +160,18 @@
DWARF and might be valid. */
return -2;
}
+
+/* return location for -mabi=apcs-gnu -msoft-float */
+int
+arm_return_value_location_soft (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+{
+ return arm_return_value_location_ (functypedie, locp, 1);
+}
+
+/* return location for -mabi=apcs-gnu -mhard-float (current default) */
+int
+arm_return_value_location_hard (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+{
+ return arm_return_value_location_ (functypedie, locp, 0);
+}
+
Index: elfutils-0.146/libelf/elf.h
===================================================================
--- elfutils-0.146.orig/libelf/elf.h 2010-04-24 10:11:11.000000000 +0000
+++ elfutils-0.146/libelf/elf.h 2010-04-24 10:11:13.000000000 +0000
@@ -2290,6 +2290,9 @@
#define EF_ARM_EABI_VER4 0x04000000
#define EF_ARM_EABI_VER5 0x05000000
+/* EI_OSABI values */
+#define ELFOSABI_ARM_AEABI 64 /* Contains symbol versioning. */
+
/* Additional symbol types for Thumb. */
#define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */
#define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */
@@ -2307,12 +2310,19 @@
/* Processor specific values for the Phdr p_type field. */
#define PT_ARM_EXIDX (PT_LOPROC + 1) /* ARM unwind segment. */
+#define PT_ARM_UNWIND PT_ARM_EXIDX
/* Processor specific values for the Shdr sh_type field. */
#define SHT_ARM_EXIDX (SHT_LOPROC + 1) /* ARM unwind section. */
#define SHT_ARM_PREEMPTMAP (SHT_LOPROC + 2) /* Preemption details. */
#define SHT_ARM_ATTRIBUTES (SHT_LOPROC + 3) /* ARM attributes section. */
+/* Processor specific values for the Dyn d_tag field. */
+#define DT_ARM_RESERVED1 (DT_LOPROC + 0)
+#define DT_ARM_SYMTABSZ (DT_LOPROC + 1)
+#define DT_ARM_PREEMTMAB (DT_LOPROC + 2)
+#define DT_ARM_RESERVED2 (DT_LOPROC + 3)
+#define DT_ARM_NUM 4
/* ARM relocs. */
@@ -2344,12 +2354,75 @@
#define R_ARM_GOTPC 25 /* 32 bit PC relative offset to GOT */
#define R_ARM_GOT32 26 /* 32 bit GOT entry */
#define R_ARM_PLT32 27 /* 32 bit PLT address */
+#define R_ARM_CALL 28
+#define R_ARM_JUMP24 29
+#define R_ARM_THM_JUMP24 30
+#define R_ARM_BASE_ABS 31
#define R_ARM_ALU_PCREL_7_0 32
#define R_ARM_ALU_PCREL_15_8 33
#define R_ARM_ALU_PCREL_23_15 34
#define R_ARM_LDR_SBREL_11_0 35
#define R_ARM_ALU_SBREL_19_12 36
#define R_ARM_ALU_SBREL_27_20 37
+#define R_ARM_TARGET1 38
+#define R_ARM_SBREL31 39
+#define R_ARM_V4BX 40
+#define R_ARM_TARGET2 41
+#define R_ARM_PREL31 42
+#define R_ARM_MOVW_ABS_NC 43
+#define R_ARM_MOVT_ABS 44
+#define R_ARM_MOVW_PREL_NC 45
+#define R_ARM_MOVT_PREL 46
+#define R_ARM_THM_MOVW_ABS_NC 47
+#define R_ARM_THM_MOVT_ABS 48
+#define R_ARM_THM_MOVW_PREL_NC 49
+#define R_ARM_THM_MOVT_PREL 50
+#define R_ARM_THM_JUMP19 51
+#define R_ARM_THM_JUMP6 52
+#define R_ARM_THM_ALU_PREL_11_0 53
+#define R_ARM_THM_PC12 54
+#define R_ARM_ABS32_NOI 55
+#define R_ARM_REL32_NOI 56
+#define R_ARM_ALU_PC_G0_NC 57
+#define R_ARM_ALU_PC_G0 58
+#define R_ARM_ALU_PC_G1_NC 59
+#define R_ARM_ALU_PC_G1 60
+#define R_ARM_ALU_PC_G2 61
+#define R_ARM_LDR_PC_G1 62
+#define R_ARM_LDR_PC_G2 63
+#define R_ARM_LDRS_PC_G0 64
+#define R_ARM_LDRS_PC_G1 65
+#define R_ARM_LDRS_PC_G2 66
+#define R_ARM_LDC_PC_G0 67
+#define R_ARM_LDC_PC_G1 68
+#define R_ARM_LDC_PC_G2 69
+#define R_ARM_ALU_SB_G0_NC 70
+#define R_ARM_ALU_SB_G0 71
+#define R_ARM_ALU_SB_G1_NC 72
+#define R_ARM_ALU_SB_G1 73
+#define R_ARM_ALU_SB_G2 74
+#define R_ARM_LDR_SB_G0 75
+#define R_ARM_LDR_SB_G1 76
+#define R_ARM_LDR_SB_G2 77
+#define R_ARM_LDRS_SB_G0 78
+#define R_ARM_LDRS_SB_G1 79
+#define R_ARM_LDRS_SB_G2 80
+#define R_ARM_LDC_G0 81
+#define R_ARM_LDC_G1 82
+#define R_ARM_LDC_G2 83
+#define R_ARM_MOVW_BREL_NC 84
+#define R_ARM_MOVT_BREL 85
+#define R_ARM_MOVW_BREL 86
+#define R_ARM_THM_MOVW_BREL_NC 87
+#define R_ARM_THM_MOVT_BREL 88
+#define R_ARM_THM_MOVW_BREL 89
+/* 90-93 unallocated */
+#define R_ARM_PLT32_ABS 94
+#define R_ARM_GOT_ABS 95
+#define R_ARM_GOT_PREL 96
+#define R_ARM_GOT_BREL12 97
+#define R_ARM_GOTOFF12 98
+#define R_ARM_GOTRELAX 99
#define R_ARM_GNU_VTENTRY 100
#define R_ARM_GNU_VTINHERIT 101
#define R_ARM_THM_PC11 102 /* thumb unconditional branch */
@@ -2364,6 +2437,12 @@
static TLS block offset */
#define R_ARM_TLS_LE32 108 /* 32 bit offset relative to static
TLS block */
+#define R_ARM_TLS_LDO12 109
+#define R_ARM_TLS_LE12 110
+#define R_ARM_TLS_IE12GP 111
+/* 112 - 127 private range */
+#define R_ARM_ME_TOO 128 /* obsolete */
+
#define R_ARM_RXPC25 249
#define R_ARM_RSBREL32 250
#define R_ARM_THM_RPC22 251
Index: elfutils-0.146/backends/libebl_arm.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ elfutils-0.146/backends/libebl_arm.h 2010-04-24 10:11:13.000000000 +0000
@@ -0,0 +1,9 @@
+#ifndef _LIBEBL_ARM_H
+#define _LIBEBL_ARM_H 1
+
+#include <libdw.h>
+
+extern int arm_return_value_location_soft(Dwarf_Die *, const Dwarf_Op **locp);
+extern int arm_return_value_location_hard(Dwarf_Die *, const Dwarf_Op **locp);
+
+#endif

View File

@ -1,71 +0,0 @@
Upstream-Status: Backport
Index: elfutils-0.146/libelf/elf.h
===================================================================
--- elfutils-0.146.orig/libelf/elf.h 2010-04-24 10:13:50.000000000 +0000
+++ elfutils-0.146/libelf/elf.h 2010-04-24 10:22:43.000000000 +0000
@@ -143,6 +143,7 @@
#define ELFOSABI_HPUX 1 /* HP-UX */
#define ELFOSABI_NETBSD 2 /* NetBSD. */
#define ELFOSABI_LINUX 3 /* Linux. */
+#define ELFOSABI_HURD 4 /* GNU/Hurd */
#define ELFOSABI_SOLARIS 6 /* Sun Solaris. */
#define ELFOSABI_AIX 7 /* IBM AIX. */
#define ELFOSABI_IRIX 8 /* SGI Irix. */
@@ -150,8 +151,13 @@
#define ELFOSABI_TRU64 10 /* Compaq TRU64 UNIX. */
#define ELFOSABI_MODESTO 11 /* Novell Modesto. */
#define ELFOSABI_OPENBSD 12 /* OpenBSD. */
+#define ELFOSABI_OPENVMS 13 /* OpenVMS */
+#define ELFOSABI_NSK 14 /* Hewlett-Packard Non-Stop Kernel */
+#define ELFOSABI_AROS 15 /* Amiga Research OS */
+/* 64-255 Architecture-specific value range */
#define ELFOSABI_ARM_AEABI 64 /* ARM EABI */
#define ELFOSABI_ARM 97 /* ARM */
+/* This is deprecated? It's not in the latest version anymore. */
#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
#define EI_ABIVERSION 8 /* ABI version */
@@ -206,7 +212,7 @@
#define EM_H8_300H 47 /* Hitachi H8/300H */
#define EM_H8S 48 /* Hitachi H8S */
#define EM_H8_500 49 /* Hitachi H8/500 */
-#define EM_IA_64 50 /* Intel Merced */
+#define EM_IA_64 50 /* Intel IA64 */
#define EM_MIPS_X 51 /* Stanford MIPS-X */
#define EM_COLDFIRE 52 /* Motorola Coldfire */
#define EM_68HC12 53 /* Motorola M68HC12 */
@@ -220,7 +226,8 @@
#define EM_TINYJ 61 /* Advanced Logic Corp. Tinyj emb.fam*/
#define EM_X86_64 62 /* AMD x86-64 architecture */
#define EM_PDSP 63 /* Sony DSP Processor */
-
+#define EM_PDP10 64 /* Digital Equipment Corp. PDP-10 */
+#define EM_PDP11 65 /* Digital Equipment Corp. PDP-11 */
#define EM_FX66 66 /* Siemens FX66 microcontroller */
#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 mc */
#define EM_ST7 68 /* STmicroelectronics ST7 8 bit mc */
@@ -250,7 +257,22 @@
#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */
#define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */
#define EM_XTENSA 94 /* Tensilica Xtensa Architecture */
-#define EM_NUM 95
+#define EM_VIDEOCORE 95 /* Alphamosaic VideoCore processor */
+#define EM_TMM_GPP 96 /* Thompson Multimedia General Purpose Processor */
+#define EM_NS32K 97 /* National Semiconductor 32000 series */
+#define EM_TPC 98 /* Tenor Network TPC processor */
+#define EM_SNP1K 99 /* Trebia SNP 1000 processor */
+#define EM_ST200 100 /* STMicroelectronics (www.st.com) ST200 microcontroller */
+#define EM_IP2K 101 /* Ubicom IP2XXX microcontroller family */
+#define EM_MAX 102 /* MAX Processor */
+#define EM_CR 103 /* National Semiconductor CompactRISC */
+#define EM_F2MC16 104 /* Fujitsu F2MC16 */
+#define EM_MSP430 105 /* TI msp430 micro controller */
+#define EM_BLACKFIN 106 /* Analog Devices Blackfin (DSP) processor */
+#define EM_SE_C33 107 /* S1C33 Family of Seiko Epson processors */
+#define EM_SEP 108 /* Sharp embedded microprocessor */
+#define EM_ARCA 109 /* Arca RISC Microprocessor */
+#define EM_NUM 110
/* If it is necessary to assign new unofficial EM_* values, please
pick large random numbers (0x8523, 0xa7f2, etc.) to minimize the

View File

@ -1,37 +0,0 @@
From 323ca04a0c9189544075c19b49da67f6443a8950 Mon Sep 17 00:00:00 2001
From: Li xin <lixin.fnst@cn.fujitsu.com>
Date: Wed, 21 Jan 2015 09:33:38 +0900
Subject: [PATCH] elf_begin.c: CVE-2014-9447 fix
this patch is from:
https://git.fedorahosted.org/cgit/elfutils.git/commit/?id=147018e729e7c22eeabf15b82d26e4bf68a0d18e
Upstream-Status: Backport
CVE: CVE-2014-9447
Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
---
libelf/elf_begin.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c
index e46add3..e83ba35 100644
--- a/libelf/elf_begin.c
+++ b/libelf/elf_begin.c
@@ -736,11 +736,8 @@ read_long_names (Elf *elf)
break;
/* NUL-terminate the string. */
- *runp = '\0';
-
- /* Skip the NUL byte and the \012. */
- runp += 2;
-
+ *runp++ = '\0';
+
/* A sanity check. Somebody might have generated invalid
archive. */
if (runp >= newp + len)
--
1.8.4.2

View File

@ -1,23 +0,0 @@
Upstream-Status: Backport
ar.c (do_oper_delete): Fix num passed to memset
native build failed as following on Fedora18+:
ar.c: In function 'do_oper_delete':
ar.c:918:31: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess]
memset (found, '\0', sizeof (found));
^
The original commit is http://git.fedorahosted.org/cgit/elfutils.git/commit/src/ar.c?id=1a4d0668d18bf1090c5c08cdb5cb3ba2b8eb5410
Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
--- elfutils-0.148/src/ar.c.org 2013-03-12 21:12:17.928281375 -0500
+++ elfutils-0.148/src/ar.c 2013-03-12 21:15:30.053285271 -0500
@@ -915,7 +915,7 @@
long int instance)
{
bool *found = alloca (sizeof (bool) * argc);
- memset (found, '\0', sizeof (found));
+ memset (found, '\0', sizeof (bool) * argc);
/* List of the files we keep. */
struct armem *to_copy = NULL;

View File

@ -1,39 +0,0 @@
Upstream-Status: Backport
The ELF_T_LIB and ELF_T_GNUHASH sizes were missing from fsize table.
This could cause a failure in the elf*_xlatetof function.
diff -ur elfutils-0.148.orig/libelf/exttypes.h elfutils-0.148/libelf/exttypes.h
--- elfutils-0.148.orig/libelf/exttypes.h 2009-01-08 12:56:37.000000000 -0800
+++ elfutils-0.148/libelf/exttypes.h 2010-08-18 14:00:33.000000000 -0700
@@ -94,6 +94,7 @@
Vernaux32 (Ext_);
Syminfo32 (Ext_);
Move32 (Ext_);
+Lib32 (Ext_);
auxv_t32 (Ext_);
Ehdr64 (Ext_);
@@ -110,6 +111,7 @@
Vernaux64 (Ext_);
Syminfo64 (Ext_);
Move64 (Ext_);
+Lib64 (Ext_);
auxv_t64 (Ext_);
#undef START
diff -ur elfutils-0.148.orig/libelf/gelf_fsize.c elfutils-0.148/libelf/gelf_fsize.c
--- elfutils-0.148.orig/libelf/gelf_fsize.c 2009-01-08 12:56:37.000000000 -0800
+++ elfutils-0.148/libelf/gelf_fsize.c 2010-08-18 14:11:57.000000000 -0700
@@ -87,7 +87,9 @@
[ELF_T_NHDR] = sizeof (ElfW2(LIBELFBITS, Ext_Nhdr)), \
[ELF_T_SYMINFO] = sizeof (ElfW2(LIBELFBITS, Ext_Syminfo)), \
[ELF_T_MOVE] = sizeof (ElfW2(LIBELFBITS, Ext_Move)), \
- [ELF_T_AUXV] = sizeof (ElfW2(LIBELFBITS, Ext_auxv_t))
+ [ELF_T_LIB] = sizeof (ElfW2(LIBELFBITS, Ext_Lib)), \
+ [ELF_T_AUXV] = sizeof (ElfW2(LIBELFBITS, Ext_auxv_t)), \
+ [ELF_T_GNUHASH] = ELFW2(LIBELFBITS, FSZ_WORD)
TYPE_SIZES (32)
},
[ELFCLASS64 - 1] = {

View File

@ -1,57 +0,0 @@
This patch fixes a warning seen with gcc 4.8 (especially on ubuntu 13.10)
| addr2line.c: In function 'handle_address':
| addr2line.c:450:7: error: format '%a' expects argument of type 'float *', but argument 3 has type 'char **' [-Werror=format=]
| if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
| ^
| addr2line.c:453:7: error: format '%a' expects argument of type 'float *', but argument 3 has type 'char **' [-Werror=format=]
| switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
| ^
| cc1: all warnings being treated as errors
%a is old GNU style and should be abandoned in favor of %m
Also see
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54361
to support this assertion
This patch is added via redhat-compatibility patch so lets revert this part
here.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Inappropriate [Caused by an earlier patch]
Index: elfutils-0.148/src/addr2line.c
===================================================================
--- elfutils-0.148.orig/src/addr2line.c 2013-09-23 17:46:45.513586538 -0700
+++ elfutils-0.148/src/addr2line.c 2013-09-23 17:46:46.329586558 -0700
@@ -447,10 +447,10 @@
bool parsed = false;
int i, j;
char *name = NULL;
- if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
+ if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
&& string[i] == '\0')
parsed = adjust_to_section (name, &addr, dwfl);
- switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
+ switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
{
default:
break;
Index: elfutils-0.148/tests/line2addr.c
===================================================================
--- elfutils-0.148.orig/tests/line2addr.c 2013-09-23 17:46:45.521586538 -0700
+++ elfutils-0.148/tests/line2addr.c 2013-09-23 17:46:46.329586558 -0700
@@ -132,7 +132,7 @@
{
struct args a = { .arg = argv[cnt] };
- switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line))
+ switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line))
{
default:
case 0:

View File

@ -1,73 +0,0 @@
Upstream-Status: pending
gcc 4.7 does not like pointer conversion, so have a void * tmp var to work
around following compilation issue.
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2011/07/07
| md5.c: In function 'md5_finish_ctx':
| md5.c:108:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| md5.c:109:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| cc1: all warnings being treated as errors
|
| make[2]: *** [md5.o] Error 1
| make[2]: *** Waiting for unfinished jobs....
| sha1.c: In function 'sha1_finish_ctx':
| sha1.c:109:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| sha1.c:111:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| cc1: all warnings being treated as errors
|
| make[2]: *** [sha1.o] Error 1
Index: elfutils-0.148/lib/md5.c
===================================================================
--- elfutils-0.148.orig/lib/md5.c
+++ elfutils-0.148/lib/md5.c
@@ -95,6 +95,7 @@ md5_finish_ctx (ctx, resbuf)
/* Take yet unprocessed bytes into account. */
md5_uint32 bytes = ctx->buflen;
size_t pad;
+ void * tmp;
/* Now count remaining bytes. */
ctx->total[0] += bytes;
@@ -105,9 +106,10 @@ md5_finish_ctx (ctx, resbuf)
memcpy (&ctx->buffer[bytes], fillbuf, pad);
/* Put the 64-bit file length in *bits* at the end of the buffer. */
- *(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] << 3);
- *(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) |
- (ctx->total[0] >> 29));
+ tmp = &ctx->buffer[bytes + pad];
+ *(md5_uint32 *) tmp = SWAP (ctx->total[0] << 3);
+ tmp = &ctx->buffer[bytes + pad + 4];
+ *(md5_uint32 *) tmp = SWAP ((ctx->total[1] << 3) | (ctx->total[0] >> 29));
/* Process last bytes. */
md5_process_block (ctx->buffer, bytes + pad + 8, ctx);
Index: elfutils-0.148/lib/sha1.c
===================================================================
--- elfutils-0.148.orig/lib/sha1.c
+++ elfutils-0.148/lib/sha1.c
@@ -96,6 +96,7 @@ sha1_finish_ctx (ctx, resbuf)
/* Take yet unprocessed bytes into account. */
sha1_uint32 bytes = ctx->buflen;
size_t pad;
+ void * tmp;
/* Now count remaining bytes. */
ctx->total[0] += bytes;
@@ -106,9 +107,10 @@ sha1_finish_ctx (ctx, resbuf)
memcpy (&ctx->buffer[bytes], fillbuf, pad);
/* Put the 64-bit file length in *bits* at the end of the buffer. */
- *(sha1_uint32 *) &ctx->buffer[bytes + pad] = SWAP ((ctx->total[1] << 3) |
- (ctx->total[0] >> 29));
- *(sha1_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP (ctx->total[0] << 3);
+ tmp = &ctx->buffer[bytes + pad];
+ *(sha1_uint32 *) tmp = SWAP ((ctx->total[1] << 3) | (ctx->total[0] >> 29));
+ tmp = &ctx->buffer[bytes + pad + 4];
+ *(sha1_uint32 *) tmp = SWAP (ctx->total[0] << 3);
/* Process last bytes. */
sha1_process_block (ctx->buffer, bytes + pad + 8, ctx);

View File

@ -1,23 +0,0 @@
Fix warnings found with gcc6
| ../../elfutils-0.148/libdw/dwarf_siblingof.c: In function 'dwarf_siblingof':
| ../../elfutils-0.148/libdw/dwarf_siblingof.c:69:6: error: nonnull argument 'result' compared to NULL [-Werror=nonnull-compare]
| if (result == NULL)
| ^
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Inappropriate [ unmaintained ]
Index: elfutils-0.148/libdw/dwarf_siblingof.c
===================================================================
--- elfutils-0.148.orig/libdw/dwarf_siblingof.c
+++ elfutils-0.148/libdw/dwarf_siblingof.c
@@ -66,9 +66,6 @@ dwarf_siblingof (die, result)
if (die == NULL)
return -1;
- if (result == NULL)
- return -1;
-
if (result != die)
result->addr = NULL;

View File

@ -1,801 +0,0 @@
Upstream-Status: Backport
Index: elfutils-0.146/backends/parisc_init.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ elfutils-0.146/backends/parisc_init.c 2010-04-24 10:10:50.000000000 +0000
@@ -0,0 +1,74 @@
+/* Initialization of PA-RISC specific backend library.
+ Copyright (C) 2002, 2005, 2006 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+ Red Hat elfutils is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by the
+ Free Software Foundation; version 2 of the License.
+
+ Red Hat elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with Red Hat elfutils; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+ Red Hat elfutils is an included package of the Open Invention Network.
+ An included package of the Open Invention Network is a package for which
+ Open Invention Network licensees cross-license their patents. No patent
+ license is granted, either expressly or impliedly, by designation as an
+ included package. Should you wish to participate in the Open Invention
+ Network licensing program, please visit www.openinventionnetwork.com
+ <http://www.openinventionnetwork.com>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#define BACKEND parisc_
+#define RELOC_PREFIX R_PARISC_
+#include "libebl_CPU.h"
+#include "libebl_parisc.h"
+
+/* This defines the common reloc hooks based on parisc_reloc.def. */
+#include "common-reloc.c"
+
+
+const char *
+parisc_init (elf, machine, eh, ehlen)
+ Elf *elf __attribute__ ((unused));
+ GElf_Half machine __attribute__ ((unused));
+ Ebl *eh;
+ size_t ehlen;
+{
+ int pa64 = 0;
+
+ /* Check whether the Elf_BH object has a sufficent size. */
+ if (ehlen < sizeof (Ebl))
+ return NULL;
+
+ if (elf) {
+ GElf_Ehdr ehdr_mem;
+ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
+ if (ehdr && (ehdr->e_flags & EF_PARISC_WIDE))
+ pa64 = 1;
+ }
+ /* We handle it. */
+ eh->name = "PA-RISC";
+ parisc_init_reloc (eh);
+ HOOK (eh, reloc_simple_type);
+ HOOK (eh, machine_flag_check);
+ HOOK (eh, symbol_type_name);
+ HOOK (eh, segment_type_name);
+ HOOK (eh, section_type_name);
+ HOOK (eh, register_info);
+ if (pa64)
+ eh->return_value_location = parisc_return_value_location_64;
+ else
+ eh->return_value_location = parisc_return_value_location_32;
+
+ return MODVERSION;
+}
Index: elfutils-0.146/backends/parisc_regs.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ elfutils-0.146/backends/parisc_regs.c 2010-04-24 10:10:50.000000000 +0000
@@ -0,0 +1,159 @@
+/* Register names and numbers for PA-RISC DWARF.
+ Copyright (C) 2005, 2006 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+
+ Red Hat elfutils is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by the
+ Free Software Foundation; version 2 of the License.
+
+ Red Hat elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with Red Hat elfutils; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+ Red Hat elfutils is an included package of the Open Invention Network.
+ An included package of the Open Invention Network is a package for which
+ Open Invention Network licensees cross-license their patents. No patent
+ license is granted, either expressly or impliedly, by designation as an
+ included package. Should you wish to participate in the Open Invention
+ Network licensing program, please visit www.openinventionnetwork.com
+ <http://www.openinventionnetwork.com>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+#include <dwarf.h>
+
+#define BACKEND parisc_
+#include "libebl_CPU.h"
+
+ssize_t
+parisc_register_info (Ebl *ebl, int regno, char *name, size_t namelen,
+ const char **prefix, const char **setname,
+ int *bits, int *type)
+{
+ int pa64 = 0;
+
+ if (ebl->elf) {
+ GElf_Ehdr ehdr_mem;
+ GElf_Ehdr *ehdr = gelf_getehdr (ebl->elf, &ehdr_mem);
+ if (ehdr->e_flags & EF_PARISC_WIDE)
+ pa64 = 1;
+ }
+
+ int nregs = pa64 ? 127 : 128;
+
+ if (name == NULL)
+ return nregs;
+
+ if (regno < 0 || regno >= nregs || namelen < 6)
+ return -1;
+
+ *prefix = "%";
+
+ if (regno < 32)
+ {
+ *setname = "integer";
+ *type = DW_ATE_signed;
+ if (pa64)
+ {
+ *bits = 64;
+ }
+ else
+ {
+ *bits = 32;
+ }
+ }
+ else if (regno == 32)
+ {
+ *setname = "special";
+ if (pa64)
+ {
+ *bits = 6;
+ }
+ else
+ {
+ *bits = 5;
+ }
+ *type = DW_ATE_unsigned;
+ }
+ else
+ {
+ *setname = "FPU";
+ *type = DW_ATE_float;
+ if (pa64)
+ {
+ *bits = 64;
+ }
+ else
+ {
+ *bits = 32;
+ }
+ }
+
+ if (regno < 33) {
+ switch (regno)
+ {
+ case 0 ... 9:
+ name[0] = 'r';
+ name[1] = regno + '0';
+ namelen = 2;
+ break;
+ case 10 ... 31:
+ name[0] = 'r';
+ name[1] = regno / 10 + '0';
+ name[2] = regno % 10 + '0';
+ namelen = 3;
+ break;
+ case 32:
+ *prefix = NULL;
+ name[0] = 'S';
+ name[1] = 'A';
+ name[2] = 'R';
+ namelen = 3;
+ break;
+ }
+ }
+ else {
+ if (pa64 && ((regno - 72) % 2)) {
+ *setname = NULL;
+ return 0;
+ }
+
+ switch (regno)
+ {
+ case 72 + 0 ... 72 + 11:
+ name[0] = 'f';
+ name[1] = 'r';
+ name[2] = (regno + 8 - 72) / 2 + '0';
+ namelen = 3;
+ if ((regno + 8 - 72) % 2) {
+ name[3] = 'R';
+ namelen++;
+ }
+ break;
+ case 72 + 12 ... 72 + 55:
+ name[0] = 'f';
+ name[1] = 'r';
+ name[2] = (regno + 8 - 72) / 2 / 10 + '0';
+ name[3] = (regno + 8 - 72) / 2 % 10 + '0';
+ namelen = 4;
+ if ((regno + 8 - 72) % 2) {
+ name[4] = 'R';
+ namelen++;
+ }
+ break;
+ default:
+ *setname = NULL;
+ return 0;
+ }
+ }
+ name[namelen++] = '\0';
+ return namelen;
+}
Index: elfutils-0.146/backends/parisc_reloc.def
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ elfutils-0.146/backends/parisc_reloc.def 2010-04-24 10:10:50.000000000 +0000
@@ -0,0 +1,128 @@
+/* List the relocation types for PA-RISC. -*- C -*-
+ Copyright (C) 2005 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+
+ Red Hat elfutils is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by the
+ Free Software Foundation; version 2 of the License.
+
+ Red Hat elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with Red Hat elfutils; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+ Red Hat elfutils is an included package of the Open Invention Network.
+ An included package of the Open Invention Network is a package for which
+ Open Invention Network licensees cross-license their patents. No patent
+ license is granted, either expressly or impliedly, by designation as an
+ included package. Should you wish to participate in the Open Invention
+ Network licensing program, please visit www.openinventionnetwork.com
+ <http://www.openinventionnetwork.com>. */
+
+/* NAME, REL|EXEC|DYN */
+
+RELOC_TYPE (NONE, EXEC|DYN)
+RELOC_TYPE (DIR32, REL|EXEC|DYN)
+RELOC_TYPE (DIR21L, REL|EXEC|DYN)
+RELOC_TYPE (DIR17R, REL)
+RELOC_TYPE (DIR17F, REL)
+RELOC_TYPE (DIR14R, REL|DYN)
+RELOC_TYPE (PCREL32, REL)
+RELOC_TYPE (PCREL21L, REL)
+RELOC_TYPE (PCREL17R, REL)
+RELOC_TYPE (PCREL17F, REL)
+RELOC_TYPE (PCREL14R, REL|EXEC)
+RELOC_TYPE (DPREL21L, REL)
+RELOC_TYPE (DPREL14WR, REL)
+RELOC_TYPE (DPREL14DR, REL)
+RELOC_TYPE (DPREL14R, REL)
+RELOC_TYPE (GPREL21L, 0)
+RELOC_TYPE (GPREL14R, 0)
+RELOC_TYPE (LTOFF21L, REL)
+RELOC_TYPE (LTOFF14R, REL)
+RELOC_TYPE (DLTIND14F, 0)
+RELOC_TYPE (SETBASE, 0)
+RELOC_TYPE (SECREL32, REL)
+RELOC_TYPE (BASEREL21L, 0)
+RELOC_TYPE (BASEREL17R, 0)
+RELOC_TYPE (BASEREL14R, 0)
+RELOC_TYPE (SEGBASE, 0)
+RELOC_TYPE (SEGREL32, REL)
+RELOC_TYPE (PLTOFF21L, 0)
+RELOC_TYPE (PLTOFF14R, 0)
+RELOC_TYPE (PLTOFF14F, 0)
+RELOC_TYPE (LTOFF_FPTR32, 0)
+RELOC_TYPE (LTOFF_FPTR21L, 0)
+RELOC_TYPE (LTOFF_FPTR14R, 0)
+RELOC_TYPE (FPTR64, 0)
+RELOC_TYPE (PLABEL32, REL|DYN)
+RELOC_TYPE (PCREL64, 0)
+RELOC_TYPE (PCREL22C, 0)
+RELOC_TYPE (PCREL22F, 0)
+RELOC_TYPE (PCREL14WR, 0)
+RELOC_TYPE (PCREL14DR, 0)
+RELOC_TYPE (PCREL16F, 0)
+RELOC_TYPE (PCREL16WF, 0)
+RELOC_TYPE (PCREL16DF, 0)
+RELOC_TYPE (DIR64, REL|DYN)
+RELOC_TYPE (DIR14WR, REL)
+RELOC_TYPE (DIR14DR, REL)
+RELOC_TYPE (DIR16F, REL)
+RELOC_TYPE (DIR16WF, REL)
+RELOC_TYPE (DIR16DF, REL)
+RELOC_TYPE (GPREL64, 0)
+RELOC_TYPE (GPREL14WR, 0)
+RELOC_TYPE (GPREL14DR, 0)
+RELOC_TYPE (GPREL16F, 0)
+RELOC_TYPE (GPREL16WF, 0)
+RELOC_TYPE (GPREL16DF, 0)
+RELOC_TYPE (LTOFF64, 0)
+RELOC_TYPE (LTOFF14WR, 0)
+RELOC_TYPE (LTOFF14DR, 0)
+RELOC_TYPE (LTOFF16F, 0)
+RELOC_TYPE (LTOFF16WF, 0)
+RELOC_TYPE (LTOFF16DF, 0)
+RELOC_TYPE (SECREL64, 0)
+RELOC_TYPE (BASEREL14WR, 0)
+RELOC_TYPE (BASEREL14DR, 0)
+RELOC_TYPE (SEGREL64, 0)
+RELOC_TYPE (PLTOFF14WR, 0)
+RELOC_TYPE (PLTOFF14DR, 0)
+RELOC_TYPE (PLTOFF16F, 0)
+RELOC_TYPE (PLTOFF16WF, 0)
+RELOC_TYPE (PLTOFF16DF, 0)
+RELOC_TYPE (LTOFF_FPTR64, 0)
+RELOC_TYPE (LTOFF_FPTR14WR, 0)
+RELOC_TYPE (LTOFF_FPTR14DR, 0)
+RELOC_TYPE (LTOFF_FPTR16F, 0)
+RELOC_TYPE (LTOFF_FPTR16WF, 0)
+RELOC_TYPE (LTOFF_FPTR16DF, 0)
+RELOC_TYPE (COPY, EXEC)
+RELOC_TYPE (IPLT, EXEC|DYN)
+RELOC_TYPE (EPLT, 0)
+RELOC_TYPE (TPREL32, DYN)
+RELOC_TYPE (TPREL21L, 0)
+RELOC_TYPE (TPREL14R, 0)
+RELOC_TYPE (LTOFF_TP21L, 0)
+RELOC_TYPE (LTOFF_TP14R, 0)
+RELOC_TYPE (LTOFF_TP14F, 0)
+RELOC_TYPE (TPREL64, 0)
+RELOC_TYPE (TPREL14WR, 0)
+RELOC_TYPE (TPREL14DR, 0)
+RELOC_TYPE (TPREL16F, 0)
+RELOC_TYPE (TPREL16WF, 0)
+RELOC_TYPE (TPREL16DF, 0)
+RELOC_TYPE (LTOFF_TP64, 0)
+RELOC_TYPE (LTOFF_TP14WR, 0)
+RELOC_TYPE (LTOFF_TP14DR, 0)
+RELOC_TYPE (LTOFF_TP16F, 0)
+RELOC_TYPE (LTOFF_TP16WF, 0)
+RELOC_TYPE (LTOFF_TP16DF, 0)
+RELOC_TYPE (TLS_DTPMOD32, DYN)
+RELOC_TYPE (TLS_DTPMOD64, DYN)
+
+#define NO_RELATIVE_RELOC 1
Index: elfutils-0.146/backends/parisc_retval.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ elfutils-0.146/backends/parisc_retval.c 2010-04-24 10:10:50.000000000 +0000
@@ -0,0 +1,213 @@
+/* Function return value location for Linux/PA-RISC ABI.
+ Copyright (C) 2005 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+
+ Red Hat elfutils is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by the
+ Free Software Foundation; version 2 of the License.
+
+ Red Hat elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with Red Hat elfutils; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+ Red Hat elfutils is an included package of the Open Invention Network.
+ An included package of the Open Invention Network is a package for which
+ Open Invention Network licensees cross-license their patents. No patent
+ license is granted, either expressly or impliedly, by designation as an
+ included package. Should you wish to participate in the Open Invention
+ Network licensing program, please visit www.openinventionnetwork.com
+ <http://www.openinventionnetwork.com>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <assert.h>
+#include <dwarf.h>
+
+#define BACKEND parisc_
+#include "libebl_CPU.h"
+#include "libebl_parisc.h"
+
+/* %r28, or pair %r28, %r29. */
+static const Dwarf_Op loc_intreg32[] =
+ {
+ { .atom = DW_OP_reg28 }, { .atom = DW_OP_piece, .number = 4 },
+ { .atom = DW_OP_reg29 }, { .atom = DW_OP_piece, .number = 4 },
+ };
+
+static const Dwarf_Op loc_intreg[] =
+ {
+ { .atom = DW_OP_reg28 }, { .atom = DW_OP_piece, .number = 8 },
+ { .atom = DW_OP_reg29 }, { .atom = DW_OP_piece, .number = 8 },
+ };
+#define nloc_intreg 1
+#define nloc_intregpair 4
+
+/* %fr4L, or pair %fr4L, %fr4R on pa-32 */
+static const Dwarf_Op loc_fpreg32[] =
+ {
+ { .atom = DW_OP_regx, .number = 72 }, { .atom = DW_OP_piece, .number = 4 },
+ { .atom = DW_OP_regx, .number = 73 }, { .atom = DW_OP_piece, .number = 4 },
+ };
+#define nloc_fpreg32 2
+#define nloc_fpregpair32 4
+
+/* $fr4 */
+static const Dwarf_Op loc_fpreg[] =
+ {
+ { .atom = DW_OP_regx, .number = 72 },
+ };
+#define nloc_fpreg 1
+
+#if 0
+/* The return value is a structure and is actually stored in stack space
+ passed in a hidden argument by the caller. Address of the location is stored
+ in %r28 before function call, but it may be changed by function. */
+static const Dwarf_Op loc_aggregate[] =
+ {
+ { .atom = DW_OP_breg28 },
+ };
+#define nloc_aggregate 1
+#endif
+
+static int
+parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, int pa64)
+{
+ Dwarf_Word regsize = pa64 ? 8 : 4;
+
+ /* Start with the function's type, and get the DW_AT_type attribute,
+ which is the type of the return value. */
+
+ Dwarf_Attribute attr_mem;
+ Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type, &attr_mem);
+ if (attr == NULL)
+ /* The function has no return value, like a `void' function in C. */
+ return 0;
+
+ Dwarf_Die die_mem;
+ Dwarf_Die *typedie = dwarf_formref_die (attr, &die_mem);
+ int tag = dwarf_tag (typedie);
+
+ /* Follow typedefs and qualifiers to get to the actual type. */
+ while (tag == DW_TAG_typedef
+ || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type
+ || tag == DW_TAG_restrict_type || tag == DW_TAG_mutable_type)
+ {
+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = dwarf_tag (typedie);
+ }
+
+ switch (tag)
+ {
+ case -1:
+ return -1;
+
+ case DW_TAG_subrange_type:
+ if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size))
+ {
+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = dwarf_tag (typedie);
+ }
+ /* Fall through. */
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+ case DW_TAG_pointer_type:
+ case DW_TAG_ptr_to_member_type:
+ {
+ Dwarf_Word size;
+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
+ &attr_mem), &size) != 0)
+ {
+ if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
+ size = 4;
+ else
+ return -1;
+ }
+ if (tag == DW_TAG_base_type)
+ {
+ Dwarf_Word encoding;
+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
+ &attr_mem), &encoding) != 0)
+ return -1;
+
+ if (encoding == DW_ATE_float)
+ {
+ if (pa64) {
+ *locp = loc_fpreg;
+ if (size <= 8)
+ return nloc_fpreg;
+ }
+ else {
+ *locp = loc_fpreg32;
+ if (size <= 4)
+ return nloc_fpreg32;
+ else if (size <= 8)
+ return nloc_fpregpair32;
+ }
+ goto aggregate;
+ }
+ }
+ if (pa64)
+ *locp = loc_intreg;
+ else
+ *locp = loc_intreg32;
+ if (size <= regsize)
+ return nloc_intreg;
+ if (size <= 2 * regsize)
+ return nloc_intregpair;
+
+ /* Else fall through. */
+ }
+
+ case DW_TAG_structure_type:
+ case DW_TAG_class_type:
+ case DW_TAG_union_type:
+ case DW_TAG_array_type:
+ aggregate: {
+ Dwarf_Word size;
+ if (dwarf_aggregate_size (typedie, &size) != 0)
+ return -1;
+ if (pa64)
+ *locp = loc_intreg;
+ else
+ *locp = loc_intreg32;
+ if (size <= regsize)
+ return nloc_intreg;
+ if (size <= 2 * regsize)
+ return nloc_intregpair;
+#if 0
+ /* there should be some way to know this location... But I do not see it. */
+ *locp = loc_aggregate;
+ return nloc_aggregate;
+#endif
+ /* fall through. */
+ }
+ }
+
+ /* XXX We don't have a good way to return specific errors from ebl calls.
+ This value means we do not understand the type, but it is well-formed
+ DWARF and might be valid. */
+ return -2;
+}
+
+int
+parisc_return_value_location_32 (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+{
+ return parisc_return_value_location_ (functypedie, locp, 0);
+}
+
+int
+parisc_return_value_location_64 (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+{
+ return parisc_return_value_location_ (functypedie, locp, 1);
+}
+
Index: elfutils-0.146/backends/parisc_symbol.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ elfutils-0.146/backends/parisc_symbol.c 2010-04-24 10:10:50.000000000 +0000
@@ -0,0 +1,112 @@
+/* PA-RISC specific symbolic name handling.
+ Copyright (C) 2002, 2005 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+ Red Hat elfutils is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by the
+ Free Software Foundation; version 2 of the License.
+
+ Red Hat elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with Red Hat elfutils; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+ Red Hat elfutils is an included package of the Open Invention Network.
+ An included package of the Open Invention Network is a package for which
+ Open Invention Network licensees cross-license their patents. No patent
+ license is granted, either expressly or impliedly, by designation as an
+ included package. Should you wish to participate in the Open Invention
+ Network licensing program, please visit www.openinventionnetwork.com
+ <http://www.openinventionnetwork.com>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <elf.h>
+#include <stddef.h>
+
+#define BACKEND parisc_
+#include "libebl_CPU.h"
+
+const char *
+parisc_segment_type_name (int segment, char *buf __attribute__ ((unused)),
+ size_t len __attribute__ ((unused)))
+{
+ switch (segment)
+ {
+ case PT_PARISC_ARCHEXT:
+ return "PARISC_ARCHEXT";
+ case PT_PARISC_UNWIND:
+ return "PARISC_UNWIND";
+ default:
+ break;
+ }
+ return NULL;
+}
+
+/* Return symbolic representation of symbol type. */
+const char *
+parisc_symbol_type_name(int symbol, char *buf __attribute__ ((unused)),
+ size_t len __attribute__ ((unused)))
+{
+ if (symbol == STT_PARISC_MILLICODE)
+ return "PARISC_MILLI";
+ return NULL;
+}
+
+/* Return symbolic representation of section type. */
+const char *
+parisc_section_type_name (int type,
+ char *buf __attribute__ ((unused)),
+ size_t len __attribute__ ((unused)))
+{
+ switch (type)
+ {
+ case SHT_PARISC_EXT:
+ return "PARISC_EXT";
+ case SHT_PARISC_UNWIND:
+ return "PARISC_UNWIND";
+ case SHT_PARISC_DOC:
+ return "PARISC_DOC";
+ }
+
+ return NULL;
+}
+
+/* Check whether machine flags are valid. */
+bool
+parisc_machine_flag_check (GElf_Word flags)
+{
+ if (flags &~ (EF_PARISC_TRAPNIL | EF_PARISC_EXT | EF_PARISC_LSB |
+ EF_PARISC_WIDE | EF_PARISC_NO_KABP |
+ EF_PARISC_LAZYSWAP | EF_PARISC_ARCH))
+ return 0;
+
+ GElf_Word arch = flags & EF_PARISC_ARCH;
+
+ return ((arch == EFA_PARISC_1_0) || (arch == EFA_PARISC_1_1) ||
+ (arch == EFA_PARISC_2_0));
+}
+
+/* Check for the simple reloc types. */
+Elf_Type
+parisc_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
+{
+ switch (type)
+ {
+ case R_PARISC_DIR64:
+ case R_PARISC_SECREL64:
+ return ELF_T_XWORD;
+ case R_PARISC_DIR32:
+ case R_PARISC_SECREL32:
+ return ELF_T_WORD;
+ default:
+ return ELF_T_NUM;
+ }
+}
Index: elfutils-0.146/backends/libebl_parisc.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ elfutils-0.146/backends/libebl_parisc.h 2010-04-24 10:10:50.000000000 +0000
@@ -0,0 +1,9 @@
+#ifndef _LIBEBL_HPPA_H
+#define _LIBEBL_HPPA_H 1
+
+#include <libdw.h>
+
+extern int parisc_return_value_location_32(Dwarf_Die *, const Dwarf_Op **locp);
+extern int parisc_return_value_location_64(Dwarf_Die *, const Dwarf_Op **locp);
+
+#endif
Index: elfutils-0.146/backends/Makefile.am
===================================================================
--- elfutils-0.146.orig/backends/Makefile.am 2010-04-24 10:10:41.000000000 +0000
+++ elfutils-0.146/backends/Makefile.am 2010-04-24 10:10:50.000000000 +0000
@@ -29,11 +29,11 @@
-I$(top_srcdir)/libelf -I$(top_srcdir)/libdw
-modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390
+modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 parisc
libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
libebl_sparc_pic.a libebl_ppc_pic.a libebl_ppc64_pic.a \
- libebl_s390_pic.a
+ libebl_s390_pic.a libebl_parisc_pic.a
noinst_LIBRARIES = $(libebl_pic)
noinst_DATA = $(libebl_pic:_pic.a=.so)
@@ -95,6 +95,9 @@
libebl_s390_pic_a_SOURCES = $(s390_SRCS)
am_libebl_s390_pic_a_OBJECTS = $(s390_SRCS:.c=.os)
+parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c
+libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
+am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
@rm -f $(@:.so=.map)
Index: elfutils-0.146/libelf/elf.h
===================================================================
--- elfutils-0.146.orig/libelf/elf.h 2010-04-13 20:08:02.000000000 +0000
+++ elfutils-0.146/libelf/elf.h 2010-04-24 10:10:50.000000000 +0000
@@ -1789,16 +1789,24 @@
#define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */
#define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */
#define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */
+#define R_PARISC_DPREL14WR 19
+#define R_PARISC_DPREL14DR 20
#define R_PARISC_DPREL14R 22 /* Right 14 bits of rel. address. */
#define R_PARISC_GPREL21L 26 /* GP-relative, left 21 bits. */
#define R_PARISC_GPREL14R 30 /* GP-relative, right 14 bits. */
#define R_PARISC_LTOFF21L 34 /* LT-relative, left 21 bits. */
#define R_PARISC_LTOFF14R 38 /* LT-relative, right 14 bits. */
+#define R_PARISC_DLTIND14F 39
+#define R_PARISC_SETBASE 40
#define R_PARISC_SECREL32 41 /* 32 bits section rel. address. */
+#define R_PARISC_BASEREL21L 42
+#define R_PARISC_BASEREL17R 43
+#define R_PARISC_BASEREL14R 46
#define R_PARISC_SEGBASE 48 /* No relocation, set segment base. */
#define R_PARISC_SEGREL32 49 /* 32 bits segment rel. address. */
#define R_PARISC_PLTOFF21L 50 /* PLT rel. address, left 21 bits. */
#define R_PARISC_PLTOFF14R 54 /* PLT rel. address, right 14 bits. */
+#define R_PARISC_PLTOFF14F 55
#define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */
#define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */
#define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */
@@ -1807,6 +1815,7 @@
#define R_PARISC_PLABEL21L 66 /* Left 21 bits of fdesc address. */
#define R_PARISC_PLABEL14R 70 /* Right 14 bits of fdesc address. */
#define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */
+#define R_PARISC_PCREL22C 73
#define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */
#define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */
#define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */
@@ -1832,6 +1841,8 @@
#define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */
#define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */
#define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */
+#define R_PARISC_BASEREL14WR 107
+#define R_PARISC_BASEREL14DR 108
#define R_PARISC_SEGREL64 112 /* 64 bits segment rel. address. */
#define R_PARISC_PLTOFF14WR 115 /* PLT-rel. address, right 14 bits. */
#define R_PARISC_PLTOFF14DR 116 /* PLT-rel. address, right 14 bits. */

File diff suppressed because it is too large Load Diff

View File

@ -1,309 +0,0 @@
Upstream-Status: Backport
Index: elfutils-0.146/backends/m68k_init.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ elfutils-0.146/backends/m68k_init.c 2010-04-24 10:11:38.000000000 +0000
@@ -0,0 +1,49 @@
+/* Initialization of m68k specific backend library.
+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
+
+ This software is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by the
+ Free Software Foundation; version 2 of the License.
+
+ This softare is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this software; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#define BACKEND m68k_
+#define RELOC_PREFIX R_68K_
+#include "libebl_CPU.h"
+
+/* This defines the common reloc hooks based on m68k_reloc.def. */
+#include "common-reloc.c"
+
+
+const char *
+m68k_init (elf, machine, eh, ehlen)
+ Elf *elf __attribute__ ((unused));
+ GElf_Half machine __attribute__ ((unused));
+ Ebl *eh;
+ size_t ehlen;
+{
+ /* Check whether the Elf_BH object has a sufficent size. */
+ if (ehlen < sizeof (Ebl))
+ return NULL;
+
+ /* We handle it. */
+ eh->name = "m68k";
+ m68k_init_reloc (eh);
+ HOOK (eh, reloc_simple_type);
+ HOOK (eh, register_info);
+
+ return MODVERSION;
+}
Index: elfutils-0.146/backends/m68k_regs.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ elfutils-0.146/backends/m68k_regs.c 2010-04-24 10:11:38.000000000 +0000
@@ -0,0 +1,106 @@
+/* Register names and numbers for m68k DWARF.
+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
+
+ This software is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by the
+ Free Software Foundation; version 2 of the License.
+
+ This software is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this software; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+#include <dwarf.h>
+
+#define BACKEND m68k_
+#include "libebl_CPU.h"
+
+ssize_t
+m68k_register_info (Ebl *ebl __attribute__ ((unused)),
+ int regno, char *name, size_t namelen,
+ const char **prefix, const char **setname,
+ int *bits, int *type)
+{
+ if (name == NULL)
+ return 25;
+
+ if (regno < 0 || regno > 24 || namelen < 5)
+ return -1;
+
+ *prefix = "%";
+ *bits = 32;
+ *type = (regno < 8 ? DW_ATE_signed
+ : regno < 16 ? DW_ATE_address : DW_ATE_float);
+
+ if (regno < 8)
+ {
+ *setname = "integer";
+ }
+ else if (regno < 16)
+ {
+ *setname = "address";
+ }
+ else if (regno < 24)
+ {
+ *setname = "FPU";
+ }
+ else
+ {
+ *setname = "address";
+ *type = DW_ATE_address;
+ }
+
+ switch (regno)
+ {
+ case 0 ... 7:
+ name[0] = 'd';
+ name[1] = regno + '0';
+ namelen = 2;
+ break;
+
+ case 8 ... 13:
+ name[0] = 'a';
+ name[1] = regno - 8 + '0';
+ namelen = 2;
+ break;
+
+ case 14:
+ name[0] = 'f';
+ name[1] = 'p';
+ namelen = 2;
+ break;
+
+ case 15:
+ name[0] = 's';
+ name[1] = 'p';
+ namelen = 2;
+ break;
+
+ case 16 ... 23:
+ name[0] = 'f';
+ name[1] = 'p';
+ name[2] = regno - 16 + '0';
+ namelen = 3;
+ break;
+
+ case 24:
+ name[0] = 'p';
+ name[1] = 'c';
+ namelen = 2;
+ }
+
+ name[namelen++] = '\0';
+ return namelen;
+}
+
Index: elfutils-0.146/backends/m68k_reloc.def
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ elfutils-0.146/backends/m68k_reloc.def 2010-04-24 10:11:38.000000000 +0000
@@ -0,0 +1,45 @@
+/* List the relocation types for m68k. -*- C -*-
+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
+
+ This software is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by the
+ Free Software Foundation; version 2 of the License.
+
+ This software is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this software; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+*/
+
+/* NAME, REL|EXEC|DYN */
+
+RELOC_TYPE (NONE, 0)
+RELOC_TYPE (32, REL|EXEC|DYN)
+RELOC_TYPE (16, REL)
+RELOC_TYPE (8, REL)
+RELOC_TYPE (PC32, REL|EXEC|DYN)
+RELOC_TYPE (PC16, REL)
+RELOC_TYPE (PC8, REL)
+RELOC_TYPE (GOT32, REL)
+RELOC_TYPE (GOT16, REL)
+RELOC_TYPE (GOT8, REL)
+RELOC_TYPE (GOT32O, REL)
+RELOC_TYPE (GOT16O, REL)
+RELOC_TYPE (GOT8O, REL)
+RELOC_TYPE (PLT32, REL)
+RELOC_TYPE (PLT16, REL)
+RELOC_TYPE (PLT8, REL)
+RELOC_TYPE (PLT32O, REL)
+RELOC_TYPE (PLT16O, REL)
+RELOC_TYPE (PLT8O, REL)
+RELOC_TYPE (COPY, EXEC)
+RELOC_TYPE (GLOB_DAT, EXEC|DYN)
+RELOC_TYPE (JMP_SLOT, EXEC|DYN)
+RELOC_TYPE (RELATIVE, EXEC|DYN)
+RELOC_TYPE (GNU_VTINHERIT, REL)
+RELOC_TYPE (GNU_VTENTRY, REL)
+
Index: elfutils-0.146/libelf/elf.h
===================================================================
--- elfutils-0.146.orig/libelf/elf.h 2010-04-24 10:11:13.000000000 +0000
+++ elfutils-0.146/libelf/elf.h 2010-04-24 10:13:50.000000000 +0000
@@ -1125,6 +1125,9 @@
#define R_68K_GLOB_DAT 20 /* Create GOT entry */
#define R_68K_JMP_SLOT 21 /* Create PLT entry */
#define R_68K_RELATIVE 22 /* Adjust by program base */
+/* The next 2 are GNU extensions to enable C++ vtable garbage collection. */
+#define R_68K_GNU_VTINHERIT 23
+#define R_68K_GNU_VTENTRY 24
#define R_68K_TLS_GD32 25 /* 32 bit GOT offset for GD */
#define R_68K_TLS_GD16 26 /* 16 bit GOT offset for GD */
#define R_68K_TLS_GD8 27 /* 8 bit GOT offset for GD */
Index: elfutils-0.146/backends/Makefile.am
===================================================================
--- elfutils-0.146.orig/backends/Makefile.am 2010-04-24 10:11:23.000000000 +0000
+++ elfutils-0.146/backends/Makefile.am 2010-04-24 10:11:38.000000000 +0000
@@ -29,11 +29,12 @@
-I$(top_srcdir)/libelf -I$(top_srcdir)/libdw
-modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 parisc mips
+modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 parisc mips m68k
libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
libebl_sparc_pic.a libebl_ppc_pic.a libebl_ppc64_pic.a \
- libebl_s390_pic.a libebl_parisc_pic.a libebl_mips_pic.a
+ libebl_s390_pic.a libebl_parisc_pic.a libebl_mips_pic.a \
+ libebl_m68k_pic.a
noinst_LIBRARIES = $(libebl_pic)
noinst_DATA = $(libebl_pic:_pic.a=.so)
@@ -103,6 +104,10 @@
libebl_mips_pic_a_SOURCES = $(mips_SRCS)
am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
+m68k_SRCS = m68k_init.c m68k_symbol.c m68k_regs.c
+libebl_m68k_pic_a_SOURCES = $(m68k_SRCS)
+am_libebl_m68k_pic_a_OBJECTS = $(m68k_SRCS:.c=.os)
+
libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
@rm -f $(@:.so=.map)
echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \
Index: elfutils-0.146/backends/m68k_symbol.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ elfutils-0.146/backends/m68k_symbol.c 2010-04-24 10:11:38.000000000 +0000
@@ -0,0 +1,43 @@
+/* m68k specific symbolic name handling.
+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
+
+ This software is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by the
+ Free Software Foundation; version 2 of the License.
+
+ This software distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this software; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <elf.h>
+#include <stddef.h>
+
+#define BACKEND m68k_
+#include "libebl_CPU.h"
+
+/* Check for the simple reloc types. */
+Elf_Type
+m68k_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
+{
+ switch (type)
+ {
+ case R_68K_32:
+ return ELF_T_SWORD;
+ case R_68K_16:
+ return ELF_T_HALF;
+ case R_68K_8:
+ return ELF_T_BYTE;
+ default:
+ return ELF_T_NUM;
+ }
+}

View File

@ -1,713 +0,0 @@
Upstream-Status: Backport
Index: elfutils-0.145/backends/mips_init.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ elfutils-0.145/backends/mips_init.c 2010-02-24 18:57:35.000000000 +0000
@@ -0,0 +1,60 @@
+/* Initialization of mips specific backend library.
+ Copyright (C) 2006 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+
+ Red Hat elfutils is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by the
+ Free Software Foundation; version 2 of the License.
+
+ Red Hat elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with Red Hat elfutils; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+ Red Hat elfutils is an included package of the Open Invention Network.
+ An included package of the Open Invention Network is a package for which
+ Open Invention Network licensees cross-license their patents. No patent
+ license is granted, either expressly or impliedly, by designation as an
+ included package. Should you wish to participate in the Open Invention
+ Network licensing program, please visit www.openinventionnetwork.com
+ <http://www.openinventionnetwork.com>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#define BACKEND mips_
+#define RELOC_PREFIX R_MIPS_
+#include "libebl_CPU.h"
+
+/* This defines the common reloc hooks based on mips_reloc.def. */
+#include "common-reloc.c"
+
+const char *
+mips_init (elf, machine, eh, ehlen)
+ Elf *elf __attribute__ ((unused));
+ GElf_Half machine __attribute__ ((unused));
+ Ebl *eh;
+ size_t ehlen;
+{
+ /* Check whether the Elf_BH object has a sufficent size. */
+ if (ehlen < sizeof (Ebl))
+ return NULL;
+
+ /* We handle it. */
+ if (machine == EM_MIPS)
+ eh->name = "MIPS R3000 big-endian";
+ else if (machine == EM_MIPS_RS3_LE)
+ eh->name = "MIPS R3000 little-endian";
+
+ mips_init_reloc (eh);
+ HOOK (eh, reloc_simple_type);
+ HOOK (eh, return_value_location);
+ HOOK (eh, register_info);
+
+ return MODVERSION;
+}
Index: elfutils-0.145/backends/mips_regs.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ elfutils-0.145/backends/mips_regs.c 2010-02-24 18:57:35.000000000 +0000
@@ -0,0 +1,104 @@
+/* Register names and numbers for MIPS DWARF.
+ Copyright (C) 2006 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+
+ Red Hat elfutils is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by the
+ Free Software Foundation; version 2 of the License.
+
+ Red Hat elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with Red Hat elfutils; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+ Red Hat elfutils is an included package of the Open Invention Network.
+ An included package of the Open Invention Network is a package for which
+ Open Invention Network licensees cross-license their patents. No patent
+ license is granted, either expressly or impliedly, by designation as an
+ included package. Should you wish to participate in the Open Invention
+ Network licensing program, please visit www.openinventionnetwork.com
+ <http://www.openinventionnetwork.com>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+#include <dwarf.h>
+
+#define BACKEND mips_
+#include "libebl_CPU.h"
+
+ssize_t
+mips_register_info (Ebl *ebl __attribute__((unused)),
+ int regno, char *name, size_t namelen,
+ const char **prefix, const char **setname,
+ int *bits, int *type)
+{
+ if (name == NULL)
+ return 66;
+
+ if (regno < 0 || regno > 65 || namelen < 4)
+ return -1;
+
+ *prefix = "$";
+
+ if (regno < 32)
+ {
+ *setname = "integer";
+ *type = DW_ATE_signed;
+ *bits = 32;
+ if (regno < 32 + 10)
+ {
+ name[0] = regno + '0';
+ namelen = 1;
+ }
+ else
+ {
+ name[0] = (regno / 10) + '0';
+ name[1] = (regno % 10) + '0';
+ namelen = 2;
+ }
+ }
+ else if (regno < 64)
+ {
+ *setname = "FPU";
+ *type = DW_ATE_float;
+ *bits = 32;
+ name[0] = 'f';
+ if (regno < 32 + 10)
+ {
+ name[1] = (regno - 32) + '0';
+ namelen = 2;
+ }
+ else
+ {
+ name[1] = (regno - 32) / 10 + '0';
+ name[2] = (regno - 32) % 10 + '0';
+ namelen = 3;
+ }
+ }
+ else if (regno == 64)
+ {
+ *type = DW_ATE_signed;
+ *bits = 32;
+ name[0] = 'h';
+ name[1] = 'i';
+ namelen = 2;
+ }
+ else
+ {
+ *type = DW_ATE_signed;
+ *bits = 32;
+ name[0] = 'l';
+ name[1] = 'o';
+ namelen = 2;
+ }
+
+ name[namelen++] = '\0';
+ return namelen;
+}
Index: elfutils-0.145/backends/mips_reloc.def
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ elfutils-0.145/backends/mips_reloc.def 2010-02-24 18:57:35.000000000 +0000
@@ -0,0 +1,79 @@
+/* List the relocation types for mips. -*- C -*-
+ Copyright (C) 2006 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+
+ Red Hat elfutils is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by the
+ Free Software Foundation; version 2 of the License.
+
+ Red Hat elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with Red Hat elfutils; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+ Red Hat elfutils is an included package of the Open Invention Network.
+ An included package of the Open Invention Network is a package for which
+ Open Invention Network licensees cross-license their patents. No patent
+ license is granted, either expressly or impliedly, by designation as an
+ included package. Should you wish to participate in the Open Invention
+ Network licensing program, please visit www.openinventionnetwork.com
+ <http://www.openinventionnetwork.com>. */
+
+/* NAME, REL|EXEC|DYN */
+
+RELOC_TYPE (NONE, 0)
+RELOC_TYPE (16, 0)
+RELOC_TYPE (32, 0)
+RELOC_TYPE (REL32, 0)
+RELOC_TYPE (26, 0)
+RELOC_TYPE (HI16, 0)
+RELOC_TYPE (LO16, 0)
+RELOC_TYPE (GPREL16, 0)
+RELOC_TYPE (LITERAL, 0)
+RELOC_TYPE (GOT16, 0)
+RELOC_TYPE (PC16, 0)
+RELOC_TYPE (CALL16, 0)
+RELOC_TYPE (GPREL32, 0)
+
+RELOC_TYPE (SHIFT5, 0)
+RELOC_TYPE (SHIFT6, 0)
+RELOC_TYPE (64, 0)
+RELOC_TYPE (GOT_DISP, 0)
+RELOC_TYPE (GOT_PAGE, 0)
+RELOC_TYPE (GOT_OFST, 0)
+RELOC_TYPE (GOT_HI16, 0)
+RELOC_TYPE (GOT_LO16, 0)
+RELOC_TYPE (SUB, 0)
+RELOC_TYPE (INSERT_A, 0)
+RELOC_TYPE (INSERT_B, 0)
+RELOC_TYPE (DELETE, 0)
+RELOC_TYPE (HIGHER, 0)
+RELOC_TYPE (HIGHEST, 0)
+RELOC_TYPE (CALL_HI16, 0)
+RELOC_TYPE (CALL_LO16, 0)
+RELOC_TYPE (SCN_DISP, 0)
+RELOC_TYPE (REL16, 0)
+RELOC_TYPE (ADD_IMMEDIATE, 0)
+RELOC_TYPE (PJUMP, 0)
+RELOC_TYPE (RELGOT, 0)
+RELOC_TYPE (JALR, 0)
+RELOC_TYPE (TLS_DTPMOD32, 0)
+RELOC_TYPE (TLS_DTPREL32, 0)
+RELOC_TYPE (TLS_DTPMOD64, 0)
+RELOC_TYPE (TLS_DTPREL64, 0)
+RELOC_TYPE (TLS_GD, 0)
+RELOC_TYPE (TLS_LDM, 0)
+RELOC_TYPE (TLS_DTPREL_HI16, 0)
+RELOC_TYPE (TLS_DTPREL_LO16, 0)
+RELOC_TYPE (TLS_GOTTPREL, 0)
+RELOC_TYPE (TLS_TPREL32, 0)
+RELOC_TYPE (TLS_TPREL64, 0)
+RELOC_TYPE (TLS_TPREL_HI16, 0)
+RELOC_TYPE (TLS_TPREL_LO16, 0)
+
+#define NO_COPY_RELOC 1
+#define NO_RELATIVE_RELOC 1
Index: elfutils-0.145/backends/mips_retval.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ elfutils-0.145/backends/mips_retval.c 2010-02-24 18:57:35.000000000 +0000
@@ -0,0 +1,321 @@
+/* Function return value location for Linux/mips ABI.
+ Copyright (C) 2005 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+
+ Red Hat elfutils is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by the
+ Free Software Foundation; version 2 of the License.
+
+ Red Hat elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with Red Hat elfutils; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+ Red Hat elfutils is an included package of the Open Invention Network.
+ An included package of the Open Invention Network is a package for which
+ Open Invention Network licensees cross-license their patents. No patent
+ license is granted, either expressly or impliedly, by designation as an
+ included package. Should you wish to participate in the Open Invention
+ Network licensing program, please visit www.openinventionnetwork.com
+ <http://www.openinventionnetwork.com>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+#include <assert.h>
+#include <dwarf.h>
+#include <elf.h>
+
+#include "../libebl/libeblP.h"
+#include "../libdw/libdwP.h"
+
+#define BACKEND mips_
+#include "libebl_CPU.h"
+
+/* The ABI of the file. Also see EF_MIPS_ABI2 above. */
+#define EF_MIPS_ABI 0x0000F000
+
+/* The original o32 abi. */
+#define E_MIPS_ABI_O32 0x00001000
+
+/* O32 extended to work on 64 bit architectures */
+#define E_MIPS_ABI_O64 0x00002000
+
+/* EABI in 32 bit mode */
+#define E_MIPS_ABI_EABI32 0x00003000
+
+/* EABI in 64 bit mode */
+#define E_MIPS_ABI_EABI64 0x00004000
+
+/* All the possible MIPS ABIs. */
+enum mips_abi
+ {
+ MIPS_ABI_UNKNOWN = 0,
+ MIPS_ABI_N32,
+ MIPS_ABI_O32,
+ MIPS_ABI_N64,
+ MIPS_ABI_O64,
+ MIPS_ABI_EABI32,
+ MIPS_ABI_EABI64,
+ MIPS_ABI_LAST
+ };
+
+/* Find the mips ABI of the current file */
+enum mips_abi find_mips_abi(Elf *elf)
+{
+ GElf_Ehdr ehdr_mem;
+ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
+
+ if (ehdr == NULL)
+ return MIPS_ABI_LAST;
+
+ GElf_Word elf_flags = ehdr->e_flags;
+
+ /* Check elf_flags to see if it specifies the ABI being used. */
+ switch ((elf_flags & EF_MIPS_ABI))
+ {
+ case E_MIPS_ABI_O32:
+ return MIPS_ABI_O32;
+ case E_MIPS_ABI_O64:
+ return MIPS_ABI_O64;
+ case E_MIPS_ABI_EABI32:
+ return MIPS_ABI_EABI32;
+ case E_MIPS_ABI_EABI64:
+ return MIPS_ABI_EABI64;
+ default:
+ if ((elf_flags & EF_MIPS_ABI2))
+ return MIPS_ABI_N32;
+ }
+
+ /* GCC creates a pseudo-section whose name describes the ABI. */
+ size_t shstrndx;
+ if (elf_getshdrstrndx (elf, &shstrndx) < 0)
+ return MIPS_ABI_LAST;
+
+ const char *name;
+ Elf_Scn *scn = NULL;
+ while ((scn = elf_nextscn (elf, scn)) != NULL)
+ {
+ GElf_Shdr shdr_mem;
+ GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
+ if (shdr == NULL)
+ return MIPS_ABI_LAST;
+
+ name = elf_strptr (elf, shstrndx, shdr->sh_name) ?: "";
+ if (strncmp (name, ".mdebug.", 8) != 0)
+ continue;
+
+ if (strcmp (name, ".mdebug.abi32") == 0)
+ return MIPS_ABI_O32;
+ else if (strcmp (name, ".mdebug.abiN32") == 0)
+ return MIPS_ABI_N32;
+ else if (strcmp (name, ".mdebug.abi64") == 0)
+ return MIPS_ABI_N64;
+ else if (strcmp (name, ".mdebug.abiO64") == 0)
+ return MIPS_ABI_O64;
+ else if (strcmp (name, ".mdebug.eabi32") == 0)
+ return MIPS_ABI_EABI32;
+ else if (strcmp (name, ".mdebug.eabi64") == 0)
+ return MIPS_ABI_EABI64;
+ else
+ return MIPS_ABI_UNKNOWN;
+ }
+
+ return MIPS_ABI_UNKNOWN;
+}
+
+unsigned int
+mips_abi_regsize (enum mips_abi abi)
+{
+ switch (abi)
+ {
+ case MIPS_ABI_EABI32:
+ case MIPS_ABI_O32:
+ return 4;
+ case MIPS_ABI_N32:
+ case MIPS_ABI_N64:
+ case MIPS_ABI_O64:
+ case MIPS_ABI_EABI64:
+ return 8;
+ case MIPS_ABI_UNKNOWN:
+ case MIPS_ABI_LAST:
+ default:
+ return 0;
+ }
+}
+
+
+/* $v0 or pair $v0, $v1 */
+static const Dwarf_Op loc_intreg_o32[] =
+ {
+ { .atom = DW_OP_reg2 }, { .atom = DW_OP_piece, .number = 4 },
+ { .atom = DW_OP_reg3 }, { .atom = DW_OP_piece, .number = 4 },
+ };
+
+static const Dwarf_Op loc_intreg[] =
+ {
+ { .atom = DW_OP_reg2 }, { .atom = DW_OP_piece, .number = 8 },
+ { .atom = DW_OP_reg3 }, { .atom = DW_OP_piece, .number = 8 },
+ };
+#define nloc_intreg 1
+#define nloc_intregpair 4
+
+/* $f0 (float), or pair $f0, $f1 (double).
+ * f2/f3 are used for COMPLEX (= 2 doubles) returns in Fortran */
+static const Dwarf_Op loc_fpreg_o32[] =
+ {
+ { .atom = DW_OP_regx, .number = 32 }, { .atom = DW_OP_piece, .number = 4 },
+ { .atom = DW_OP_regx, .number = 33 }, { .atom = DW_OP_piece, .number = 4 },
+ { .atom = DW_OP_regx, .number = 34 }, { .atom = DW_OP_piece, .number = 4 },
+ { .atom = DW_OP_regx, .number = 35 }, { .atom = DW_OP_piece, .number = 4 },
+ };
+
+/* $f0, or pair $f0, $f2. */
+static const Dwarf_Op loc_fpreg[] =
+ {
+ { .atom = DW_OP_regx, .number = 32 }, { .atom = DW_OP_piece, .number = 8 },
+ { .atom = DW_OP_regx, .number = 34 }, { .atom = DW_OP_piece, .number = 8 },
+ };
+#define nloc_fpreg 1
+#define nloc_fpregpair 4
+#define nloc_fpregquad 8
+
+/* The return value is a structure and is actually stored in stack space
+ passed in a hidden argument by the caller. But, the compiler
+ helpfully returns the address of that space in $v0. */
+static const Dwarf_Op loc_aggregate[] =
+ {
+ { .atom = DW_OP_breg2, .number = 0 }
+ };
+#define nloc_aggregate 1
+
+int
+mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+{
+ /* First find the ABI used by the elf object */
+ enum mips_abi abi = find_mips_abi(functypedie->cu->dbg->elf);
+
+ /* Something went seriously wrong while trying to figure out the ABI */
+ if (abi == MIPS_ABI_LAST)
+ return -1;
+
+ /* We couldn't identify the ABI, but the file seems valid */
+ if (abi == MIPS_ABI_UNKNOWN)
+ return -2;
+
+ /* Can't handle EABI variants */
+ if ((abi == MIPS_ABI_EABI32) || (abi == MIPS_ABI_EABI64))
+ return -2;
+
+ unsigned int regsize = mips_abi_regsize (abi);
+ if (!regsize)
+ return -2;
+
+ /* Start with the function's type, and get the DW_AT_type attribute,
+ which is the type of the return value. */
+
+ Dwarf_Attribute attr_mem;
+ Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type, &attr_mem);
+ if (attr == NULL)
+ /* The function has no return value, like a `void' function in C. */
+ return 0;
+
+ Dwarf_Die die_mem;
+ Dwarf_Die *typedie = dwarf_formref_die (attr, &die_mem);
+ int tag = dwarf_tag (typedie);
+
+ /* Follow typedefs and qualifiers to get to the actual type. */
+ while (tag == DW_TAG_typedef
+ || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type
+ || tag == DW_TAG_restrict_type || tag == DW_TAG_mutable_type)
+ {
+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = dwarf_tag (typedie);
+ }
+
+ switch (tag)
+ {
+ case -1:
+ return -1;
+
+ case DW_TAG_subrange_type:
+ if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size))
+ {
+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = dwarf_tag (typedie);
+ }
+ /* Fall through. */
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+ case DW_TAG_pointer_type:
+ case DW_TAG_ptr_to_member_type:
+ {
+ Dwarf_Word size;
+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
+ &attr_mem), &size) != 0)
+ {
+ if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
+ size = regsize;
+ else
+ return -1;
+ }
+ if (tag == DW_TAG_base_type)
+ {
+ Dwarf_Word encoding;
+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
+ &attr_mem), &encoding) != 0)
+ return -1;
+
+#define ABI_LOC(loc, regsize) ((regsize) == 4 ? (loc ## _o32) : (loc))
+
+ if (encoding == DW_ATE_float)
+ {
+ *locp = ABI_LOC(loc_fpreg, regsize);
+ if (size <= regsize)
+ return nloc_fpreg;
+
+ if (size <= 2*regsize)
+ return nloc_fpregpair;
+
+ if (size <= 4*regsize && abi == MIPS_ABI_O32)
+ return nloc_fpregquad;
+
+ goto aggregate;
+ }
+ }
+ *locp = ABI_LOC(loc_intreg, regsize);
+ if (size <= regsize)
+ return nloc_intreg;
+ if (size <= 2*regsize)
+ return nloc_intregpair;
+
+ /* Else fall through. Shouldn't happen though (at least with gcc) */
+ }
+
+ case DW_TAG_structure_type:
+ case DW_TAG_class_type:
+ case DW_TAG_union_type:
+ case DW_TAG_array_type:
+ aggregate:
+ /* XXX TODO: Can't handle structure return with other ABI's yet :-/ */
+ if ((abi != MIPS_ABI_O32) && (abi != MIPS_ABI_O64))
+ return -2;
+
+ *locp = loc_aggregate;
+ return nloc_aggregate;
+ }
+
+ /* XXX We don't have a good way to return specific errors from ebl calls.
+ This value means we do not understand the type, but it is well-formed
+ DWARF and might be valid. */
+ return -2;
+}
Index: elfutils-0.145/backends/mips_symbol.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ elfutils-0.145/backends/mips_symbol.c 2010-02-24 18:57:35.000000000 +0000
@@ -0,0 +1,52 @@
+/* MIPS specific symbolic name handling.
+ Copyright (C) 2002, 2003, 2005 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+ Written by Jakub Jelinek <jakub@redhat.com>, 2002.
+
+ Red Hat elfutils is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by the
+ Free Software Foundation; version 2 of the License.
+
+ Red Hat elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with Red Hat elfutils; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+ Red Hat elfutils is an included package of the Open Invention Network.
+ An included package of the Open Invention Network is a package for which
+ Open Invention Network licensees cross-license their patents. No patent
+ license is granted, either expressly or impliedly, by designation as an
+ included package. Should you wish to participate in the Open Invention
+ Network licensing program, please visit www.openinventionnetwork.com
+ <http://www.openinventionnetwork.com>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <elf.h>
+#include <stddef.h>
+
+#define BACKEND mips_
+#include "libebl_CPU.h"
+
+/* Check for the simple reloc types. */
+Elf_Type
+mips_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
+{
+ switch (type)
+ {
+ case R_MIPS_16:
+ return ELF_T_HALF;
+ case R_MIPS_32:
+ return ELF_T_WORD;
+ case R_MIPS_64:
+ return ELF_T_XWORD;
+ default:
+ return ELF_T_NUM;
+ }
+}
Index: elfutils-0.145/libebl/eblopenbackend.c
===================================================================
--- elfutils-0.145.orig/libebl/eblopenbackend.c 2010-02-24 18:55:51.000000000 +0000
+++ elfutils-0.145/libebl/eblopenbackend.c 2010-02-24 18:57:35.000000000 +0000
@@ -91,6 +91,8 @@
{ "sparc", "elf_sparc", "sparc", 5, EM_SPARC, 0, 0 },
{ "sparc", "elf_sparcv8plus", "sparc", 5, EM_SPARC32PLUS, 0, 0 },
{ "s390", "ebl_s390", "s390", 4, EM_S390, 0, 0 },
+ { "mips", "elf_mips", "mips", 4, EM_MIPS, 0, 0 },
+ { "mips", "elf_mipsel", "mipsel", 4, EM_MIPS_RS3_LE, 0, 0 },
{ "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 },
{ "m68k", "elf_m68k", "m68k", 4, EM_68K, 0, 0 },
Index: elfutils-0.145/backends/common-reloc.c
===================================================================
--- elfutils-0.145.orig/backends/common-reloc.c 2010-02-24 18:55:51.000000000 +0000
+++ elfutils-0.145/backends/common-reloc.c 2010-02-24 18:57:35.000000000 +0000
@@ -109,11 +109,13 @@
}
+#ifndef NO_COPY_RELOC
bool
EBLHOOK(copy_reloc_p) (int reloc)
{
return reloc == R_TYPE (COPY);
}
+#endif
bool
EBLHOOK(none_reloc_p) (int reloc)
@@ -135,7 +137,9 @@
ebl->reloc_type_name = EBLHOOK(reloc_type_name);
ebl->reloc_type_check = EBLHOOK(reloc_type_check);
ebl->reloc_valid_use = EBLHOOK(reloc_valid_use);
+#ifndef NO_COPY_RELOC
ebl->copy_reloc_p = EBLHOOK(copy_reloc_p);
+#endif
ebl->none_reloc_p = EBLHOOK(none_reloc_p);
#ifndef NO_RELATIVE_RELOC
ebl->relative_reloc_p = EBLHOOK(relative_reloc_p);
Index: elfutils-0.145/backends/Makefile.am
===================================================================
--- elfutils-0.145.orig/backends/Makefile.am 2010-02-24 18:57:26.000000000 +0000
+++ elfutils-0.145/backends/Makefile.am 2010-02-24 18:57:57.000000000 +0000
@@ -29,11 +29,11 @@
-I$(top_srcdir)/libelf -I$(top_srcdir)/libdw
-modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 parisc
+modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 parisc mips
libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
libebl_sparc_pic.a libebl_ppc_pic.a libebl_ppc64_pic.a \
- libebl_s390_pic.a libebl_parisc_pic.a
+ libebl_s390_pic.a libebl_parisc_pic.a libebl_mips_pic.a
noinst_LIBRARIES = $(libebl_pic)
noinst_DATA = $(libebl_pic:_pic.a=.so)
@@ -99,6 +99,10 @@
libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
+mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c
+libebl_mips_pic_a_SOURCES = $(mips_SRCS)
+am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
+
libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
@rm -f $(@:.so=.map)
echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \

View File

@ -1,27 +0,0 @@
Upstream-Status: Backport
nm: Fix size passed to snprintf for invalid sh_name case.
native build failed as following on Fedora18:
nm.c: In function 'show_symbols_sysv':
nm.c:756:27: error: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess]
snprintf (name, sizeof name, "[invalid sh_name %#" PRIx32 "]",
^
The original commit is http://git.fedorahosted.org/cgit/elfutils.git/commit/src/nm.c?id=57bd66cabf6e6b9ecf622cdbf350804897a8df58
Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
--- elfutils-0.148/src/nm.c.org 2013-03-11 22:36:11.000000000 -0500
+++ elfutils-0.148/src/nm.c 2013-03-11 22:46:09.000000000 -0500
@@ -752,8 +752,9 @@
gelf_getshdr (scn, &shdr_mem)->sh_name);
if (unlikely (name == NULL))
{
- name = alloca (sizeof "[invalid sh_name 0x12345678]");
- snprintf (name, sizeof name, "[invalid sh_name %#" PRIx32 "]",
+ const size_t bufsz = sizeof "[invalid sh_name 0x12345678]";
+ name = alloca (bufsz);
+ snprintf (name, bufsz, "[invalid sh_name %#" PRIx32 "]",
gelf_getshdr (scn, &shdr_mem)->sh_name);
}
scnnames[elf_ndxscn (scn)] = name;

View File

@ -1,756 +0,0 @@
Upstream-Status: Backport
Index: elfutils-0.148/backends/ChangeLog
===================================================================
--- elfutils-0.148.orig/backends/ChangeLog 2010-04-13 20:08:02.000000000 +0000
+++ elfutils-0.148/backends/ChangeLog 2010-07-03 13:04:07.000000000 +0000
@@ -106,6 +106,10 @@
* ppc_attrs.c (ppc_check_object_attribute): Handle tag
GNU_Power_ABI_Struct_Return.
+2009-01-23 Roland McGrath <roland@redhat.com>
+
+ * Makefile.am (libebl_%.so): Use $(LD_AS_NEEDED).
+
2008-10-04 Ulrich Drepper <drepper@redhat.com>
* i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and
@@ -433,6 +437,11 @@
* sparc_init.c: Likewise.
* x86_64_init.c: Likewise.
+2005-11-22 Roland McGrath <roland@redhat.com>
+
+ * Makefile.am (LD_AS_NEEDED): New variable, substituted by configure.
+ (libebl_%.so rule): Use it in place of -Wl,--as-needed.
+
2005-11-19 Roland McGrath <roland@redhat.com>
* ppc64_reloc.def: REL30 -> ADDR30.
@@ -455,6 +464,9 @@
* Makefile.am (uninstall): Don't try to remove $(pkgincludedir).
(CLEANFILES): Add libebl_$(m).so.
+ * Makefile.am (WEXTRA): New variable, substituted by configure.
+ (AM_CFLAGS): Use it in place of -Wextra.
+
* ppc_reloc.def: Update bits per Alan Modra <amodra@bigpond.net.au>.
* ppc64_reloc.def: Likewise.
Index: elfutils-0.148/backends/Makefile.am
===================================================================
--- elfutils-0.148.orig/backends/Makefile.am 2010-04-13 20:08:02.000000000 +0000
+++ elfutils-0.148/backends/Makefile.am 2010-07-03 13:04:07.000000000 +0000
@@ -103,7 +103,7 @@
$(LINK) -shared -o $(@:.map=.so) \
-Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
-Wl,--version-script,$(@:.so=.map) \
- -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap)
+ -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap)
$(textrel_check)
libebl_i386.so: $(cpu_i386)
Index: elfutils-0.148/ChangeLog
===================================================================
--- elfutils-0.148.orig/ChangeLog 2010-04-21 14:26:40.000000000 +0000
+++ elfutils-0.148/ChangeLog 2010-07-03 13:04:07.000000000 +0000
@@ -2,6 +2,10 @@
* configure.ac (LOCALEDIR, DATADIRNAME): Removed.
+2009-11-22 Roland McGrath <roland@redhat.com>
+
+ * configure.ac: Use sed and expr instead of modern bash extensions.
+
2009-09-21 Ulrich Drepper <drepper@redhat.com>
* configure.ac: Update for more modern autoconf.
@@ -10,6 +14,10 @@
* configure.ac (zip_LIBS): Check for liblzma too.
+2009-08-17 Roland McGrath <roland@redhat.com>
+
+ * configure.ac: Check for -fgnu89-inline; add it to WEXTRA if it works.
+
2009-04-19 Roland McGrath <roland@redhat.com>
* configure.ac (eu_version): Round down here, not in version.h macros.
@@ -21,6 +29,8 @@
2009-01-23 Roland McGrath <roland@redhat.com>
+ * configure.ac: Check for __builtin_popcount.
+
* configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3.
* configure.ac (__thread check): Use AC_LINK_IFELSE, in case of
@@ -101,6 +111,10 @@
* configure.ac: Add dummy automake conditional to get dependencies
for non-generic linker right. See src/Makefile.am.
+2005-11-22 Roland McGrath <roland@redhat.com>
+
+ * configure.ac: Check for --as-needed linker option.
+
2005-11-18 Roland McGrath <roland@redhat.com>
* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable.
@@ -148,6 +162,17 @@
* Makefile.am (all_SUBDIRS): Add libdwfl.
* configure.ac: Write libdwfl/Makefile.
+2005-05-31 Roland McGrath <roland@redhat.com>
+
+ * configure.ac (WEXTRA): Check for -Wextra and set this substitution.
+
+ * configure.ac: Check for struct stat st_?tim members.
+ * src/strip.c (process_file): Use st_?time if st_?tim are not there.
+
+ * configure.ac: Check for futimes function.
+ * src/strip.c (handle_elf) [! HAVE_FUTIMES]: Use utimes instead.
+ (handle_ar) [! HAVE_FUTIMES]: Likewise.
+
2005-05-19 Roland McGrath <roland@redhat.com>
* configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros.
Index: elfutils-0.148/config/eu.am
===================================================================
--- elfutils-0.148.orig/config/eu.am 2010-04-21 14:26:40.000000000 +0000
+++ elfutils-0.148/config/eu.am 2010-07-03 13:04:07.000000000 +0000
@@ -25,11 +25,14 @@
## <http://www.openinventionnetwork.com>.
##
+WEXTRA = @WEXTRA@
+LD_AS_NEEDED = @LD_AS_NEEDED@
+
DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"'
INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
AM_CFLAGS = -std=gnu99 -Wall -Wshadow \
$(if $($(*F)_no_Werror),,-Werror) \
- $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
+ $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \
$(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \
$($(*F)_CFLAGS)
Index: elfutils-0.148/config.h.in
===================================================================
--- elfutils-0.148.orig/config.h.in 2010-06-28 19:07:37.000000000 +0000
+++ elfutils-0.148/config.h.in 2010-07-03 13:04:07.000000000 +0000
@@ -1,5 +1,8 @@
/* config.h.in. Generated from configure.ac by autoheader. */
+/* Have __builtin_popcount. */
+#undef HAVE_BUILTIN_POPCOUNT
+
/* $libdir subdirectory containing libebl modules. */
#undef LIBEBL_SUBDIR
@@ -55,4 +58,7 @@
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES
+/* Stubbed out if missing compiler support. */
+#undef __thread
+
#include <eu-config.h>
Index: elfutils-0.148/configure.ac
===================================================================
--- elfutils-0.148.orig/configure.ac 2010-06-28 19:07:26.000000000 +0000
+++ elfutils-0.148/configure.ac 2010-07-03 13:04:07.000000000 +0000
@@ -73,6 +73,54 @@
AS_IF([test "x$ac_cv_c99" != xyes],
AC_MSG_ERROR([gcc with C99 support required]))
+AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra, [dnl
+old_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wextra"
+AC_COMPILE_IFELSE([void foo (void) { }],
+ ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no)
+CFLAGS="$old_CFLAGS"])
+AC_SUBST(WEXTRA)
+AS_IF([test "x$ac_cv_cc_wextra" = xyes], [WEXTRA=-Wextra], [WEXTRA=-W])
+
+AC_CACHE_CHECK([for -fgnu89-inline option to $CC], ac_cv_cc_gnu89_inline, [dnl
+old_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -fgnu89-inline -Werror"
+AC_COMPILE_IFELSE([
+void foo (void)
+{
+ inline void bar (void) {}
+ bar ();
+}
+extern inline void baz (void) {}
+], ac_cv_cc_gnu89_inline=yes, ac_cv_cc_gnu89_inline=no)
+CFLAGS="$old_CFLAGS"])
+AS_IF([test "x$ac_cv_cc_gnu89_inline" = xyes],
+ [WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"])
+
+AC_CACHE_CHECK([for --as-needed linker option],
+ ac_cv_as_needed, [dnl
+cat > conftest.c <<EOF
+int main (void) { return 0; }
+EOF
+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
+ -fPIC -shared -o conftest.so conftest.c
+ -Wl,--as-needed 1>&AS_MESSAGE_LOG_FD])
+then
+ ac_cv_as_needed=yes
+else
+ ac_cv_as_needed=no
+fi
+rm -f conftest*])
+AS_IF([test "x$ac_cv_as_needed" = xyes],
+ [LD_AS_NEEDED=-Wl,--as-needed], [LD_AS_NEEDED=])
+AC_SUBST(LD_AS_NEEDED)
+
+AC_CACHE_CHECK([for __builtin_popcount], ac_cv_popcount, [dnl
+AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[exit (__builtin_popcount (127));]])],
+ ac_cv_popcount=yes, ac_cv_popcount=no)])
+AS_IF([test "x$ac_cv_popcount" = xyes],
+ [AC_DEFINE([HAVE_BUILTIN_POPCOUNT], [1], [Have __builtin_popcount.])])
+
AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl
# Use the same flags that we use for our DSOs, so the test is representative.
# Some old compiler/linker/libc combinations fail some ways and not others.
@@ -88,7 +136,10 @@
CFLAGS="$save_CFLAGS"
LDFLAGS="$save_LDFLAGS"])
AS_IF([test "x$ac_cv_tls" != xyes],
- AC_MSG_ERROR([__thread support required]))
+ [AS_IF([test "$use_locks" = yes],
+ [AC_MSG_ERROR([--enable-thread-safety requires __thread support])],
+ [AC_DEFINE([__thread], [/* empty: no multi-thread support */],
+ [Stubbed out if missing compiler support.])])])
dnl This test must come as early as possible after the compiler configuration
dnl tests, because the choice of the file model can (in principle) affect
@@ -251,7 +302,7 @@
# 1.234<whatever> -> 1234<whatever>
case "$PACKAGE_VERSION" in
-[[0-9]].*) eu_version="${PACKAGE_VERSION/./}" ;;
+[[0-9]].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;;
*) AC_MSG_ERROR([confused by version number '$PACKAGE_VERSION']) ;;
esac
case "$eu_version" in
@@ -280,6 +331,6 @@
esac
# Round up to the next release API (x.y) version.
-[eu_version=$[($eu_version + 999) / 1000]]
+eu_version=`expr \( $eu_version + 999 \) / 1000`
AC_OUTPUT
Index: elfutils-0.148/lib/ChangeLog
===================================================================
--- elfutils-0.148.orig/lib/ChangeLog 2010-06-28 19:05:56.000000000 +0000
+++ elfutils-0.148/lib/ChangeLog 2010-07-03 13:04:07.000000000 +0000
@@ -14,6 +14,9 @@
2009-01-23 Roland McGrath <roland@redhat.com>
+ * eu-config.h [! HAVE_BUILTIN_POPCOUNT]
+ (__builtin_popcount): New inline function.
+
* eu-config.h: Add multiple inclusion protection.
2009-01-17 Ulrich Drepper <drepper@redhat.com>
@@ -70,6 +73,11 @@
* Makefile.am (libeu_a_SOURCES): Add it.
* system.h: Declare crc32_file.
+2005-02-07 Roland McGrath <roland@redhat.com>
+
+ * Makefile.am (WEXTRA): New variable, substituted by configure.
+ (AM_CFLAGS): Use it in place of -Wextra.
+
2005-04-30 Ulrich Drepper <drepper@redhat.com>
* Makefile.am: Use -ffunction-sections for xmalloc.c.
Index: elfutils-0.148/lib/eu-config.h
===================================================================
--- elfutils-0.148.orig/lib/eu-config.h 2009-08-12 14:23:22.000000000 +0000
+++ elfutils-0.148/lib/eu-config.h 2010-07-03 13:04:07.000000000 +0000
@@ -182,6 +182,17 @@
/* This macro is used by the tests conditionalize for standalone building. */
#define ELFUTILS_HEADER(name) <lib##name.h>
+#ifndef HAVE_BUILTIN_POPCOUNT
+# define __builtin_popcount hakmem_popcount
+static inline unsigned int __attribute__ ((unused))
+hakmem_popcount (unsigned int x)
+{
+ /* HAKMEM 169 */
+ unsigned int n = x - ((x >> 1) & 033333333333) - ((x >> 2) & 011111111111);
+ return ((n + (n >> 3)) & 030707070707) % 63;
+}
+#endif /* HAVE_BUILTIN_POPCOUNT */
+
#ifdef SHARED
# define OLD_VERSION(name, version) \
Index: elfutils-0.148/libasm/ChangeLog
===================================================================
--- elfutils-0.148.orig/libasm/ChangeLog 2010-03-05 05:48:23.000000000 +0000
+++ elfutils-0.148/libasm/ChangeLog 2010-07-03 13:04:07.000000000 +0000
@@ -67,6 +67,11 @@
* asm_error.c: Add new error ASM_E_IOERROR.
* libasmP.h: Add ASM_E_IOERROR definition.
+2005-05-31 Roland McGrath <roland@redhat.com>
+
+ * Makefile.am (WEXTRA): New variable, substituted by configure.
+ (AM_CFLAGS): Use it in place of -Wextra.
+
2005-02-15 Ulrich Drepper <drepper@redhat.com>
* Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
Index: elfutils-0.148/libcpu/ChangeLog
===================================================================
--- elfutils-0.148.orig/libcpu/ChangeLog 2010-03-05 05:48:23.000000000 +0000
+++ elfutils-0.148/libcpu/ChangeLog 2010-07-03 13:04:07.000000000 +0000
@@ -9,6 +9,9 @@
2009-01-23 Roland McGrath <roland@redhat.com>
+ * i386_disasm.c (i386_disasm): Add abort after assert-constant for old
+ compilers that don't realize it's noreturn.
+
* Makefile.am (i386_parse_CFLAGS): Use quotes around command
substitution that can produce leading whitespace.
@@ -338,6 +341,11 @@
* defs/i386.doc: New file.
* defs/x86_64: New file.
+2005-04-04 Roland McGrath <roland@redhat.com>
+
+ * Makefile.am (WEXTRA): New variable, substituted by configure.
+ (AM_CFLAGS): Use it instead of -Wextra.
+
2005-02-15 Ulrich Drepper <drepper@redhat.com>
* Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
Index: elfutils-0.148/libcpu/i386_disasm.c
===================================================================
--- elfutils-0.148.orig/libcpu/i386_disasm.c 2009-01-08 20:56:36.000000000 +0000
+++ elfutils-0.148/libcpu/i386_disasm.c 2010-07-03 13:04:07.000000000 +0000
@@ -791,6 +791,7 @@
default:
assert (! "INVALID not handled");
+ abort ();
}
}
else
Index: elfutils-0.148/libdw/ChangeLog
===================================================================
--- elfutils-0.148.orig/libdw/ChangeLog 2010-06-28 19:05:56.000000000 +0000
+++ elfutils-0.148/libdw/ChangeLog 2010-07-03 13:04:07.000000000 +0000
@@ -276,6 +276,10 @@
* dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
+2009-08-17 Roland McGrath <roland@redhat.com>
+
+ * libdw.h: Disable extern inlines for GCC 4.2.
+
2009-08-10 Roland McGrath <roland@redhat.com>
* dwarf_getscopevar.c: Use dwarf_diename.
@@ -1044,6 +1048,11 @@
2005-05-31 Roland McGrath <roland@redhat.com>
+ * Makefile.am (WEXTRA): New variable, substituted by configure.
+ (AM_CFLAGS): Use it in place of -Wextra.
+
+2005-05-31 Roland McGrath <roland@redhat.com>
+
* dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
formref offset.
Index: elfutils-0.148/libdw/libdw.h
===================================================================
--- elfutils-0.148.orig/libdw/libdw.h 2010-06-28 19:05:56.000000000 +0000
+++ elfutils-0.148/libdw/libdw.h 2010-07-03 13:04:07.000000000 +0000
@@ -842,7 +842,7 @@
/* Inline optimizations. */
-#ifdef __OPTIMIZE__
+#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
/* Return attribute code of given attribute. */
__libdw_extern_inline unsigned int
dwarf_whatattr (Dwarf_Attribute *attr)
Index: elfutils-0.148/libdwfl/ChangeLog
===================================================================
--- elfutils-0.148.orig/libdwfl/ChangeLog 2010-06-28 19:05:56.000000000 +0000
+++ elfutils-0.148/libdwfl/ChangeLog 2010-07-03 13:04:07.000000000 +0000
@@ -1265,6 +1265,11 @@
2005-07-21 Roland McGrath <roland@redhat.com>
+ * Makefile.am (WEXTRA): New variable, substituted by configure.
+ (AM_CFLAGS): Use it in place of -Wextra.
+
+2005-07-21 Roland McGrath <roland@redhat.com>
+
* Makefile.am (noinst_HEADERS): Add loc2c.c.
* test2.c (main): Check sscanf result to quiet warning.
Index: elfutils-0.148/libebl/ChangeLog
===================================================================
--- elfutils-0.148.orig/libebl/ChangeLog 2010-03-05 05:48:23.000000000 +0000
+++ elfutils-0.148/libebl/ChangeLog 2010-07-03 13:04:07.000000000 +0000
@@ -624,6 +624,11 @@
* Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency
tracking works right.
+2005-05-31 Roland McGrath <roland@redhat.com>
+
+ * Makefile.am (WEXTRA): New variable, substituted by configure.
+ (AM_CFLAGS): Use it in place of -Wextra.
+
2005-05-21 Ulrich Drepper <drepper@redhat.com>
* libebl_x86_64.map: Add x86_64_core_note.
Index: elfutils-0.148/libelf/ChangeLog
===================================================================
--- elfutils-0.148.orig/libelf/ChangeLog 2010-06-14 21:17:20.000000000 +0000
+++ elfutils-0.148/libelf/ChangeLog 2010-07-03 13:04:07.000000000 +0000
@@ -657,6 +657,11 @@
* elf.h: Update from glibc.
+2005-05-31 Roland McGrath <roland@redhat.com>
+
+ * Makefile.am (WEXTRA): New variable, substituted by configure.
+ (AM_CFLAGS): Use it in place of -Wextra.
+
2005-05-08 Roland McGrath <roland@redhat.com>
* elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
Index: elfutils-0.148/libelf/common.h
===================================================================
--- elfutils-0.148.orig/libelf/common.h 2009-01-08 20:56:36.000000000 +0000
+++ elfutils-0.148/libelf/common.h 2010-07-03 13:04:07.000000000 +0000
@@ -160,7 +160,7 @@
(Var) = (sizeof (Var) == 1 \
? (unsigned char) (Var) \
: (sizeof (Var) == 2 \
- ? bswap_16 (Var) \
+ ? (unsigned short int) bswap_16 (Var) \
: (sizeof (Var) == 4 \
? bswap_32 (Var) \
: bswap_64 (Var))))
@@ -169,7 +169,7 @@
(Dst) = (sizeof (Var) == 1 \
? (unsigned char) (Var) \
: (sizeof (Var) == 2 \
- ? bswap_16 (Var) \
+ ? (unsigned short int) bswap_16 (Var) \
: (sizeof (Var) == 4 \
? bswap_32 (Var) \
: bswap_64 (Var))))
Index: elfutils-0.148/src/addr2line.c
===================================================================
--- elfutils-0.148.orig/src/addr2line.c 2010-05-28 14:38:30.000000000 +0000
+++ elfutils-0.148/src/addr2line.c 2010-07-03 13:05:40.000000000 +0000
@@ -447,10 +447,10 @@
bool parsed = false;
int i, j;
char *name = NULL;
- if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
+ if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
&& string[i] == '\0')
parsed = adjust_to_section (name, &addr, dwfl);
- switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
+ switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
{
default:
break;
Index: elfutils-0.148/src/ChangeLog
===================================================================
--- elfutils-0.148.orig/src/ChangeLog 2010-06-28 19:05:56.000000000 +0000
+++ elfutils-0.148/src/ChangeLog 2010-07-03 13:04:08.000000000 +0000
@@ -165,8 +165,16 @@
* readelf.c (attr_callback): Use print_block only when we don't use
print_ops.
+2009-08-17 Roland McGrath <roland@redhat.com>
+
+ * ld.h: Disable extern inlines for GCC 4.2.
+
2009-08-14 Roland McGrath <roland@redhat.com>
+ * strings.c (read_block): Conditionalize posix_fadvise use
+ on [POSIX_FADV_SEQUENTIAL].
+ From Petr Salinger <Petr.Salinger@seznam.cz>.
+
* ar.c (do_oper_extract): Use pathconf instead of statfs.
2009-08-01 Ulrich Drepper <drepper@redhat.com>
@@ -330,6 +338,8 @@
* readelf.c (print_debug_frame_section): Use t instead of j formats
for ptrdiff_t OFFSET.
+ * addr2line.c (handle_address): Use %a instead of %m for compatibility.
+
2009-01-21 Ulrich Drepper <drepper@redhat.com>
* elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
@@ -513,6 +523,11 @@
that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
is valid in RELRO.
+2008-03-01 Roland McGrath <roland@redhat.com>
+
+ * readelf.c (dump_archive_index): Tweak portability hack
+ to match [__GNUC__ < 4] too.
+
2008-02-29 Roland McGrath <roland@redhat.com>
* readelf.c (print_attributes): Add a cast.
@@ -764,6 +779,8 @@
* readelf.c (hex_dump): Fix rounding error in whitespace calculation.
+ * Makefile.am (readelf_no_Werror): New variable.
+
2007-10-15 Roland McGrath <roland@redhat.com>
* make-debug-archive.in: New file.
@@ -1203,6 +1220,10 @@
* elflint.c (valid_e_machine): Add EM_ALPHA.
Reported by Christian Aichinger <Greek0@gmx.net>.
+ * strings.c (map_file): Define POSIX_MADV_SEQUENTIAL to
+ MADV_SEQUENTIAL if undefined. Don't call posix_madvise
+ if neither is defined.
+
2006-08-08 Ulrich Drepper <drepper@redhat.com>
* elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
@@ -1279,6 +1300,10 @@
* Makefile.am: Add hacks to create dependency files for non-generic
linker.
+2006-04-05 Roland McGrath <roland@redhat.com>
+
+ * strings.c (MAP_POPULATE): Define to 0 if undefined.
+
2006-06-12 Ulrich Drepper <drepper@redhat.com>
* ldgeneric.c (ld_generic_generate_sections): Don't create .interp
@@ -1627,6 +1652,11 @@
* readelf.c (print_debug_loc_section): Fix indentation for larger
address size.
+2005-05-31 Roland McGrath <roland@redhat.com>
+
+ * Makefile.am (WEXTRA): New variable, substituted by configure.
+ (AM_CFLAGS): Use it in place of -Wextra.
+
2005-05-30 Roland McGrath <roland@redhat.com>
* readelf.c (print_debug_line_section): Print section offset of each
Index: elfutils-0.148/src/findtextrel.c
===================================================================
--- elfutils-0.148.orig/src/findtextrel.c 2009-02-11 01:12:59.000000000 +0000
+++ elfutils-0.148/src/findtextrel.c 2010-07-03 13:04:08.000000000 +0000
@@ -490,7 +490,11 @@
static void
-check_rel (size_t nsegments, struct segments segments[nsegments],
+check_rel (size_t nsegments, struct segments segments[
+#if __GNUC__ >= 4
+ nsegments
+#endif
+ ],
GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw,
const char *fname, bool more_than_one, void **knownsrcs)
{
Index: elfutils-0.148/src/ld.h
===================================================================
--- elfutils-0.148.orig/src/ld.h 2009-06-13 22:39:51.000000000 +0000
+++ elfutils-0.148/src/ld.h 2010-07-03 13:04:08.000000000 +0000
@@ -1122,6 +1122,7 @@
/* Checked whether the symbol is undefined and referenced from a DSO. */
extern bool linked_from_dso_p (struct scninfo *scninfo, size_t symidx);
+#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
#ifdef __GNUC_STDC_INLINE__
__attribute__ ((__gnu_inline__))
#endif
@@ -1139,5 +1140,6 @@
return sym->defined && sym->in_dso;
}
+#endif /* Optimizing and not GCC 4.2. */
#endif /* ld.h */
Index: elfutils-0.148/src/Makefile.am
===================================================================
--- elfutils-0.148.orig/src/Makefile.am 2010-03-05 05:48:23.000000000 +0000
+++ elfutils-0.148/src/Makefile.am 2010-07-03 13:04:08.000000000 +0000
@@ -99,6 +99,9 @@
# XXX While the file is not finished, don't warn about this
ldgeneric_no_Wunused = yes
+# Buggy old compilers.
+readelf_no_Werror = yes
+
readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
size_LDADD = $(libelf) $(libeu) $(libmudflap)
Index: elfutils-0.148/src/readelf.c
===================================================================
--- elfutils-0.148.orig/src/readelf.c 2010-06-28 19:05:56.000000000 +0000
+++ elfutils-0.148/src/readelf.c 2010-07-03 13:04:08.000000000 +0000
@@ -7845,7 +7845,7 @@
if (unlikely (elf_rand (elf, as_off) == 0)
|| unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf))
== NULL))
-#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7)
+#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7) || __GNUC__ < 4
while (1)
#endif
error (EXIT_FAILURE, 0,
Index: elfutils-0.148/src/strings.c
===================================================================
--- elfutils-0.148.orig/src/strings.c 2009-02-11 01:12:59.000000000 +0000
+++ elfutils-0.148/src/strings.c 2010-07-03 13:04:08.000000000 +0000
@@ -51,6 +51,10 @@
#include <system.h>
+#ifndef MAP_POPULATE
+# define MAP_POPULATE 0
+#endif
+
/* Prototypes of local functions. */
static int read_fd (int fd, const char *fname, off64_t fdlen);
@@ -491,8 +495,13 @@
fd, start_off);
if (mem != MAP_FAILED)
{
+#if !defined POSIX_MADV_SEQUENTIAL && defined MADV_SEQUENTIAL
+# define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL
+#endif
+#ifdef POSIX_MADV_SEQUENTIAL
/* We will go through the mapping sequentially. */
(void) posix_madvise (mem, map_size, POSIX_MADV_SEQUENTIAL);
+#endif
break;
}
if (errno != EINVAL && errno != ENOMEM)
@@ -586,9 +595,11 @@
elfmap_off = from & ~(ps - 1);
elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size);
+#ifdef POSIX_FADV_SEQUENTIAL
if (unlikely (elfmap == MAP_FAILED))
/* Let the kernel know we are going to read everything in sequence. */
(void) posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL);
+#endif
}
if (unlikely (elfmap == MAP_FAILED))
Index: elfutils-0.148/src/strip.c
===================================================================
--- elfutils-0.148.orig/src/strip.c 2010-01-15 09:05:55.000000000 +0000
+++ elfutils-0.148/src/strip.c 2010-07-03 13:04:08.000000000 +0000
@@ -53,6 +53,12 @@
#include <libebl.h>
#include <system.h>
+#ifdef HAVE_FUTIMES
+# define FUTIMES(fd, fname, tvp) futimes (fd, tvp)
+#else
+# define FUTIMES(fd, fname, tvp) utimes (fname, tvp)
+#endif
+
/* Name and version of program. */
static void print_version (FILE *stream, struct argp_state *state);
@@ -301,8 +307,18 @@
/* If we have to preserve the timestamp, we need it in the
format utimes() understands. */
+#ifdef HAVE_STRUCT_STAT_ST_ATIM
TIMESPEC_TO_TIMEVAL (&tv[0], &pre_st.st_atim);
+#else
+ tv[0].tv_sec = pre_st.st_atime;
+ tv[0].tv_usec = 0;
+#endif
+#ifdef HAVE_STRUCT_STAT_ST_MTIM
TIMESPEC_TO_TIMEVAL (&tv[1], &pre_st.st_mtim);
+#else
+ tv[1].tv_sec = pre_st.st_atime;
+ tv[1].tv_usec = 0;
+#endif
}
/* Open the file. */
@@ -1747,7 +1763,7 @@
/* If requested, preserve the timestamp. */
if (tvp != NULL)
{
- if (futimes (fd, tvp) != 0)
+ if (FUTIMES (fd, output_fname, tvp) != 0)
{
error (0, errno, gettext ("\
cannot set access and modification date of '%s'"),
@@ -1804,7 +1820,7 @@
if (tvp != NULL)
{
- if (unlikely (futimes (fd, tvp) != 0))
+ if (unlikely (FUTIMES (fd, fname, tvp) != 0))
{
error (0, errno, gettext ("\
cannot set access and modification date of '%s'"), fname);
Index: elfutils-0.148/tests/ChangeLog
===================================================================
--- elfutils-0.148.orig/tests/ChangeLog 2010-06-28 19:05:56.000000000 +0000
+++ elfutils-0.148/tests/ChangeLog 2010-07-03 13:04:08.000000000 +0000
@@ -154,6 +154,8 @@
2008-01-21 Roland McGrath <roland@redhat.com>
+ * line2addr.c (main): Revert last change.
+
* testfile45.S.bz2: Add tests for cltq, cqto.
* testfile45.expect.bz2: Adjust.
@@ -862,6 +864,11 @@
* Makefile.am (TESTS): Add run-elflint-test.sh.
(EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2.
+2005-05-31 Roland McGrath <roland@redhat.com>
+
+ * Makefile.am (WEXTRA): New variable, substituted by configure.
+ (AM_CFLAGS): Use it in place of -Wextra.
+
2005-05-24 Ulrich Drepper <drepper@redhat.com>
* get-files.c (main): Use correct format specifier.
Index: elfutils-0.148/tests/line2addr.c
===================================================================
--- elfutils-0.148.orig/tests/line2addr.c 2009-01-08 20:56:37.000000000 +0000
+++ elfutils-0.148/tests/line2addr.c 2010-07-03 13:04:08.000000000 +0000
@@ -132,7 +132,7 @@
{
struct args a = { .arg = argv[cnt] };
- switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line))
+ switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line))
{
default:
case 0:

View File

@ -1,154 +0,0 @@
Upstream-Status: Backport
Remove unused variables from the code to prevent -Werror causing a build
failure on hosts with GCC 4.6.
These changes are all upstream so should not be required once we've updated
to elfutils 0.152 or later. Therefore this patch consolidates several
changes from elfutils upstream by Roland McGrath into a single file so that
it's easier to remove later once we upgrade.
Links to upstream gitweb of the consolidated commits follow:
- http://git.fedorahosted.org/git?p=elfutils.git;a=commit;h=7094d00a169afb27e0323f8580e817798ae7c240
- http://git.fedorahosted.org/git?p=elfutils.git;a=commit;h=fd992543185126eb0280c1ee0883e073020499b4
- http://git.fedorahosted.org/git?p=elfutils.git;a=commit;h=4db89f04bb59327abd7a3b60e88f2e7e73c65c79
- http://git.fedorahosted.org/git?p=elfutils.git;a=commit;h=8f6c1795ab9d41f03805eebd55767070ade55aac
- http://git.fedorahosted.org/git?p=elfutils.git;a=commit;h=240784b48aa276822c5a61c9ad6a4355051ce259
Joshua Lock <josh@linux.intel.com> - 06/04/11
Index: elfutils-0.148/libasm/asm_newscn.c
===================================================================
--- elfutils-0.148.orig/libasm/asm_newscn.c
+++ elfutils-0.148/libasm/asm_newscn.c
@@ -162,7 +162,6 @@ asm_newscn (ctx, scnname, type, flags)
GElf_Xword flags;
{
size_t scnname_len = strlen (scnname) + 1;
- unsigned long int hval;
AsmScn_t *result;
/* If no context is given there might be an earlier error. */
@@ -180,8 +179,6 @@ asm_newscn (ctx, scnname, type, flags)
return NULL;
}
- hval = elf_hash (scnname);
-
rwlock_wrlock (ctx->lock);
/* This is a new section. */
Index: elfutils-0.148/src/elflint.c
===================================================================
--- elfutils-0.148.orig/src/elflint.c
+++ elfutils-0.148/src/elflint.c
@@ -707,9 +707,10 @@ section [%2d] '%s': symbol %zu: invalid
{
if (xndxdata == NULL)
{
- ERROR (gettext ("\
+ if (!no_xndx_warned)
+ ERROR (gettext ("\
section [%2d] '%s': symbol %zu: too large section index but no extended section index section\n"),
- idx, section_name (ebl, idx), cnt);
+ idx, section_name (ebl, idx), cnt);
no_xndx_warned = true;
}
else if (xndx < SHN_LORESERVE)
@@ -1592,10 +1593,6 @@ check_dynamic (Ebl *ebl, GElf_Ehdr *ehdr
[DT_STRSZ] = true,
[DT_SYMENT] = true
};
- GElf_Addr reladdr = 0;
- GElf_Word relsz = 0;
- GElf_Addr pltreladdr = 0;
- GElf_Word pltrelsz = 0;
memset (has_dt, '\0', sizeof (has_dt));
memset (has_val_dt, '\0', sizeof (has_val_dt));
@@ -1694,15 +1691,6 @@ section [%2d] '%s': entry %zu: level 2 t
section [%2d] '%s': entry %zu: DT_PLTREL value must be DT_REL or DT_RELA\n"),
idx, section_name (ebl, idx), cnt);
- if (dyn->d_tag == DT_REL)
- reladdr = dyn->d_un.d_ptr;
- if (dyn->d_tag == DT_RELSZ)
- relsz = dyn->d_un.d_val;
- if (dyn->d_tag == DT_JMPREL)
- pltreladdr = dyn->d_un.d_ptr;
- if (dyn->d_tag == DT_PLTRELSZ)
- pltrelsz = dyn->d_un.d_val;
-
/* Check that addresses for entries are in loaded segments. */
switch (dyn->d_tag)
{
Index: elfutils-0.148/src/ldgeneric.c
===================================================================
--- elfutils-0.148.orig/src/ldgeneric.c
+++ elfutils-0.148/src/ldgeneric.c
@@ -285,12 +285,10 @@ static int
check_for_duplicate2 (struct usedfiles *newp, struct usedfiles *list)
{
struct usedfiles *first;
- struct usedfiles *prevp;
if (list == NULL)
return 0;
- prevp = list;
list = first = list->next;
do
{
Index: elfutils-0.148/src/ldscript.y
===================================================================
--- elfutils-0.148.orig/src/ldscript.y
+++ elfutils-0.148/src/ldscript.y
@@ -802,12 +802,9 @@ add_versions (struct version *versions)
do
{
- struct version *oldp;
-
add_id_list (versions->versionname, versions->local_names, true);
add_id_list (versions->versionname, versions->global_names, false);
- oldp = versions;
versions = versions->next;
}
while (versions != NULL);
Index: elfutils-0.148/src/unstrip.c
===================================================================
--- elfutils-0.148.orig/src/unstrip.c
+++ elfutils-0.148/src/unstrip.c
@@ -1301,7 +1301,6 @@ more sections in stripped file than debu
/* Match each debuginfo section with its corresponding stripped section. */
bool check_prelink = false;
Elf_Scn *unstripped_symtab = NULL;
- size_t unstripped_strtab_ndx = SHN_UNDEF;
size_t alloc_avail = 0;
scn = NULL;
while ((scn = elf_nextscn (unstripped, scn)) != NULL)
@@ -1313,7 +1312,6 @@ more sections in stripped file than debu
if (shdr->sh_type == SHT_SYMTAB)
{
unstripped_symtab = scn;
- unstripped_strtab_ndx = shdr->sh_link;
continue;
}
Index: elfutils-0.148/src/ldscript.c
===================================================================
--- elfutils-0.148.orig/src/ldscript.c
+++ elfutils-0.148/src/ldscript.c
@@ -2728,12 +2728,9 @@ add_versions (struct version *versions)
do
{
- struct version *oldp;
-
add_id_list (versions->versionname, versions->local_names, true);
add_id_list (versions->versionname, versions->global_names, false);
- oldp = versions;
versions = versions->next;
}
while (versions != NULL);

View File

@ -1,21 +0,0 @@
Upstream-Status: Backport
On many architectures this test fails because binaries/libs produced by
binutils don't pass elflint. However elfutils shouldn't FTBFS because of this.
So we run the tests on all archs to see what breaks, but if it breaks we ignore
the result (exitcode 77 means: this test was skipped).
Index: elfutils-0.128/tests/run-elflint-self.sh
===================================================================
--- elfutils-0.128.orig/tests/run-elflint-self.sh 2007-07-08 21:46:16.000000000 +0000
+++ elfutils-0.128/tests/run-elflint-self.sh 2007-07-08 21:46:49.000000000 +0000
@@ -32,7 +32,7 @@
# echo $1
if [ -f $1 ]; then
testrun ../src/elflint --quiet --gnu-ld $1 ||
- { echo "*** failure in $1"; status=1; }
+ { echo "*** failure in $1"; status=77; }
fi
}

View File

@ -1,91 +0,0 @@
on uclibc systems libintl and libuargp are separate from libc.
so they need to be specified on commandline when we use proxy-libintl
then libintl is a static archive so it should be listed last since
elfutils does not respect disable-nls we need to link in libintl
We add a new option --enable-uclibc which will be used to control
the uclibc specific configurations during build.
Signed-off-by: Khem Raj <raj.khem>
Upstream-Status: Inappropriate [uclibc specific]
Index: elfutils-0.148/configure.ac
===================================================================
--- elfutils-0.148.orig/configure.ac
+++ elfutils-0.148/configure.ac
@@ -55,9 +55,16 @@ AS_IF([test "$use_locks" = yes], [AC_DEF
AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.])
+AC_ARG_ENABLE([uclibc],
+AS_HELP_STRING([--enable-uclibc], [Use uclibc for system libraries]),
+use_uclibc=yes, use_uclibc=no)
+AM_CONDITIONAL(USE_UCLIBC, test "$use_uclibc" = yes)
+AS_IF([test "$use_uclibc" = yes], [AC_DEFINE(USE_UCLIBC)])
+
+AH_TEMPLATE([USE_UCLIBC], [Defined if uclibc libraries are used.])
+
dnl Add all the languages for which translations are available.
ALL_LINGUAS=
-
AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_YACC
Index: elfutils-0.148/libelf/Makefile.am
===================================================================
--- elfutils-0.148.orig/libelf/Makefile.am
+++ elfutils-0.148/libelf/Makefile.am
@@ -93,7 +93,12 @@ if !MUDFLAP
libelf_pic_a_SOURCES =
am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os)
+
libelf_so_LDLIBS =
+if USE_UCLIBC
+libelf_so_LDLIBS += -lintl -luargp
+endif
+
if USE_LOCKS
libelf_so_LDLIBS += -lpthread
endif
Index: elfutils-0.148/libdw/Makefile.am
===================================================================
--- elfutils-0.148.orig/libdw/Makefile.am
+++ elfutils-0.148/libdw/Makefile.am
@@ -98,6 +98,11 @@ if !MUDFLAP
libdw_pic_a_SOURCES =
am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
+libdw_so_LDLIBS =
+if USE_UCLIBC
+libdw_so_LDLIBS += -lintl -luargp
+endif
+
libdw_so_SOURCES =
libdw.so: $(srcdir)/libdw.map libdw_pic.a \
../libdwfl/libdwfl_pic.a ../libebl/libebl.a \
@@ -108,7 +113,7 @@ libdw.so: $(srcdir)/libdw.map libdw_pic.
-Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
-Wl,--version-script,$<,--no-undefined \
-Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
- -ldl $(zip_LIBS)
+ -ldl $(zip_LIBS) $(libdw_so_LDLIBS)
if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi
ln -fs $@ $@.$(VERSION)
Index: elfutils-0.148/libcpu/Makefile.am
===================================================================
--- elfutils-0.148.orig/libcpu/Makefile.am
+++ elfutils-0.148/libcpu/Makefile.am
@@ -63,6 +63,10 @@ i386_parse_CFLAGS = -DNMNES="`wc -l < i3
i386_lex.o: i386_parse.h
i386_gendis_LDADD = $(libeu) -lm $(libmudflap)
+if USE_UCLIBC
+i386_gendis_LDADD += -luargp -lintl
+endif
+
i386_parse.h: i386_parse.c ;
noinst_HEADERS = memory-access.h i386_parse.h i386_data.h

File diff suppressed because it is too large Load Diff

View File

@ -1,91 +0,0 @@
SUMMARY = "Utilities and libraries for handling compiled object files"
HOMEPAGE = "https://fedorahosted.org/elfutils"
SECTION = "base"
LICENSE = "(GPL-2+ & Elfutils-Exception)"
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3\
file://EXCEPTION;md5=570adcb0c1218ab57f2249c67d0ce417"
DEPENDS = "libtool bzip2 zlib virtual/libintl"
PR = "r11"
SRC_URI = "https://fedorahosted.org/releases/e/l/${BPN}/${BP}.tar.bz2"
SRC_URI[md5sum] = "a0bed1130135f17ad27533b0034dba8d"
SRC_URI[sha256sum] = "8aebfa4a745db21cf5429c9541fe482729b62efc7e53e9110151b4169fe887da"
# pick the patch from debian
# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.148-1.debian.tar.gz
SRC_URI += "\
file://redhat-portability.diff \
file://redhat-robustify.diff \
file://hppa_backend.diff \
file://arm_backend.diff \
file://mips_backend.diff \
file://m68k_backend.diff \
file://testsuite-ignore-elflint.diff \
file://elf_additions.diff \
file://elfutils-fsize.patch \
file://remove-unused.patch \
file://fix_for_gcc-4.7.patch \
file://dso-link-change.patch \
file://nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch \
file://elfutils-ar-c-fix-num-passed-to-memset.patch \
file://Fix_elf_cvt_gunhash.patch \
file://elf_begin.c-CVE-2014-9447-fix.patch \
file://fix-build-gcc-4.8.patch \
file://gcc6.patch \
"
# Only apply when building uclibc based target recipe
SRC_URI_append_libc-uclibc = " file://uclibc-support-for-elfutils-0.148.patch"
# The buildsystem wants to generate 2 .h files from source using a binary it just built,
# which can not pass the cross compiling, so let's work around it by adding 2 .h files
# along with the do_configure_prepend()
SRC_URI += "\
file://i386_dis.h \
file://x86_64_dis.h \
"
inherit autotools gettext
EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
EXTRA_OECONF_append_class-native = " --without-bzlib"
EXTRA_OECONF_append_libc-uclibc = " --enable-uclibc"
do_configure_prepend() {
sed -i '/^i386_dis.h:/,+4 {/.*/d}' ${S}/libcpu/Makefile.am
cp ${WORKDIR}/*dis.h ${S}/libcpu
}
# we can not build complete elfutils when using uclibc
# but some recipes e.g. gcc 4.5 depends on libelf so we
# build only libelf for uclibc case
EXTRA_OEMAKE_libc-uclibc = "-C libelf"
EXTRA_OEMAKE_class-native = ""
EXTRA_OEMAKE_class-nativesdk = ""
BBCLASSEXTEND = "native nativesdk"
# Package utilities separately
PACKAGES =+ "${PN}-binutils libelf libasm libdw"
FILES_${PN}-binutils = "\
${bindir}/eu-addr2line \
${bindir}/eu-ld \
${bindir}/eu-nm \
${bindir}/eu-readelf \
${bindir}/eu-size \
${bindir}/eu-strip"
FILES_libelf = "${libdir}/libelf-${PV}.so ${libdir}/libelf.so.*"
FILES_libasm = "${libdir}/libasm-${PV}.so ${libdir}/libasm.so.*"
FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils/lib*"
# Some packages have the version preceeding the .so instead properly
# versioned .so.<version>, so we need to reorder and repackage.
#FILES_${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so"
#FILES_SOLIBSDEV = "${libdir}/libasm.so ${libdir}/libdw.so ${libdir}/libelf.so"
# The package contains symlinks that trip up insane
INSANE_SKIP_${MLPREFIX}libdw = "dev-so"

View File

@ -1,13 +0,0 @@
require m4.inc
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe\
file://examples/COPYING;md5=1d49bd61dc590f014cae7173b43e3e5c"
PR = "r2"
SRC_URI += "file://fix_for_circular_dependency.patch"
SRC_URI[md5sum] = "1ba8e147aff5e79bd2bfb983d86b53d5"
SRC_URI[sha256sum] = "815ce53853fbf6493617f467389b799208b1ec98296b95be44a683f8bcfd7c47"

View File

@ -1,77 +0,0 @@
Upstream-Status: Inappropriate [licensing]
The older GPLv2 m4 does not work well with newer autoconf. It causes the
circular dependency as seen bellow.
Removing this m4 file which was needed only forl older autoconf
| configure.ac:34: error: AC_REQUIRE: circular dependency of AC_GNU_SOURCE
| /build_disk/poky_build/build1/tmp/work/i586-poky-linux/m4-1.4.9-r0/m4-1.4.9/m4/extensions.m4:19: AC_USE_SYSTEM_EXTENSIONS is expanded from...
| ../../lib/autoconf/specific.m4:310: AC_GNU_SOURCE is expanded from...
| /build_disk/poky_build/build1/tmp/work/i586-poky-linux/m4-1.4.9-r0/m4-1.4.9/m4/gnulib-comp.m4:21: M4_EARLY is expanded from...
| configure.ac:34: the top level
| autom4te: /build_disk/poky_build/build1/tmp/sysroots/x86_64-linux/usr/bin/m4 failed with exit status: 1
| aclocal: /build_disk/poky_build/build1/tmp/sysroots/x86_64-linux/usr/bin/autom4te failed with exit status: 1
| autoreconf: aclocal failed with exit status: 1
Nitin A Kamble <nitin.a.kamble@intel.com>
2011/03/16
Index: m4-1.4.9/m4/extensions.m4
===================================================================
--- m4-1.4.9.orig/m4/extensions.m4
+++ m4-1.4.9/m4/extensions.m4
@@ -6,53 +6,10 @@
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
-# Autoconf. Perhaps we can remove this once we can assume Autoconf
-# 2.61 or later everywhere, but since CVS Autoconf mutates rapidly
-# enough in this area it's likely we'll need to redefine
-# AC_USE_SYSTEM_EXTENSIONS for quite some time.
-
-# AC_USE_SYSTEM_EXTENSIONS
-# ------------------------
-# Enable extensions on systems that normally disable them,
-# typically due to standards-conformance issues.
-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
-[
- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
- AC_BEFORE([$0], [AC_RUN_IFELSE])
-
- AC_REQUIRE([AC_GNU_SOURCE])
- AC_REQUIRE([AC_AIX])
- AC_REQUIRE([AC_MINIX])
-
- AH_VERBATIM([__EXTENSIONS__],
-[/* Enable extensions on Solaris. */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
-#endif
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# undef _POSIX_PTHREAD_SEMANTICS
-#endif
-#ifndef _TANDEM_SOURCE
-# undef _TANDEM_SOURCE
-#endif])
- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
- [ac_cv_safe_to_define___extensions__],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([
-# define __EXTENSIONS__ 1
- AC_INCLUDES_DEFAULT])],
- [ac_cv_safe_to_define___extensions__=yes],
- [ac_cv_safe_to_define___extensions__=no])])
- test $ac_cv_safe_to_define___extensions__ = yes &&
- AC_DEFINE([__EXTENSIONS__])
- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
- AC_DEFINE([_TANDEM_SOURCE])
-])
# gl_USE_SYSTEM_EXTENSIONS
# ------------------------
# Enable extensions on systems that normally disable them,
# typically due to standards-conformance issues.
AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS],
- [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])])
+ [])

View File

@ -1,3 +0,0 @@
require m4-${PV}.inc
BBCLASSEXTEND = "nativesdk"

View File

@ -1,43 +0,0 @@
Upstream-Status: Pending
automake 1.12 has depricated automatic de-ANSI-fication support
this patch avoids these kinds of errors:
| configure.in:48: error: automatic de-ANSI-fication support has been removed
...
| Makefile.am:19: error: automatic de-ANSI-fication support has been removed
| autoreconf: automake failed with exit status: 1
| ERROR: autoreconf execution failed.
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/05/04
Index: make-3.81/configure.in
===================================================================
--- make-3.81.orig/configure.in
+++ make-3.81/configure.in
@@ -44,9 +44,6 @@ AC_AIX
AC_ISC_POSIX
AC_MINIX
-# Needed for ansi2knr
-AM_C_PROTOTYPES
-
# Enable gettext, in "external" mode.
AM_GNU_GETTEXT_VERSION(0.14.1)
Index: make-3.81/Makefile.am
===================================================================
--- make-3.81.orig/Makefile.am
+++ make-3.81/Makefile.am
@@ -16,7 +16,7 @@
# GNU Make; see the file COPYING. If not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-AUTOMAKE_OPTIONS = 1.8 dist-bzip2 check-news ansi2knr
+AUTOMAKE_OPTIONS = 1.8 dist-bzip2 check-news
ACLOCAL_AMFLAGS = -I config
MAKE_HOST = @MAKE_HOST@

View File

@ -1,22 +0,0 @@
Allow docs to build with makeinfo 5.X, fixing the error:
doc/make.texi:8165: @itemx must follow @item
Upstream-Status: Backport
RP
2014/03/29
Index: make-3.81/doc/make.texi
===================================================================
--- make-3.81.orig/doc/make.texi 2006-04-01 06:36:40.000000000 +0000
+++ make-3.81/doc/make.texi 2014-03-29 09:39:51.007727012 +0000
@@ -8162,7 +8162,7 @@
rarely need to specify this option since @samp{make} does it for you;
see @ref{-w Option, ,The @samp{--print-directory} Option}.)
-@itemx --no-print-directory
+@item --no-print-directory
@cindex @code{--no-print-directory}
Disable printing of the working directory under @code{-w}.
This option is useful when @code{-w} is turned on automatically,

View File

@ -1,15 +0,0 @@
PR = "r1"
LICENSE = "GPLv2 & LGPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=361b6b837cad26c6900a926b62aada5f \
file://tests/COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
file://glob/COPYING.LIB;md5=4a770b67e6be0f60da244beb2de0fce4"
require make.inc
SRC_URI += "file://make_fix_for_automake-1.12.patch"
SRC_URI += "file://makeinfo.patch"
SRC_URI[md5sum] = "354853e0b2da90c527e35aabb8d6f1e6"
SRC_URI[sha256sum] = "f3e69023771e23908f5d5592954d8271d3d6af09693cecfd29cee6fde8550dc8"

View File

@ -1,23 +0,0 @@
Upstream-Status: Backport
Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
Makefile.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile.in b/Makefile.in
index 8f9305a..694e837 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -251,6 +251,7 @@ install-scripts: ${DESTDIR}$(bindir)/mtools
@$(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
@for j in $(SCRIPTS) ; do \
$(INSTALL_SCRIPT) $(srcdir)/scripts/$$j ${DESTDIR}$(bindir)/$$j ; \
+ $(INSTALL_PROGRAM) $(srcdir)/scripts/$$j ${DESTDIR}$(bindir)/$$j ; \
echo ${DESTDIR}$(bindir)/$$j ; \
done
rm -f ${DESTDIR}$(bindir)/lz
--
2.0.0

View File

@ -1,129 +0,0 @@
$NetBSD: patch-aa,v 1.10 2007/08/17 20:55:34 joerg Exp $
---
Makefile.in | 74 ++++++++++++++++++++++++++----------------------------------
1 file changed, 33 insertions(+), 41 deletions(-)
Upstream-Status: Inappropriate [licensing]
Index: mtools-3.9.9/Makefile.in
===================================================================
--- mtools-3.9.9.orig/Makefile.in 2007-10-12 11:18:46.000000000 +0100
+++ mtools-3.9.9/Makefile.in 2007-10-12 11:28:14.000000000 +0100
@@ -195,30 +195,22 @@ html: mtools.html mtools_toc.html
# Don't cd, to avoid breaking install-sh references.
install-info: info
- $(top_srcdir)/mkinstalldirs $(infodir)
+ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(infodir)
if test -f mtools.info; then \
for i in mtools.info*; do \
- $(INSTALL_DATA) $$i $(infodir)/$$i; \
+ $(INSTALL_DATA) $$i ${DESTDIR}$(infodir)/$$i; \
done; \
else \
for i in $(srcdir)/mtools.info*; do \
- $(INSTALL_DATA) $$i $(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
+ $(INSTALL_DATA) $$i ${DESTDIR}$(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
done; \
fi; \
- if [ -n "$(INSTALL_INFO)" ] ; then \
- if [ -f $(infodir)/dir.info ] ; then \
- $(INSTALL_INFO) $(infodir)/mtools.info $(infodir)/dir.info; \
- fi; \
- if [ -f $(infodir)/dir ] ; then \
- $(INSTALL_INFO) $(infodir)/mtools.info $(infodir)/dir; \
- fi; \
- fi
uninstall-info:
cd $(infodir) && rm -f mtools.info*
-install: $(bindir)/mtools @BINFLOPPYD@ install-man install-links \
- $(bindir)/mkmanifest install-scripts install-info
+install: ${DESTDIR}$(bindir)/mtools ${DESTDIR}$(bindir)/floppyd install-man install-links \
+ ${DESTDIR}$(bindir)/mkmanifest install-scripts install-info
uninstall: uninstall-bin uninstall-man uninstall-links \
uninstall-scripts
@@ -228,52 +220,52 @@ distclean: clean texclean
maintainer-clean: distclean
-$(bindir)/floppyd: floppyd
- $(top_srcdir)/mkinstalldirs $(bindir)
- $(INSTALL_PROGRAM) floppyd $(bindir)/floppyd
+${DESTDIR}$(bindir)/floppyd: floppyd
+ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
+ $(INSTALL_PROGRAM) floppyd ${DESTDIR}$(bindir)/floppyd
-$(bindir)/floppyd_installtest: floppyd_installtest
- $(top_srcdir)/mkinstalldirs $(bindir)
- $(INSTALL_PROGRAM) floppyd_installtest $(bindir)/floppyd_installtest
+${DESTDIR}$(bindir)/floppyd_installtest: floppyd_installtest
+ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
+ $(INSTALL_PROGRAM) floppyd_installtest ${DESTDIR}$(bindir)/floppyd_installtest
-$(bindir)/mtools: mtools
- $(top_srcdir)/mkinstalldirs $(bindir)
- $(INSTALL_PROGRAM) mtools $(bindir)/mtools
+${DESTDIR}$(bindir)/mtools: mtools
+ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
+ $(INSTALL_PROGRAM) mtools ${DESTDIR}$(bindir)/mtools
-$(bindir)/mkmanifest: mkmanifest
- $(top_srcdir)/mkinstalldirs $(bindir)
- $(INSTALL_PROGRAM) mkmanifest $(bindir)/mkmanifest
+${DESTDIR}$(bindir)/mkmanifest: mkmanifest
+ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
+ $(INSTALL_PROGRAM) mkmanifest ${DESTDIR}$(bindir)/mkmanifest
#$(ETCDIR)/mtools: mtools.etc
# cp mtools.etc $(ETCDIR)/mtools
-install-links: $(bindir)/mtools
+install-links: ${DESTDIR}$(bindir)/mtools
@for j in $(LINKS); do \
- rm -f $(bindir)/$$j ; \
- $(LN_S) mtools $(bindir)/$$j ; \
- echo $(bindir)/$$j ; \
+ rm -f ${DESTDIR}$(bindir)/$$j ; \
+ $(LN_S) mtools ${DESTDIR}$(bindir)/$$j ; \
+ echo ${DESTDIR}$(bindir)/$$j ; \
done
## "z" is the older version of "gz"; the name is just *too* short
-install-scripts: $(bindir)/mtools
- @$(top_srcdir)/mkinstalldirs $(bindir)
+install-scripts: ${DESTDIR}$(bindir)/mtools
+ @$(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
@for j in $(SCRIPTS) ; do \
- $(INSTALL_PROGRAM) $(srcdir)/scripts/$$j $(bindir)/$$j ; \
- echo $(bindir)/$$j ; \
+ $(INSTALL_SCRIPT) $(srcdir)/scripts/$$j ${DESTDIR}$(bindir)/$$j ; \
+ echo ${DESTDIR}$(bindir)/$$j ; \
done
- rm -f $(bindir)/lz
- $(LN_S) uz $(bindir)/lz
+ rm -f ${DESTDIR}$(bindir)/lz
+ $(LN_S) uz ${DESTDIR}$(bindir)/lz
install-man:
- @$(top_srcdir)/mkinstalldirs $(MAN1DIR)
+ @$(top_srcdir)/mkinstalldirs ${DESTDIR}$(MAN1DIR)
@for j in $(MAN1); do \
- $(INSTALL_DATA) $(srcdir)/$$j $(MAN1DIR)/$$j ; \
- echo $(MAN1DIR)/$$j ; \
+ $(INSTALL_DATA) $(srcdir)/$$j ${DESTDIR}$(MAN1DIR)/$$j ; \
+ echo ${DESTDIR}$(MAN1DIR)/$$j ; \
done
- @$(top_srcdir)/mkinstalldirs $(MAN5DIR)
+ @$(top_srcdir)/mkinstalldirs ${DESTDIR}$(MAN5DIR)
@for j in $(MAN5); do \
- $(INSTALL_DATA) $(srcdir)/$$j $(MAN5DIR)/$$j ; \
- echo $(MAN5DIR)/$$j ; \
+ $(INSTALL_DATA) $(srcdir)/$$j ${DESTDIR}$(MAN5DIR)/$$j ; \
+ echo ${DESTDIR}$(MAN5DIR)/$$j ; \
done
uninstall-bin:

View File

@ -1,21 +0,0 @@
---
Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Upstream-Status: Inappropriate [licensing]
--- mtools-3.9.9.orig/Makefile.in
+++ mtools-3.9.9/Makefile.in
@@ -128,11 +128,11 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
CFLAGS = $(CPPFLAGS) $(DEFS) $(MYCFLAGS) -I. @extraincludedir@ -I@srcdir@ $(USERCFLAGS)
CXXFLAGS = $(CPPFLAGS) $(DEFS) $(MYCXXFLAGS) -I. @extraincludedir@ -I@srcdir@ $(USERCFLAGS)
LINK = $(CC) $(LDFLAGS) $(USERLDFLAGS) @extralibdir@
ALLLIBS = $(USERLDLIBS) $(MACHDEPLIBS) $(SHLIB) $(LIBS)
-X_LDFLAGS = $(X_EXTRA_LIBS) $(X_LIBS) $(X_PRE_LIBS) -lXau -lX11 $(LIBS)
+X_LDFLAGS = $(X_EXTRA_LIBS) $(X_LIBS) $(X_PRE_LIBS) $(LIBS)
X_CCFLAGS = $(X_CFLAGS) $(CFLAGS)
all: mtools $(LINKS) mkmanifest @FLOPPYD@
%.o: %.c

View File

@ -1,55 +0,0 @@
SUMMARY = "Utilities to access MS-DOS disks without mounting them"
DESCRIPTION = "Mtools is a collection of utilities to access MS-DOS disks from GNU and Unix without mounting them."
HOMEPAGE = "http://www.gnu.org/software/mtools/"
SECTION = "optional"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=92b58ec77696788ce278b044d2a8e9d3"
PR = "r6"
DEPENDS += "virtual/libiconv"
RDEPENDS_${PN}_libc-glibc = "glibc-gconv-ibm850"
RRECOMMENDS_${PN}_libc-glibc = "\
glibc-gconv-ibm437 \
glibc-gconv-ibm737 \
glibc-gconv-ibm775 \
glibc-gconv-ibm851 \
glibc-gconv-ibm852 \
glibc-gconv-ibm855 \
glibc-gconv-ibm857 \
glibc-gconv-ibm860 \
glibc-gconv-ibm861 \
glibc-gconv-ibm862 \
glibc-gconv-ibm863 \
glibc-gconv-ibm865 \
glibc-gconv-ibm866 \
glibc-gconv-ibm869 \
"
SRC_URI[md5sum] = "3e68b857b4e1f3a6521d1dfefbd30a36"
SRC_URI[sha256sum] = "af083a73425d664d4607ef6c6564fd9319a0e47ee7c105259a45356cb834690e"
#http://mtools.linux.lu/mtools-${PV}.tar.gz
SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/mtools-${PV}.tar.gz \
file://mtools-makeinfo.patch \
file://mtools.patch \
file://no-x11.patch \
file://fix-broken-lz.patch \
file://0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch \
"
inherit autotools texinfo
EXTRA_OECONF = "--without-x"
LDFLAGS_append_libc-uclibc = " -liconv "
BBCLASSEXTEND = "native nativesdk"
PACKAGECONFIG ??= ""
PACKAGECONFIG[libbsd] = "ac_cv_lib_bsd_main=yes,ac_cv_lib_bsd_main=no,libbsd"
do_install_prepend () {
# Create bindir to fix parallel installation issues
mkdir -p ${D}/${bindir}
mkdir -p ${D}/${datadir}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,203 +0,0 @@
Upstream-Status: Inappropriate [debian patch]
Index: patch-2.5.9/patch.man
===================================================================
--- patch-2.5.9.orig/patch.man
+++ patch-2.5.9/patch.man
@@ -520,6 +520,15 @@ file.
\fB\*=reject\-unified\fP
Produce unified reject files. The default is to produce context type reject files.
.TP
+.BI \*=global\-reject\-file= rejectfile
+Put all rejects into
+.I rejectfile
+instead of creating separate reject files for all files that have rejects. The
+.I rejectfile
+will contain headers that identify which file each reject refers to. Note that
+the global reject file is created even if \-\-dry\-run is specified (while
+non-global reject files will only be created without \-\-dry\-run).
+.TP
\fB\-R\fP or \fB\*=reverse\fP
Assume that this patch was created with the old and new files swapped.
(Yes, I'm afraid that does happen occasionally, human nature being what it
Index: patch-2.5.9/patch.c
===================================================================
--- patch-2.5.9.orig/patch.c
+++ patch-2.5.9/patch.c
@@ -67,6 +67,7 @@ static bool similar (char const *, size_
static bool spew_output (struct outstate *);
static char const *make_temp (char);
static int numeric_string (char const *, bool, char const *);
+static void reject_header (const char *filename);
static void abort_hunk (void);
static void cleanup (void);
static void get_some_switches (void);
@@ -98,6 +99,7 @@ static int Argc;
static char * const *Argv;
static FILE *rejfp; /* reject file pointer */
+static char *global_reject;
static char const *patchname;
static char *rejname;
@@ -172,6 +174,10 @@ main (int argc, char **argv)
/* Make sure we clean up in case of disaster. */
set_signals (false);
+ /* initialize global reject file */
+ if (global_reject)
+ init_reject ();
+
for (
open_patch_file (patchname);
there_is_another_patch();
@@ -208,8 +214,9 @@ main (int argc, char **argv)
init_output (TMPOUTNAME, exclusive, &outstate);
}
- /* initialize reject file */
- init_reject ();
+ /* initialize per-patch reject file */
+ if (!global_reject)
+ init_reject ();
/* find out where all the lines are */
if (!skip_rest_of_patch)
@@ -278,6 +285,8 @@ main (int argc, char **argv)
newwhere = pch_newfirst() + last_offset;
if (skip_rest_of_patch) {
+ if (!failed)
+ reject_header(outname);
abort_hunk();
failed++;
if (verbosity == VERBOSE)
@@ -292,6 +301,8 @@ main (int argc, char **argv)
say ("Patch attempted to create file %s, which already exists.\n",
quotearg (inname));
+ if (!failed)
+ reject_header(outname);
abort_hunk();
failed++;
if (verbosity != SILENT)
@@ -299,6 +310,8 @@ main (int argc, char **argv)
format_linenum (numbuf, newwhere));
}
else if (! apply_hunk (&outstate, where)) {
+ if (!failed)
+ reject_header(outname);
abort_hunk ();
failed++;
if (verbosity != SILENT)
@@ -332,7 +345,8 @@ main (int argc, char **argv)
fclose (outstate.ofp);
outstate.ofp = 0;
}
- fclose (rejfp);
+ if (!global_reject)
+ fclose (rejfp);
continue;
}
@@ -412,13 +426,13 @@ main (int argc, char **argv)
}
}
if (diff_type != ED_DIFF) {
- if (fclose (rejfp) != 0)
+ if (!global_reject && fclose (rejfp) != 0)
write_fatal ();
if (failed) {
somefailed = true;
say ("%d out of %d hunk%s %s", failed, hunk, "s" + (hunk == 1),
skip_rest_of_patch ? "ignored" : "FAILED");
- if (outname) {
+ if (!global_reject && outname) {
char *rej = rejname;
if (!rejname) {
rej = xmalloc (strlen (outname) + 5);
@@ -445,6 +459,20 @@ main (int argc, char **argv)
}
set_signals (true);
}
+ if (global_reject)
+ {
+ if (fclose (rejfp) != 0)
+ write_fatal ();
+ if (somefailed)
+ {
+ say (" -- saving rejects to file %s\n", quotearg (global_reject));
+ /*if (! dry_run)
+ {*/
+ move_file (TMPREJNAME, &TMPREJNAME_needs_removal,
+ global_reject, 0644, false);
+ /*}*/
+ }
+ }
if (outstate.ofp && (ferror (outstate.ofp) || fclose (outstate.ofp) != 0))
write_fatal ();
cleanup ();
@@ -523,6 +551,7 @@ static struct option const longopts[] =
{"posix", no_argument, NULL, CHAR_MAX + 7},
{"quoting-style", required_argument, NULL, CHAR_MAX + 8},
{"unified-reject-files", no_argument, NULL, CHAR_MAX + 9},
+ {"global-reject-file", required_argument, NULL, CHAR_MAX + 10},
{NULL, no_argument, NULL, 0}
};
@@ -582,6 +611,7 @@ static char const *const option_help[] =
" --dry-run Do not actually change any files; just print what would happen.",
" --posix Conform to the POSIX standard.",
" --unified-reject-files Create unified reject files.",
+" --global-reject-file=file Put all rejects into one file.",
"",
" -d DIR --directory=DIR Change the working directory to DIR first.",
#if HAVE_SETMODE_DOS
@@ -784,6 +814,9 @@ get_some_switches (void)
case CHAR_MAX + 9:
unified_reject_files = true;
break;
+ case CHAR_MAX + 10:
+ global_reject = savestr (optarg);
+ break;
default:
usage (stderr, 2);
}
@@ -933,6 +966,37 @@ locate_hunk (LINENUM fuzz)
}
static char *
+format_timestamp (char timebuf[37], bool which)
+{
+ time_t ts = pch_timestamp(which);
+ if (ts != -1)
+ {
+ struct tm *tm = localtime(&ts);
+ strftime(timebuf, 37, "\t%Y-%m-%d %H:%M:%S.000000000 %z", tm);
+ }
+ else
+ timebuf[0] = 0;
+ return timebuf;
+}
+
+/* Write a header in a reject file that combines multiple hunks. */
+static void
+reject_header (const char *outname)
+{
+ char timebuf0[37], timebuf1[37];
+ if (!global_reject)
+ return;
+ if (diff_type == UNI_DIFF)
+ fprintf(rejfp, "--- %s.orig%s\n+++ %s%s\n",
+ outname, format_timestamp(timebuf0, reverse),
+ outname, format_timestamp(timebuf1, !reverse));
+ else
+ fprintf(rejfp, "*** %s.orig%s\n--- %s%s\n",
+ outname, format_timestamp(timebuf0, reverse),
+ outname, format_timestamp(timebuf1, !reverse));
+}
+
+static char *
format_linerange (char rangebuf[LINENUM_LENGTH_BOUND*2 + 2],
LINENUM first, LINENUM lines)
{

View File

@ -1,43 +0,0 @@
Upstream-Status: Inappropriate [embedded specific]
Index: patch-2.5.4/Makefile.in
===================================================================
--- patch-2.5.4.orig/Makefile.in 2005-03-09 07:23:54.779311824 -0500
+++ patch-2.5.4/Makefile.in 2005-03-09 07:26:09.616813408 -0500
@@ -43,10 +43,11 @@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
+DESTDIR =
prefix = @prefix@
exec_prefix = @exec_prefix@
-bindir = $(exec_prefix)/bin
+bindir = @bindir@
# Where to put the manual pages.
mandir = @mandir@
@@ -112,18 +113,18 @@
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS)
install:: all installdirs
- $(INSTALL_PROGRAM) patch$(EXEEXT) $(bindir)/$(patch_name)$(EXEEXT)
- -$(INSTALL_DATA) $(srcdir)/patch.man $(man1dir)/$(patch_name)$(man1ext)
+ $(INSTALL_PROGRAM) patch$(EXEEXT) $(DESTDIR)$(bindir)/$(patch_name)$(EXEEXT)
+ -$(INSTALL_DATA) $(srcdir)/patch.man $(DESTDIR)$(man1dir)/$(patch_name)$(man1ext)
installdirs::
- $(SHELL) $(srcdir)/mkinstalldirs $(bindir) $(man1dir)
+ $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
install-strip::
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
uninstall::
- rm -f $(bindir)/$(patch_name)$(EXEEXT)
- rm -f $(man1dir)/$(patch_name)$(man1ext)
+ rm -f $(DESTDIR)$(bindir)/$(patch_name)$(EXEEXT)
+ rm -f $(DESTDIR)$(man1dir)/$(patch_name)$(man1ext)
Makefile: Makefile.in $(CONFIG_STATUS)
$(SHELL) $(CONFIG_STATUS)

View File

@ -1,307 +0,0 @@
Upstream-Status: Inappropriate [debian patch]
Generate unified diff style reject files. Also include the C function names
in reject files whenever possible.
$ cat > f.orig
< a() {
< 2
< 3
<
< 5
< 6
< }
$ sed -e 's/5/5a/' f.orig > f
$ diff -U2 -p f.orig f > f.diff
$ sed -e 's/5/5a/' -e 's/6/6x/' f.orig > f
$ ./patch -F0 -s --no-backup-if-mismatch f --reject-unified < f.diff
> 1 out of 1 hunk FAILED -- saving rejects to file f.rej
$ cat f.rej
> @@ -3,5 +3,5 @@ a() {
> 3
>
> -5
> +5a
> 6
> }
$ ./patch -F0 -s --no-backup-if-mismatch f < f.diff
> 1 out of 1 hunk FAILED -- saving rejects to file f.rej
$ cat f.rej
> *************** a() {
> *** 3,7 ****
> 3
>
> - 5
> 6
> }
> --- 3,7 ----
> 3
>
> + 5a
> 6
> }
$ diff -Nu -p /dev/null f.orig > f2.diff
$ ./patch -F0 -s --no-backup-if-mismatch f --reject-unified < f2.diff
> Patch attempted to create file f, which already exists.
> 1 out of 1 hunk FAILED -- saving rejects to file f.rej
$ cat f.rej
> @@ -0,0 +1,7 @@
> +a() {
> +2
> +3
> +
> +5
> +6
> +}
$ rm -f f f.orig f.rej f.diff f2.diff
Index: patch-2.5.9/pch.c
===================================================================
--- patch-2.5.9.orig/pch.c
+++ patch-2.5.9/pch.c
@@ -68,6 +68,7 @@ static LINENUM p_sline; /* and the lin
static LINENUM p_hunk_beg; /* line number of current hunk */
static LINENUM p_efake = -1; /* end of faked up lines--don't free */
static LINENUM p_bfake = -1; /* beg of faked up lines */
+static char *p_c_function; /* the C function a hunk is in */
enum nametype { OLD, NEW, INDEX, NONE };
@@ -888,6 +889,19 @@ another_hunk (enum diff difftype, bool r
next_intuit_at(line_beginning,p_input_line);
return chars_read == (size_t) -1 ? -1 : 0;
}
+ s = buf;
+ while (*s == '*')
+ s++;
+ if (*s == ' ')
+ {
+ p_c_function = s;
+ while (*s != '\n')
+ s++;
+ *s = '\0';
+ p_c_function = savestr (p_c_function);
+ }
+ else
+ p_c_function = NULL;
p_hunk_beg = p_input_line + 1;
while (p_end < p_max) {
chars_read = get_line ();
@@ -1277,8 +1291,18 @@ another_hunk (enum diff difftype, bool r
else
p_repl_lines = 1;
if (*s == ' ') s++;
- if (*s != '@')
+ if (*s++ != '@')
malformed ();
+ if (*s++ == '@' && *s == ' ' && *s != '\0')
+ {
+ p_c_function = s;
+ while (*s != '\n')
+ s++;
+ *s = '\0';
+ p_c_function = savestr (p_c_function);
+ }
+ else
+ p_c_function = NULL;
if (!p_ptrn_lines)
p_first++; /* do append rather than insert */
if (!p_repl_lines)
@@ -1884,6 +1908,12 @@ pch_hunk_beg (void)
return p_hunk_beg;
}
+char const *
+pch_c_function (void)
+{
+ return p_c_function;
+}
+
/* Is the newline-terminated line a valid `ed' command for patch
input? If so, return the command character; if not, return 0.
This accepts accepts just a subset of the valid commands, but it's
Index: patch-2.5.9/pch.h
===================================================================
--- patch-2.5.9.orig/pch.h
+++ patch-2.5.9/pch.h
@@ -25,6 +25,7 @@
LINENUM pch_end (void);
LINENUM pch_first (void);
LINENUM pch_hunk_beg (void);
+char const *pch_c_function (void);
LINENUM pch_newfirst (void);
LINENUM pch_prefix_context (void);
LINENUM pch_ptrn_lines (void);
Index: patch-2.5.9/patch.man
===================================================================
--- patch-2.5.9.orig/patch.man
+++ patch-2.5.9/patch.man
@@ -517,6 +517,9 @@ instead of the default
.B \&.rej
file.
.TP
+\fB\*=reject\-unified\fP
+Produce unified reject files. The default is to produce context type reject files.
+.TP
\fB\-R\fP or \fB\*=reverse\fP
Assume that this patch was created with the old and new files swapped.
(Yes, I'm afraid that does happen occasionally, human nature being what it
Index: patch-2.5.9/common.h
===================================================================
--- patch-2.5.9.orig/common.h
+++ patch-2.5.9/common.h
@@ -146,6 +146,7 @@ XTERN int invc;
XTERN struct stat instat;
XTERN bool dry_run;
XTERN bool posixly_correct;
+XTERN bool unified_reject_files;
XTERN char const *origprae;
XTERN char const *origbase;
Index: patch-2.5.9/patch.c
===================================================================
--- patch-2.5.9.orig/patch.c
+++ patch-2.5.9/patch.c
@@ -522,6 +522,7 @@ static struct option const longopts[] =
{"no-backup-if-mismatch", no_argument, NULL, CHAR_MAX + 6},
{"posix", no_argument, NULL, CHAR_MAX + 7},
{"quoting-style", required_argument, NULL, CHAR_MAX + 8},
+ {"unified-reject-files", no_argument, NULL, CHAR_MAX + 9},
{NULL, no_argument, NULL, 0}
};
@@ -580,6 +581,7 @@ static char const *const option_help[] =
" --verbose Output extra information about the work being done.",
" --dry-run Do not actually change any files; just print what would happen.",
" --posix Conform to the POSIX standard.",
+" --unified-reject-files Create unified reject files.",
"",
" -d DIR --directory=DIR Change the working directory to DIR first.",
#if HAVE_SETMODE_DOS
@@ -779,6 +781,9 @@ get_some_switches (void)
(enum quoting_style) i);
}
break;
+ case CHAR_MAX + 9:
+ unified_reject_files = true;
+ break;
default:
usage (stderr, 2);
}
@@ -927,6 +932,24 @@ locate_hunk (LINENUM fuzz)
return 0;
}
+static char *
+format_linerange (char rangebuf[LINENUM_LENGTH_BOUND*2 + 2],
+ LINENUM first, LINENUM lines)
+{
+ if (lines == 1)
+ rangebuf = format_linenum (rangebuf, first);
+ else
+ {
+ char *rb;
+ rangebuf = format_linenum (rangebuf + LINENUM_LENGTH_BOUND + 1, lines);
+ rb = rangebuf-1;
+ rangebuf = format_linenum (rangebuf - LINENUM_LENGTH_BOUND - 1,
+ (lines > 0) ? first : 0);
+ *rb = ',';
+ }
+ return rangebuf;
+}
+
/* We did not find the pattern, dump out the hunk so they can handle it. */
static void
@@ -943,8 +966,83 @@ abort_hunk (void)
(int) NEW_CONTEXT_DIFF <= (int) diff_type ? " ****" : "";
char const *minuses =
(int) NEW_CONTEXT_DIFF <= (int) diff_type ? " ----" : " -----";
+ char const *function = pch_c_function();
+ if (function == NULL)
+ function = "";
+
+ if (unified_reject_files)
+ {
+ /* produce unified reject files */
+ char rangebuf0[LINENUM_LENGTH_BOUND*2 + 2];
+ char rangebuf1[LINENUM_LENGTH_BOUND*2 + 2];
+ LINENUM j;
+
+ /* Find the beginning of the remove and insert section. */
+ for (j = 0; j <= pat_end; j++)
+ if (pch_char (j) == '=')
+ break;
+ for (i = j+1; i <= pat_end; i++)
+ if (pch_char (i) == '^')
+ break;
+ if (pch_char (0) != '*' || j > pat_end || i > pat_end+1)
+ fatal ("internal error in abort_hunk");
+ i = 1; j++;
+
+ /* @@ -from,lines +to,lines @@ */
+ fprintf (rejfp, "@@ -%s +%s @@%s\n",
+ format_linerange (rangebuf0, oldfirst, pch_ptrn_lines()),
+ format_linerange (rangebuf1, newfirst, pch_repl_lines()),
+ function);
+
+ while ( (i <= pat_end && pch_char (i) != '=')
+ || (j <= pat_end && pch_char (j) != '^'))
+ {
+ if (i <= pat_end
+ && (pch_char (i) == '-' || pch_char (i) == '!'))
+ {
+ fputc('-', rejfp);
+ pch_write_line (i++, rejfp);
+ }
+ else if (j <= pat_end
+ && (pch_char (j) == '+' || pch_char (j) == '!'))
+ {
+ fputc('+', rejfp);
+ pch_write_line (j++, rejfp);
+ }
+ else if ((i <= pat_end
+ && (pch_char (i) == ' ' || pch_char (i) == '\n')) &&
+ (j > pat_end
+ || (pch_char (j) == ' ' || pch_char (j) == '\n')))
+ {
+ /* Unless j is already past the end, lines i and j
+ must be equal here. */
+
+ if (pch_char (i) == ' ')
+ fputc(' ', rejfp);
+ pch_write_line (i++, rejfp);
+ if (j <= pat_end)
+ j++;
+ }
+ else if ((j <= pat_end &&
+ (pch_char (j) == ' ' || pch_char (j) == '\n')) &&
+ (pch_char (i) == '='))
+ {
+ if (pch_char (j) == ' ')
+ fputc(' ', rejfp);
+ pch_write_line (j++, rejfp);
+ }
+ else
+ fatal ("internal error in abort_hunk");
+ }
+
+ if (ferror (rejfp))
+ write_fatal ();
+ return;
+ }
- fprintf(rejfp, "***************\n");
+ /* produce context type reject files */
+
+ fprintf(rejfp, "***************%s\n", function);
for (i=0; i<=pat_end; i++) {
char numbuf0[LINENUM_LENGTH_BOUND + 1];
char numbuf1[LINENUM_LENGTH_BOUND + 1];

View File

@ -1,12 +0,0 @@
require patch.inc
LICENSE = "GPLv2"
SRC_URI += " file://debian.patch \
file://install.patch \
file://unified-reject-files.diff \
file://global-reject-file.diff "
PR = "r3"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
SRC_URI[md5sum] = "dacfb618082f8d3a2194601193cf8716"
SRC_URI[sha256sum] = "ecb5c6469d732bcf01d6ec1afe9e64f1668caba5bfdb103c28d7f537ba3cdb8a"

View File

@ -1,71 +0,0 @@
Upstream-Status: Backport [ The patch is rsync-2.6.9 specific ]
CVE: CVE-2007-4091
The patch is from https://issues.rpath.com/browse/RPL-1647 and is used to
address http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2007-4091
Date: Tue May 10 10:07:36 2011 +0800
Dexuan Cui <dexuan.cui@intel.com>
diff --git a/sender.c b/sender.c
index 6fcaa65..053a8f1 100644
--- a/sender.c
+++ b/sender.c
@@ -123,6 +123,7 @@ void successful_send(int ndx)
char fname[MAXPATHLEN];
struct file_struct *file;
unsigned int offset;
+ size_t l = 0;
if (ndx < 0 || ndx >= the_file_list->count)
return;
@@ -133,6 +134,20 @@ void successful_send(int ndx)
file->dir.root, "/", NULL);
} else
offset = 0;
+
+ l = offset + 1;
+ if (file) {
+ if (file->dirname)
+ l += strlen(file->dirname);
+ if (file->basename)
+ l += strlen(file->basename);
+ }
+
+ if (l >= sizeof(fname)) {
+ rprintf(FERROR, "Overlong pathname\n");
+ exit_cleanup(RERR_FILESELECT);
+ }
+
f_name(file, fname + offset);
if (remove_source_files) {
if (do_unlink(fname) == 0) {
@@ -224,6 +239,7 @@ void send_files(struct file_list *flist, int f_out, int f_in)
enum logcode log_code = log_before_transfer ? FLOG : FINFO;
int f_xfer = write_batch < 0 ? batch_fd : f_out;
int i, j;
+ size_t l = 0;
if (verbose > 2)
rprintf(FINFO, "send_files starting\n");
@@ -259,6 +275,20 @@ void send_files(struct file_list *flist, int f_out, int f_in)
fname[offset++] = '/';
} else
offset = 0;
+
+ l = offset + 1;
+ if (file) {
+ if (file->dirname)
+ l += strlen(file->dirname);
+ if (file->basename)
+ l += strlen(file->basename);
+ }
+
+ if (l >= sizeof(fname)) {
+ rprintf(FERROR, "Overlong pathname\n");
+ exit_cleanup(RERR_FILESELECT);
+ }
+
fname2 = f_name(file, fname + offset);
if (verbose > 2)

View File

@ -1,15 +0,0 @@
# /etc/rsyncd.conf
# Minimal configuration file for rsync daemon
# See rsync(1) and rsyncd.conf(5) man pages for help
# This file is required by rsync --daemon
pid file = /var/run/rsyncd.pid
use chroot = yes
read only = yes
# Simple example for enabling your own local rsync server
#[everything]
# path = /
# comment = Everything except /etc exposed
# exclude = /etc

View File

@ -1,15 +0,0 @@
require rsync.inc
SRC_URI += "file://rsync-2.6.9-fname-obo.patch \
file://rsyncd.conf \
"
SRC_URI[md5sum] = "996d8d8831dbca17910094e56dcb5942"
SRC_URI[sha256sum] = "ca437301becd890e73300bc69a39189ff1564baa761948ff149b3dd7bde633f9"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=6d5a9d4c4d3af25cd68fd83e8a8cb09c"
PR = "r4"
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"

View File

@ -1,44 +0,0 @@
Add 'ptest' target to Makefile, to run tests without checking dependencies.
Signed-off-by: Anders Roxell <anders.roxell@enea.com>
Upstream-Status: Pending
---
diff -dNaur bash-3.2.48/Makefile.in.orig bash-3.2.48/Makefile.in
--- bash-3.2.48/Makefile.in.orig 2006-08-17 23:03:35.000000000 +0500
+++ bash-3.2.48/Makefile.in 2013-07-02 20:20:07.512709327 +0500
@@ -803,17 +803,31 @@
fi
recho$(EXEEXT): $(SUPPORT_SRC)recho.c
- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)recho.c ${LIBS_FOR_BUILD}
+ @$(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $<
zecho$(EXEEXT): $(SUPPORT_SRC)zecho.c
- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)zecho.c ${LIBS_FOR_BUILD}
+ @$(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $<
printenv$(EXEEXT): $(SUPPORT_SRC)printenv.c
- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)printenv.c ${LIBS_FOR_BUILD}
+ @$(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $<
-test tests check: force $(Program) $(TESTS_SUPPORT)
+test tests check:
+ @$(MAKE) install-test
+ @$(MAKE) runtest
+
+install-test: buildtest
+ifeq ($(origin INSTALL_TEST_DIR), undefined)
@-test -d tests || mkdir tests
@cp $(TESTS_SUPPORT) tests
+else
+ @-test -d $(INSTALL_TEST_DIR) || mkdir -p $(INSTALL_TEST_DIR)
+ @cp -r $(srcdir)/tests/* $(INSTALL_TEST_DIR)/
+ @cp $(TESTS_SUPPORT) $(INSTALL_TEST_DIR)
+endif
+
+buildtest: force $(Program) $(TESTS_SUPPORT)
+
+runtest:
@( cd $(srcdir)/tests && \
PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} )

View File

@ -1,33 +0,0 @@
From 933bd886af49667e88e2385409449ab598813dab Mon Sep 17 00:00:00 2001
From: Andre McCurdy <armccurdy@gmail.com>
Date: Wed, 15 Jul 2015 00:54:33 -0700
Subject: [PATCH] dont include target CFLAGS in host LDFLAGS
Building the host tool 'mkbuiltins' will fail if the target CFLAGS
contains an option which isn't supported by the host's gcc. To prevent
the issue, define LDFLAGS_FOR_BUILD based on CFLAGS_FOR_BUILD instead
of CFLAGS.
Upstream-Status: Inappropriate [required for bash 3.2.57 (GPLv2) recipe only]
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
builtins/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtins/Makefile.in b/builtins/Makefile.in
index e027f7a..ebfddf3 100644
--- a/builtins/Makefile.in
+++ b/builtins/Makefile.in
@@ -63,7 +63,7 @@ LOCAL_DEFS = @LOCAL_DEFS@
LIBS = @LIBS@
LDFLAGS = @LDFLAGS@ $(LOCAL_LDFLAGS) $(CFLAGS)
-LDFLAGS_FOR_BUILD = $(LDFLAGS)
+LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ $(LOCAL_LDFLAGS) $(CFLAGS_FOR_BUILD)
LOCAL_LDFLAGS = @LOCAL_LDFLAGS@
#LIBS_FOR_BUILD = @LIBS_FOR_BUILD@
LIBS_FOR_BUILD = $(LIBS)
--
1.9.1

View File

@ -1,29 +0,0 @@
On hosts with FORTIFY_SOURCES, stringize support is required, as it's used by
the macros to wrap functions (e.g. read and open in unistd.h). Those wrappers
use the STRING() macro from unistd.h. A header in the bash sources overrides
the unistd.h macro to 'x' when HAVE_STRINGIZE is not defined, causing the
wrappers to generate calls to 'xread' and 'xopen', which do not exist,
resulting in a failure to link.
Assume we have stringize support when cross-compiling, which works around the
issue.
It may be best for upstream to either give up on supporting compilers without
stringize support, or to not define STRING() at all when FORTIFY_SOURCES is
defined, letting the unistd.h one be used, instead.
Upstream-Status: Pending
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
--- bash-4.2.orig/builtins/mkbuiltins.c
+++ bash-4.2/builtins/mkbuiltins.c
@@ -28,6 +28,7 @@
# define HAVE_STDLIB_H
# define HAVE_RENAME
+# define HAVE_STRINGIZE
#endif /* CROSS_COMPILING */
#if defined (HAVE_UNISTD_H)

View File

@ -1,2 +0,0 @@
#!/bin/sh
make -k THIS_SH=/bin/bash BUILD_DIR=. runtest

View File

@ -1,21 +0,0 @@
Fix a string format warning when using security flags:
| ../bash-3.2.48/print_cmd.c:1152:3: error: format not a string literal and no format arguments [-Werror=format-security]
| cprintf (indentation_string);
Upstream-Status: Backport
Signed-off-by: Ross Burton <ross.burton@intel.com>
diff --git a/print_cmd.c b/print_cmd.c
index d1dfd1a..956db53 100644
--- a/print_cmd.c
+++ b/print_cmd.c
@@ -1149,7 +1149,7 @@ indent (amount)
for (i = 0; amount > 0; amount--)
indentation_string[i++] = ' ';
indentation_string[i] = '\0';
- cprintf (indentation_string);
+ cprintf ("%s", indentation_string);
}
static void

View File

@ -1,25 +0,0 @@
Add FAIL/PASS output to test output.
Signed-off-by: Björn Stenberg <bjst@enea.com>
Upstream-Status: Pending
---
diff -uNr a/tests/run-all b/tests/run-all
--- a/tests/run-all 1999-10-08 17:07:46.000000000 +0200
+++ b/tests/run-all 2012-10-27 21:04:18.663331887 +0200
@@ -22,7 +22,15 @@
case $x in
$0|run-minimal|run-gprof) ;;
*.orig|*~) ;;
- *) echo $x ; sh $x ;;
+ *) echo $x
+ output=`sh $x`
+ if [ -n "$output" ]; then
+ echo "$output"
+ echo "FAIL: $x"
+ else
+ echo "PASS: $x"
+ fi
+ ;;
esac
done

View File

@ -1,18 +0,0 @@
require bash.inc
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=fd5d9bcabd8ed5a54a01ce8d183d592a"
SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
file://mkbuiltins_have_stringize.patch \
file://build-tests.patch \
file://test-output.patch \
file://run-ptest \
file://dont-include-target-CFLAGS-in-host-LDFLAGS.patch \
file://string-format.patch \
"
SRC_URI[md5sum] = "237a8767c990b43ae2c89895c2dbc062"
SRC_URI[sha256sum] = "3fa9daf85ebf35068f090ce51283ddeeb3c75eb5bc70b1a4a7cb05868bfe06a4"
PARALLEL_MAKE = ""

View File

@ -1,26 +0,0 @@
Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624]
CVE: CVE-2010-0624
This patch avoids heap overflow reported by :
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624
This is a clean patch for the GPLv2 tar recipe.
the GPLv2 tar recipe patch is also applicable to this GPLv2 cpio
recipe, as they share code.
Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/25
Index: tar-1.17/lib/rtapelib.c
===================================================================
--- tar-1.17.orig/lib/rtapelib.c
+++ tar-1.17/lib/rtapelib.c
@@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si
sprintf (command_buffer, "R%lu\n", (unsigned long) length);
if (do_command (handle, command_buffer) == -1
- || (status = get_status (handle)) == SAFE_READ_ERROR)
+ || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length))
return SAFE_READ_ERROR;
for (counter = 0; counter < status; counter += rlen, buffer += rlen)

View File

@ -1,217 +0,0 @@
cpio: Fix memory overrun on reading improperly created link records
Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
http://git.savannah.gnu.org/cgit/cpio.git/commit/?id=746f3ff670dcfcdd28fcc990e79cd6fccc7ae48d
* src/copyin.c (get_link_name): New function.
(list_file, copyin_link): use get_link_name
* tests/symlink-bad-length.at: New file.
* tests/symlink-long.at: New file.
* tests/Makefile.am: Add new files.
* tests/testsuite.at: Likewise.
See http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
Upstream-Status: Backport
Signed-off-by: Sergey Poznyakoff <gray@gnu.org.ua>
diff -Nurp cpio-2.8.orig/src/copyin.c cpio-2.8/src/copyin.c
--- cpio-2.8.orig/src/copyin.c 2007-06-07 19:58:03.000000000 +0800
+++ cpio-2.8/src/copyin.c 2014-12-08 11:30:01.159791484 +0800
@@ -126,6 +126,28 @@ tape_skip_padding (int in_file_des, int
}
+static char *
+get_link_name (struct cpio_file_stat *file_hdr, int in_file_des)
+{
+ off_t n = file_hdr->c_filesize + 1;
+ char *link_name;
+
+ if (n == 0 || n > SIZE_MAX)
+ {
+ error (0, 0, _("%s: stored filename length too big"), file_hdr->c_name);
+ link_name = NULL;
+ }
+ else
+ {
+ link_name = xmalloc (n);
+ tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
+ link_name[file_hdr->c_filesize] = '\0';
+ tape_skip_padding (in_file_des, file_hdr->c_filesize);
+ }
+ return link_name;
+}
+
+
static void
list_file(struct cpio_file_stat* file_hdr, int in_file_des)
{
@@ -136,21 +158,16 @@ list_file(struct cpio_file_stat* file_hd
{
if (archive_format != arf_tar && archive_format != arf_ustar)
{
- char *link_name = NULL; /* Name of hard and symbolic links. */
-
- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
- link_name[file_hdr->c_filesize] = '\0';
- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
- long_format (file_hdr, link_name);
- free (link_name);
- tape_skip_padding (in_file_des, file_hdr->c_filesize);
- return;
+ char *link_name = get_link_name (file_hdr, in_file_des);
+ if (link_name)
+ {
+ long_format (file_hdr, link_name);
+ free (link_name);
+ }
}
else
- {
long_format (file_hdr, file_hdr->c_tar_linkname);
- return;
- }
+ return;
}
else
#endif
@@ -732,10 +749,7 @@ copyin_link(struct cpio_file_stat *file_
if (archive_format != arf_tar && archive_format != arf_ustar)
{
- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
- link_name[file_hdr->c_filesize] = '\0';
- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
- tape_skip_padding (in_file_des, file_hdr->c_filesize);
+ link_name = get_link_name (file_hdr, in_file_des);
}
else
{
diff -Nurp cpio-2.8.orig/tests/Makefile.am cpio-2.8/tests/Makefile.am
--- cpio-2.8.orig/tests/Makefile.am 2006-10-24 18:32:13.000000000 +0800
+++ cpio-2.8/tests/Makefile.am 2014-12-08 11:30:52.387789482 +0800
@@ -45,6 +45,8 @@ TESTSUITE_AT = \
testsuite.at\
inout.at\
symlink.at\
+ symlink-bad-length.at\
+ symlink-long.at\
version.at
TESTSUITE = $(srcdir)/testsuite
diff -Nurp cpio-2.8.orig/tests/symlink-bad-length.at cpio-2.8/tests/symlink-bad-length.at
--- cpio-2.8.orig/tests/symlink-bad-length.at 1970-01-01 08:00:00.000000000 +0800
+++ cpio-2.8/tests/symlink-bad-length.at 2014-12-08 11:33:25.283783507 +0800
@@ -0,0 +1,49 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Copyright (C) 2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA.
+
+# Cpio v2.11 did segfault with badly set symlink length.
+# References:
+# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
+
+AT_SETUP([symlink-bad-length])
+AT_KEYWORDS([symlink-long copyout])
+
+AT_DATA([ARCHIVE.base64],
+[x3EjAIBAtIEtJy8nAQAAAHRUYW0FAAAADQBGSUxFAABzb21lIGNvbnRlbnQKAMdxIwBgQ/+hLScv
+JwEAAAB0VEhuBQD/////TElOSwAARklMRcdxAAAAAAAAAAAAAAEAAAAAAAAACwAAAAAAVFJBSUxF
+UiEhIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
+])
+
+AT_CHECK([
+base64 -d ARCHIVE.base64 > ARCHIVE || AT_SKIP_TEST
+cpio -ntv < ARCHIVE
+test $? -eq 2
+],
+[0],
+[-rw-rw-r-- 1 10029 10031 13 Nov 25 13:52 FILE
+],[cpio: LINK: stored filename length too big
+cpio: premature end of file
+])
+
+AT_CLEANUP
diff -Nurp cpio-2.8.orig/tests/symlink-long.at cpio-2.8/tests/symlink-long.at
--- cpio-2.8.orig/tests/symlink-long.at 1970-01-01 08:00:00.000000000 +0800
+++ cpio-2.8/tests/symlink-long.at 2014-12-08 11:34:28.807781024 +0800
@@ -0,0 +1,46 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+# Copyright (C) 2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA.
+
+# Cpio v2.11.90 changed the way symlink name is read from archive.
+# References:
+# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
+
+AT_SETUP([symlink-long])
+AT_KEYWORDS([symlink-long copyout])
+
+AT_CHECK([
+
+# len(dirname) > READBUFSIZE
+dirname=
+for i in {1..52}; do
+ dirname="xxxxxxxxx/$dirname"
+ mkdir "$dirname"
+done
+ln -s "$dirname" x || AT_SKIP_TEST
+
+echo x | cpio -o > ar
+list=`cpio -tv < ar | sed 's|.*-> ||'`
+test "$list" = "$dirname" && echo success || echo fail
+],
+[0],
+[success
+],[2 blocks
+2 blocks
+])
+
+AT_CLEANUP
diff -Nurp cpio-2.8.orig/tests/testsuite.at cpio-2.8/tests/testsuite.at
--- cpio-2.8.orig/tests/testsuite.at 2006-10-24 18:32:13.000000000 +0800
+++ cpio-2.8/tests/testsuite.at 2014-12-08 11:34:56.515779942 +0800
@@ -31,3 +31,5 @@ m4_include([version.at])
m4_include([inout.at])
m4_include([symlink.at])
+m4_include([symlink-bad-length.at])
+m4_include([symlink-long.at])

View File

@ -1,31 +0,0 @@
Upstream-Status: Inappropriate [licensing]
# Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined.
# This is needed to configure correctly with newer versions of autoconf.
diff -urN cpio-2.8.orig/m4/extensions.m4 cpio-2.8/m4/extensions.m4
--- cpio-2.8.orig/m4/extensions.m4 2006-10-12 04:34:45.000000000 -0700
+++ cpio-2.8/m4/extensions.m4 2010-07-23 14:37:36.000000000 -0700
@@ -1,4 +1,4 @@
-# serial 4 -*- Autoconf -*-
+# serial 5 -*- Autoconf -*-
# Enable extensions on systems that normally disable them.
# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
@@ -16,6 +16,7 @@
# ------------------------
# Enable extensions on systems that normally disable them,
# typically due to standards-conformance issues.
+m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [
AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
[
AC_BEFORE([$0], [AC_COMPILE_IFELSE])
@@ -48,7 +49,7 @@
AC_DEFINE([__EXTENSIONS__])
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
AC_DEFINE([_TANDEM_SOURCE])
-])
+])])
# gl_USE_SYSTEM_EXTENSIONS
# ------------------------

View File

@ -1,15 +0,0 @@
Upstream-Status: Inappropriate [licensing]
# Avoid multiple stat definitions
# Patch taken from cpio mailing list posting 2010-03-19
diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h
--- cpio-2.11.orig/src/filetypes.h 2010-02-12 02:19:23.000000000 -0800
+++ cpio-2.11/src/filetypes.h 2010-07-23 13:17:25.000000000 -0700
@@ -82,4 +82,6 @@
#define lstat stat
#endif
int lstat ();
+#ifndef stat
int stat ();
+#endif

View File

@ -1,19 +0,0 @@
require cpio_v2.inc
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b7f772ea3a2489231cb4872656cac34b"
PR = "r4"
SRC_URI += " \
file://statdef.patch \
file://m4extensions.patch \
file://avoid_heap_overflow.patch \
file://fix-memory-overrun.patch \
"
SRC_URI[md5sum] = "0caa356e69e149fb49b76bacc64615a1"
SRC_URI[sha256sum] = "1b203248874c3b5a728b351f06513e5282f73e0170b7f207fbf8c39f28f6b4ad"
# Required to build with gcc 4.3 and later:
CFLAGS += "-fgnu89-inline"

View File

@ -1,27 +0,0 @@
Upstream-Status: Pending
automake 1.12 has depricated automatic de-ANSI-fication support
this patch avoids these kinds of errors:
| configure.ac:90: error: automatic de-ANSI-fication support has been removed
| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from...
| /srv/home/nitin/builds/build-gcc47/tmp/work/i586-poky-linux/diffutils-2.8.1-r4/diffutils-2.8.1/m4/prereq.m4:110: jm_PREREQ_QUOTEARG is expanded from...
| configure.ac:90: the top level
| autom4te: m4 failed with exit status: 1
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/05/04
Index: diffutils-2.8.1/m4/prereq.m4
===================================================================
--- diffutils-2.8.1.orig/m4/prereq.m4
+++ diffutils-2.8.1/m4/prereq.m4
@@ -115,7 +115,6 @@ AC_DEFUN([jm_PREREQ_QUOTEARG],
AC_HEADER_STDC
AC_C_BACKSLASH_A
AC_MBSTATE_T
- AM_C_PROTOTYPES
])
AC_DEFUN([jm_PREREQ_REGEX],

View File

@ -1,31 +0,0 @@
Fixes to allow diffutils to build with gcc v6.
RP
2016/5/25
Index: diffutils-2.8.1/lib/posix/regex.h
===================================================================
--- diffutils-2.8.1.orig/lib/posix/regex.h
+++ diffutils-2.8.1/lib/posix/regex.h
@@ -529,7 +529,9 @@ extern int re_exec _RE_ARGS ((const char
/* For now unconditionally define __restrict_arr to expand to nothing.
Ideally we would have a test for the compiler which allows defining
it to restrict. */
+#ifndef __restrict_arr
#define __restrict_arr
+#endif
/* POSIX compatibility. */
extern int regcomp _RE_ARGS ((regex_t *__restrict __preg,
Index: diffutils-2.8.1/src/diff.c
===================================================================
--- diffutils-2.8.1.orig/src/diff.c
+++ diffutils-2.8.1/src/diff.c
@@ -71,6 +71,7 @@ static void usage (void);
static bool recursive;
/* In context diffs, show previous lines that match these regexps. */
+struct re_pattern_buffer function_regexp;
static struct regexp_list function_regexp_list;
/* Ignore changes affecting only lines that match these regexps. */

View File

@ -1,17 +0,0 @@
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
require diffutils.inc
PR = "r7.0"
SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.gz \
file://diffutils_fix_for_automake-1.12.patch \
file://fix_gcc6.patch"
SRC_URI[md5sum] = "71f9c5ae19b60608f6c7f162da86a428"
SRC_URI[sha256sum] = "c5001748b069224dd98bf1bb9ee877321c7de8b332c8aad5af3e2a7372d23f5a"
do_configure_prepend () {
chmod u+w ${S}/po/Makefile.in.in
}

View File

@ -1,20 +0,0 @@
SUMMARY = "Line-oriented text editor"
HOMEPAGE = "http://www.gnu.org/software/ed/"
SECTION = "base"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=6ddd5335ef96fb858a138230af773710 \
file://main.c;beginline=1;endline=17;md5=36d4b85e5ae9028e918d1cc775c2475e"
PR = "r2"
SRC_URI = "${SAVANNAH_GNU_MIRROR}/ed/ed-${PV}.tar.bz2"
SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632"
SRC_URI[sha256sum] = "edef2bbde0fbf0d88232782a0eded323f483a0519d6fde9a3b1809056fd35f3e"
inherit autotools texinfo
EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}' 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'"
CONFIGUREOPTS_remove = "--disable-dependency-tracking"
CONFIGUREOPTS_remove = "--disable-silent-rules"
EXTRA_OECONF_remove = "--disable-static"

View File

@ -1,53 +0,0 @@
From 33cba24cba7b0973a702e9627bd5b93962948ae4 Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Tue, 17 Sep 2013 16:11:16 +0800
Subject: [PATCH] findutils: fix doc build error
Upstream-Status: Backport
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
doc/find.texi | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/doc/find.texi b/doc/find.texi
index 5b5f0cf..b3d9c6b 100644
--- a/doc/find.texi
+++ b/doc/find.texi
@@ -63,7 +63,7 @@ translation approved by the Foundation.
@page
@vskip 0pt plus 1filll
-@insertcopying{}
+@insertcopying
@end titlepage
@contents
@@ -1466,6 +1466,7 @@ no output is ever sent to it.
* Escapes::
* Format Directives::
* Time Formats::
+* Formatting Flags::
@end menu
@node Escapes
@@ -1534,7 +1535,6 @@ from the novel you are reading.
* Size Directives::
* Location Directives::
* Time Directives::
-* Formatting Flags::
@end menu
@node Name Directives
@@ -1780,7 +1780,7 @@ setting the TZ environment variable). This is a GNU extension.
@end table
@node Formatting Flags
-@subsubsection Formatting Flags
+@subsection Formatting Flags
The @samp{%m} and @samp{%d} directives support the @samp{#}, @samp{0}
and @samp{+} flags, but the other directives do not, even if they
--
1.7.4.1

View File

@ -1,23 +0,0 @@
Upstream-Status: Pending
automake 1.12 has depricated automatic de-ANSI-fication support
this patch avoids these kinds of errors:
| configure.in:75: error: automatic de-ANSI-fication support has been removed
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/05/04
Index: findutils-4.2.31/configure.in
===================================================================
--- findutils-4.2.31.orig/configure.in
+++ findutils-4.2.31/configure.in
@@ -72,7 +72,6 @@ dnl gl_EARLY calls AC_GNU_SOURCE anyway.
AC_ISC_POSIX
-AM_C_PROTOTYPES
AC_PROG_INSTALL
AC_PROG_RANLIB

View File

@ -1,56 +0,0 @@
Upstream-Status: Inappropriate [legacy version]
the old AC_USE_SYSTEM_EXTENSIONS won't work with AC_GNU_SOURCE
against 4.2.31
07/08/2010 - qhe
diff --git a/gnulib/m4/extensions.m4 b/gnulib/m4/extensions.m4
index 143a9e5..0f27ceb 100644
--- a/gnulib/m4/extensions.m4
+++ b/gnulib/m4/extensions.m4
@@ -12,44 +12,6 @@
# enough in this area it's likely we'll need to redefine
# AC_USE_SYSTEM_EXTENSIONS for quite some time.
-# AC_USE_SYSTEM_EXTENSIONS
-# ------------------------
-# Enable extensions on systems that normally disable them,
-# typically due to standards-conformance issues.
-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
-[
- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
- AC_BEFORE([$0], [AC_RUN_IFELSE])
-
- AC_REQUIRE([AC_GNU_SOURCE])
- AC_REQUIRE([AC_AIX])
- AC_REQUIRE([AC_MINIX])
-
- AH_VERBATIM([__EXTENSIONS__],
-[/* Enable extensions on Solaris. */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
-#endif
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# undef _POSIX_PTHREAD_SEMANTICS
-#endif
-#ifndef _TANDEM_SOURCE
-# undef _TANDEM_SOURCE
-#endif])
- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
- [ac_cv_safe_to_define___extensions__],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([
-# define __EXTENSIONS__ 1
- AC_INCLUDES_DEFAULT])],
- [ac_cv_safe_to_define___extensions__=yes],
- [ac_cv_safe_to_define___extensions__=no])])
- test $ac_cv_safe_to_define___extensions__ = yes &&
- AC_DEFINE([__EXTENSIONS__])
- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
- AC_DEFINE([_TANDEM_SOURCE])
-])
-
# gl_USE_SYSTEM_EXTENSIONS
# ------------------------
# Enable extensions on systems that normally disable them,

View File

@ -1,14 +0,0 @@
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
PR = "r4"
require findutils.inc
SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
file://gnulib-extension.patch \
file://findutils_fix_for_automake-1.12.patch \
file://findutils-fix-doc-build-error.patch \
"
SRC_URI[md5sum] = "a0e31a0f18a49709bf5a449867c8049a"
SRC_URI[sha256sum] = "e0d34b8faca0b3cca0703f6c6b498afbe72f0ba16c35980c10ec9ef7724d6204"

View File

@ -1,67 +0,0 @@
From 53496e2e306b16ac59801553f775bcca164e6a39 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net>
Date: Wed, 14 Sep 2016 16:20:37 +0100
Subject: [PATCH] fix gcc >= 4 compilation
| ../gawk-3.1.5/hard-locale.h: In function 'hard_locale':
| ../gawk-3.1.5/hard-locale.h:43:20: error: invalid storage class for function 'xmalloc'
| static ptr_t xmalloc PARAMS ((size_t n));
| ^~~~~~~
| ../gawk-3.1.5/hard-locale.h:45:22: warning: implicit declaration of function 'xmalloc' [-Wimplicit-function-declaration]
| char *locale = xmalloc (strlen (p) + 1);
| ^~~~~~~
| ../gawk-3.1.5/hard-locale.h:45:22: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
| ../gawk-3.1.5/dfa.c: At top level:
| ../gawk-3.1.5/dfa.c:125:14: error: conflicting types for 'xmalloc'
| static ptr_t xmalloc PARAMS ((size_t n));
| ^~~~~~~
| In file included from ../gawk-3.1.5/dfa.c:112:0:
| ../gawk-3.1.5/hard-locale.h:45:22: note: previous implicit declaration of 'xmalloc' was here
| char *locale = xmalloc (strlen (p) + 1);
| ^~~~~~~
Upstream-Status: Inappropriate [required for gawk 3.1.5 (GPLv2) recipe only]
Signed-off-by: André Draszik <git@andred.net>
---
dfa.c | 2 +-
hard-locale.h | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/dfa.c b/dfa.c
index 71e3736..97f6045 100644
--- a/dfa.c
+++ b/dfa.c
@@ -109,6 +109,7 @@ extern void free();
#include "regex.h"
#include "dfa.h"
+static ptr_t xmalloc PARAMS ((size_t n));
#include "hard-locale.h"
/* HPUX, define those as macros in sys/param.h */
@@ -122,7 +123,6 @@ extern void free();
static void dfamust PARAMS ((struct dfa *dfa));
static ptr_t xcalloc PARAMS ((size_t n, size_t s));
-static ptr_t xmalloc PARAMS ((size_t n));
static ptr_t xrealloc PARAMS ((ptr_t p, size_t n));
#ifdef DEBUG
static void prtok PARAMS ((token t));
diff --git a/hard-locale.h b/hard-locale.h
index 0f4986b..9ee57e0 100644
--- a/hard-locale.h
+++ b/hard-locale.h
@@ -40,8 +40,6 @@ hard_locale (int category)
if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0)
hard = 0;
# else
- static ptr_t xmalloc PARAMS ((size_t n));
-
char *locale = xmalloc (strlen (p) + 1);
strcpy (locale, p);
--
2.9.3

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