strace: Fix build for arc, metag, nios2, or1k, tile
PATCH 1/7 strace: Fix build for arc, metag, nios2, or1k, tile
Upstream strace 4.11 does not build for arc, metag, nios2, or1k, tile. Backport patch from strace git master to fix the build issue.
--- .../0001-arc-metag-nios2-or1k-tile-fix-build.patch | 116 +++++++++++++++++++++ meta/recipes-devtools/strace/strace_4.11.bb | 1 + 2 files changed, 117 insertions(+) create mode 100644 meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch
meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch new file +116 -0
@@ -0,0 +1,116 @@ +From dd1a80c8d213eed95fe55b7ebcb07ee165dd8e4b Mon Sep 17 00:00:00 2001 +From: "Dmitry V. Levin" <[email protected]> +Date: Thu, 24 Dec 2015 15:40:55 +0000 +Subject: [PATCH] arc, metag, nios2, or1k, tile: fix build + +Fix build regression introduced by commit +34683e3926d8c2daa368afb805da422ee7043396. + +* linux/32/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap. +* linux/arc/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap_pgoff. +* linux/nios2/syscallent.h: Likewise. +* linux/or1k/syscallent.h: Likewise. +* linux/tile/syscallent1.h: Add sys_ prefix to ARCH_mmap and sys_mmap_4koff. +* pathtrace.c (pathtrace_match): Handle SEN_ARCH_mmap. +* NEWS: Mention this build fix. + +Reported-by: Alexey Brodkin <[email protected]> +Upstream-Status: Backport +--- + NEWS | 3 +++ + linux/32/syscallent.h | 6 +++--- + linux/arc/syscallent.h | 2 +- + linux/nios2/syscallent.h | 2 +- + linux/or1k/syscallent.h | 2 +- + linux/tile/syscallent1.h | 2 +- + pathtrace.c | 1 + + 7 files changed, 11 insertions(+), 7 deletions(-) + +diff --git a/NEWS b/NEWS +index fe40ca4..09263eb 100644 +--- a/NEWS ++++ b/NEWS +@@ -1,3 +1,9 @@ ++Noteworthy changes in release ?.?? (????-??-??) ++=============================================== ++ ++* Bug fixes ++ * Fixed build on arc, metag, nios2, or1k, and tile architectures. ++ + Noteworthy changes in release 4.11 (2015-12-21) + =============================================== + +diff --git a/linux/32/syscallent.h b/linux/32/syscallent.h +index 5f997e7..e6f895c 100644 +--- a/linux/32/syscallent.h ++++ b/linux/32/syscallent.h +@@ -1,5 +1,5 @@ +-#ifndef ARCH_mmap +-# define ARCH_mmap mmap ++#ifndef sys_ARCH_mmap ++# define sys_ARCH_mmap sys_mmap + #endif + [ 0] = { 2, 0, SEN(io_setup), "io_setup" }, + [ 1] = { 1, 0, SEN(io_destroy), "io_destroy" }, +@@ -276,5 +276,5 @@ + [283] = { 2, 0, SEN(membarrier), "membarrier", }, + [284] = { 3, TM, SEN(mlock2), "mlock2" }, + +-#undef ARCH_mmap ++#undef sys_ARCH_mmap + #undef ARCH_WANT_SYNC_FILE_RANGE2 +diff --git a/linux/arc/syscallent.h b/linux/arc/syscallent.h +index 5847dc4..1100008 100644 +--- a/linux/arc/syscallent.h ++++ b/linux/arc/syscallent.h +@@ -1,4 +1,4 @@ +-#define ARCH_mmap mmap_pgoff ++#define sys_ARCH_mmap sys_mmap_pgoff + #include "32/syscallent.h" + [244] = { 3, 0, SEN(printargs), "arc_cacheflush"}, + [245] = { 1, 0, SEN(printargs), "arc_settls" }, +diff --git a/linux/nios2/syscallent.h b/linux/nios2/syscallent.h +index 8a4b70e..01efe3a 100644 +--- a/linux/nios2/syscallent.h ++++ b/linux/nios2/syscallent.h +@@ -1,4 +1,4 @@ +-#define ARCH_mmap mmap_pgoff ++#define sys_ARCH_mmap sys_mmap_pgoff + #include "32/syscallent.h" + [244] = {4, 0, SEN(cacheflush), "cacheflush"}, + [245 ... 259] = { }, +diff --git a/linux/or1k/syscallent.h b/linux/or1k/syscallent.h +index ed84b3b..351fe25 100644 +--- a/linux/or1k/syscallent.h ++++ b/linux/or1k/syscallent.h +@@ -1,4 +1,4 @@ +-#define ARCH_mmap mmap_pgoff ++#define sys_ARCH_mmap sys_mmap_pgoff + #include "32/syscallent.h" + [244] = { 3, NF, SEN(or1k_atomic), "or1k_atomic" }, + [245 ... 259] = { }, +diff --git a/linux/tile/syscallent1.h b/linux/tile/syscallent1.h +index c86f059..28dbab4 100644 +--- a/linux/tile/syscallent1.h ++++ b/linux/tile/syscallent1.h +@@ -1,4 +1,4 @@ +-#define ARCH_mmap mmap_4koff ++#define sys_ARCH_mmap sys_mmap_4koff + #define ARCH_WANT_SYNC_FILE_RANGE2 1 + #include "32/syscallent.h" + [244] = { 1, 0, SEN(printargs), "cmpxchg_badaddr" }, +diff --git a/pathtrace.c b/pathtrace.c +index d530ec2..e72cdf7 100644 +--- a/pathtrace.c ++++ b/pathtrace.c +@@ -216,6 +216,7 @@ pathtrace_match(struct tcb *tcp) + case SEN_mmap: + case SEN_mmap_4koff: + case SEN_mmap_pgoff: ++ case SEN_ARCH_mmap: + /* x, x, x, x, fd */ + return fdmatch(tcp, tcp->u_arg[4]); + +-- +2.6.4 +
meta/recipes-devtools/strace/strace_4.11.bb +1 -0
@@ -8,6 +8,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \ file://disable-git-version-gen.patch \ file://more-robust-test-for-m32-mx32-compile-support.patch \ file://update-gawk-paths.patch \ + file://0001-arc-metag-nios2-or1k-tile-fix-build.patch \ file://Makefile-ptest.patch \ file://run-ptest \ "
Signature · 1 line
2.1.4
PATCH 2/7 binutils: Repair nios2 PLT and GP handling
Repair corner cases in nios2 PLT and GP handling. See the patches themselves for extensive detailed explanation.
The patches don't contain the ChangeLog entries, since the changelog entries often cause trouble when applying the patch.
--- meta/recipes-devtools/binutils/binutils-2.25.1.inc | 2 + ...ress-computations-in-initial-PLT-entries-.patch | 72 ++++++++++++++ ...018-Correct-nios2-_gp-address-computation.patch | 106 +++++++++++++++++++++ 3 files changed, 180 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/0017-Fix-GOT-address-computations-in-initial-PLT-entries-.patch create mode 100644 meta/recipes-devtools/binutils/binutils/0018-Correct-nios2-_gp-address-computation.patch
meta/recipes-devtools/binutils/binutils-2.25.1.inc +2 -0
@@ -36,6 +36,8 @@ SRC_URI = "\ file://0014-gold-arm-Skip-pic-check-for-R_ARM_REL32.patch \ file://0015-Fix-dynamic-list-so-that-symbols-not-in-the-list-are.patch \ file://0016-This-patch-adds-IFUNC-support-for-arm-gold-backend.patch \ + file://0017-Fix-GOT-address-computations-in-initial-PLT-entries-.patch \ + file://0018-Correct-nios2-_gp-address-computation.patch \ file://binutils-octeon3.patch \ file://add-thunderx-support-for-gas.patch \ "
meta/recipes-devtools/binutils/binutils/0017-Fix-GOT-address-computations-in-initial-PLT-entries-.patch new file +72 -0
72 lines not on this page · raw message
meta/recipes-devtools/binutils/binutils/0018-Correct-nios2-_gp-address-computation.patch new file +106 -0
106 lines not on this page · raw message
Signature · 1 line
2.1.4
Re: [PATCH 2/7] binutils: Repair nios2 PLT and GP handling
Quoted 5 lines · Marek Vasut
meta/recipes-devtools/binutils/binutils/0017-Fix-GOT-address-computations-in-initial-PLT-entries-.patch new file +4
-0+From 33d4099fc891760ea1f080746dee4dcfc36c757c Mon Sep 17 00:00:00 2001 +From: Sandra Loosemore <[email protected]> +Date: Wed, 9 Dec 2015 16:13:58 -0800 +Subject: [PATCH] Fix GOT address computations in initial PLT entries for
meta/recipes-devtools/binutils/binutils/0017-Fix-GOT-address-computations-in-initial-PLT-entries-.patch line 14
Quoted 10 lines
meta/recipes-devtools/binutils/binutils/0017-Fix-GOT-address-computations-in-initial-PLT-entries-.patch new file +10
-0+ nios2. + +2015-12-09 Sandra Loosemore <[email protected]> + + bfd/ + * elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Correct + %hiadj/%lo computations for _GLOBAL_OFFSET_TABLE_ in initial + PLT entries. Assert alignment requirements. + +Upstream-Status: Backport
These patches need your Signed-off-by.
Ross
PATCH v2 2/7 binutils: Repair nios2 PLT and GP handling
In reply to Marek VasutRepair corner cases in nios2 PLT and GP handling. See the patches themselves for extensive detailed explanation.
The patches don't contain the ChangeLog entries, since the changelog entries often cause trouble when applying the patch.
--- meta/recipes-devtools/binutils/binutils-2.25.1.inc | 2 + ...ress-computations-in-initial-PLT-entries-.patch | 73 ++++++++++++++ ...018-Correct-nios2-_gp-address-computation.patch | 107 +++++++++++++++++++++ 3 files changed, 182 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/0017-Fix-GOT-address-computations-in-initial-PLT-entries-.patch create mode 100644 meta/recipes-devtools/binutils/binutils/0018-Correct-nios2-_gp-address-computation.patch
V2: Add missing SoB lines to the backported patches
meta/recipes-devtools/binutils/binutils-2.25.1.inc +2 -0
@@ -36,6 +36,8 @@ SRC_URI = "\ file://0014-gold-arm-Skip-pic-check-for-R_ARM_REL32.patch \ file://0015-Fix-dynamic-list-so-that-symbols-not-in-the-list-are.patch \ file://0016-This-patch-adds-IFUNC-support-for-arm-gold-backend.patch \ + file://0017-Fix-GOT-address-computations-in-initial-PLT-entries-.patch \ + file://0018-Correct-nios2-_gp-address-computation.patch \ file://binutils-octeon3.patch \ file://add-thunderx-support-for-gas.patch \ "
meta/recipes-devtools/binutils/binutils/0017-Fix-GOT-address-computations-in-initial-PLT-entries-.patch new file +73 -0
73 lines not on this page · raw message
meta/recipes-devtools/binutils/binutils/0018-Correct-nios2-_gp-address-computation.patch new file +107 -0
107 lines not on this page · raw message
Signature · 1 line
2.1.4
Re: [PATCH V2 2/7] binutils: Repair nios2 PLT and GP handling
Quoted 7 lines · Marek Vasut
Repair corner cases in nios2 PLT and GP handling. See the patches themselves for extensive detailed explanation.
The patches don't contain the ChangeLog entries, since the changelog entries often cause trouble when applying the patch.
Signed-off-by Marek Vasut <[email protected]>
We've got binutils 2.26 in master now, can you rebase and retest this?
Cheers,
Ross
Re: [PATCH V2 2/7] binutils: Repair nios2 PLT and GP handling
Quoted 10 lines · Ross
Quoted 7 lines · Marek Vasut
Repair corner cases in nios2 PLT and GP handling. See the patches themselves for extensive detailed explanation.
The patches don't contain the ChangeLog entries, since the changelog entries often cause trouble when applying the patch.
Signed-off-by Marek Vasut <[email protected]>We've got binutils 2.26 in master now, can you rebase and retest this?
I rebased yesterday, well, let's try :-)
Best regards,
Marek Vasut
Re: [PATCH V2 2/7] binutils: Repair nios2 PLT and GP handling
Quoted 4 lines · Marek Vasut
Quoted 3 lines · Ross
Quoted 2 lines · Marek Vasut
Repair corner cases in nios2 PLT and GP handling. See the patches themselves for extensive detailed explanation.
This sentence doesn't really add much value since many patches contain additional description and the logs here are mostly a few lines from the ChangeLog which doesn't count as an extensive detailed explanation in my books. :)
I expect that you're familiar with this but take a look at:
http://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded#Committing_your_patch
Commit with a concise and descriptive message - one that explains your changes in a way others get a short overview without looking at the code.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
The patches don't contain the ChangeLog entries, since the changelog entries often cause trouble when applying the patch.
I'd prefer to see the ChangeLog snippets duplicated in the git log so that it's easier to see what happened.
If you do a v2, please also mention that the patches are backports since that's important to people when they consider whether the patch should be accepted.
Thanks!
Signature · 2 lines
# Randy MacLeod. SMTS, Linux, Wind River Direct: 613.963.1350 | 350 Terry Fox Drive, Suite 200, Ottawa, ON, Canada, K2K 2W5
Re: [PATCH V2 2/7] binutils: Repair nios2 PLT and GP handling
Quoted 10 lines · Randy MacLeod
Quoted 4 lines · Marek Vasut
Quoted 3 lines · Ross
Quoted 2 lines · Marek Vasut
Repair corner cases in nios2 PLT and GP handling. See the patches themselves for extensive detailed explanation.
This sentence doesn't really add much value since many patches contain additional description and the logs here are mostly a few lines from the ChangeLog which doesn't count as an extensive detailed explanation in my books. :)
It's not from changelog, it's from the commit message. The real answer is that it fixes incorrect computation of the GOT/PLT offsets in case these tables grow too large. Then there's some sort of off-by-four error in the computation, which causes linking to fail. It happens in one or two packages in yocto. I had these patches in my tree for a bit, so my memory is a little unclear on the gruesome details already.
Quoted 7 lines
I expect that you're familiar with this but take a look at:
http://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded#Committing_your_patchCommit with a concise and descriptive message - one that explains your changes in a way others get a short overview without looking at the code.
Yes, I hope it's there.
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
The patches don't contain the ChangeLog entries, since the changelog entries often cause trouble when applying the patch.
I'd prefer to see the ChangeLog snippets duplicated in the git log so that it's easier to see what happened.
You actually want to avoid that, since it'd make it really hard to apply these patches onto subsequent versions of binutils if this was necessary. I hope this won't be necessary and will be dropped once the next version of binutils arrives. The change which happened is in the patch's commit message, but it seems like some of the binutils guys are not very fond of writing extensive explanation.
Quoted 3 lines
If you do a v2, please also mention that the patches are backports since that's important to people when they consider whether the patch should be accepted.
This is a V2 ;-)
There is "Upstream-Status: Backport" for each of the patches, it's actually needed to track the status.
Best regards,
Marek Vasut
PATCH 3/7 dpkg: Update to 1.18.4
In reply to Marek VasutUpdate dpkg version to 1.18.4 . This adds nios2 architecture support among other fixes. One patch was updated so it would apply again.
---
...g-do_package_write_deb-we-have-trees-of-h.patch | 52 +++++++++++++---------
.../dpkg/{dpkg_1.18.2.bb => dpkg_1.18.4.bb} | 4 +-
2 files changed, 32 insertions(+), 24 deletions(-)
rename meta/recipes-devtools/dpkg/{dpkg_1.18.2.bb => dpkg_1.18.4.bb} (84%)meta/recipes-devtools/dpkg/dpkg/0001-When-running-do_package_write_deb-we-have-trees-of-h.patch +30 -22
@@ -1,7 +1,7 @@ -From d14ffd786993da60ca84c4812da8a6594a8c764e Mon Sep 17 00:00:00 2001 +From e391bdba238d1371fc5b67cdae08b06eb5ada5c2 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <[email protected]> Date: Wed, 26 Aug 2015 15:48:13 +0300 -Subject: [PATCH 1/5] When running do_package_write_deb, we have trees of +Subject: [PATCH] When running do_package_write_deb, we have trees of hardlinked files such as the dbg source files in ${PN}-dbg. If something makes another copy of one of those files (or deletes one), the number of links a file has changes and tar can notice this, e.g.:
@@ -19,23 +19,43 @@ place to avoid that kind of issue). Upstream-Status: Inappropriate RP 2015/3/27 --- - dpkg-deb/build.c | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) + dpkg-deb/build.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c -index ea3d861..1589927 100644 +index 2ddeec6..af363f0 100644 --- a/dpkg-deb/build.c +++ b/dpkg-deb/build.c -@@ -458,7 +458,7 @@ do_build(const char *const *argv) +@@ -452,7 +452,7 @@ static void + tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder, + struct compress_params *tar_compress_params, int fd_out) + { +- int pipe_filenames[2], pipe_tarball[2]; ++ int pipe_filenames[2], pipe_tarball[2], rc; + pid_t pid_tar, pid_comp; + + /* Fork off a tar. We will feed it a list of filenames on stdin later. */ +@@ -493,7 +493,9 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder, + /* All done, clean up wait for tar and <compress> to finish their job. */ + close(pipe_filenames[1]); + subproc_reap(pid_comp, _("<compress> from tar -cf"), 0); +- subproc_reap(pid_tar, "tar -cf", 0); ++ rc = subproc_reap(pid_tar, "tar -cf", SUBPROC_RETERROR); ++ if (rc && rc != 1) ++ ohshite(_("subprocess %s returned error exit status %d"), "tar -cf", rc); + } + + /** +@@ -509,7 +511,7 @@ do_build(const char *const *argv) char *debar; char *tfbuf; int arfd; -- int p1[2], p2[2], gzfd; -+ int p1[2], p2[2], gzfd, rc; +- int p1[2], gzfd; ++ int p1[2], gzfd, rc; pid_t c1, c2; /* Decode our arguments. */ -@@ -538,7 +538,9 @@ do_build(const char *const *argv) +@@ -590,7 +592,9 @@ do_build(const char *const *argv) } close(p1[0]); subproc_reap(c2, _("<compress> from tar -cf"), 0);
@@ -46,18 +66,6 @@ index ea3d861..1589927 100644 if (lseek(gzfd, 0, SEEK_SET)) ohshite(_("failed to rewind temporary file (%s)"), _("control member")); -@@ -626,7 +628,10 @@ do_build(const char *const *argv) - /* All done, clean up wait for tar and <compress> to finish their job. */ - close(p1[1]); - subproc_reap(c2, _("<compress> from tar -cf"), 0); -- subproc_reap(c1, "tar -cf", 0); -+ rc = subproc_reap(c1, "tar -cf", SUBPROC_RETERROR); -+ if (rc && rc != 1) -+ ohshite(_("subprocess %s returned error exit status %d"), "tar -cf", rc); -+ - /* Okay, we have data.tar as well now, add it to the ar wrapper. */ - if (deb_format.major == 2) { - char datamember[16 + 1]; -- -2.1.4 +2.7.0
meta/recipes-devtools/dpkg/dpkg_1.18.4.bb renamed from meta/recipes-devtools/dpkg/dpkg_1.18.2.bb +2 -2
@@ -15,6 +15,6 @@ SRC_URI += "file://noman.patch \ file://0006-add-musleabi-to-known-target-tripets.patch \ " -SRC_URI[md5sum] = "63b9d869081ec49adeef6c5ff62d6576" -SRC_URI[sha256sum] = "11484f2a73d027d696e720a60380db71978bb5c06cd88fe30c291e069ac457a4" +SRC_URI[md5sum] = "e95b513c89693f6ec3ab53b6b1c3defd" +SRC_URI[sha256sum] = "fe89243868888ce715bf45861f26264f767d4e4dbd0d6f1a26ce60bbbbf106da"
Signature · 1 line
2.1.4
PATCH 4/7 guile: Fix nios2 support
In reply to Marek VasutAdd minor patch to recognize nios2 build target.
--- ...002-Recognize-nios2-as-compilation-target.patch | 36 ++++++++++++++++++++++ meta/recipes-devtools/guile/guile_2.0.11.bb | 1 + 2 files changed, 37 insertions(+) create mode 100644 meta/recipes-devtools/guile/files/0002-Recognize-nios2-as-compilation-target.patch
meta/recipes-devtools/guile/files/0002-Recognize-nios2-as-compilation-target.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 76155065c70b5ab65c6c805423183b360141db84 Mon Sep 17 00:00:00 2001 +From: Marek Vasut <[email protected]> +Date: Thu, 28 Jan 2016 04:46:23 +0100 +Subject: [PATCH] Recognize nios2 as compilation target + +Signed-off-by: Marek Vasut <[email protected]> +Upstream-Status: Submitted [ http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22480 ] +--- + module/system/base/target.scm | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/module/system/base/target.scm b/module/system/base/target.scm +index d60a8e0..d1f6cff 100644 +--- a/module/system/base/target.scm ++++ b/module/system/base/target.scm +@@ -65,7 +65,7 @@ + (cond ((string-match "^i[0-9]86$" cpu) + (endianness little)) + ((member cpu '("x86_64" "ia64" +- "powerpcle" "powerpc64le" "mipsel" "mips64el")) ++ "powerpcle" "powerpc64le" "mipsel" "mips64el" "nios2")) + (endianness little)) + ((member cpu '("sparc" "sparc64" "powerpc" "powerpc64" "spu" + "mips" "mips64")) +@@ -100,7 +100,7 @@ + + ((string-match "64$" cpu) 8) + ((string-match "64[lbe][lbe]$" cpu) 8) +- ((member cpu '("sparc" "powerpc" "mips" "mipsel")) 4) ++ ((member cpu '("sparc" "powerpc" "mips" "mipsel" "nios2")) 4) + ((string-match "^arm.*" cpu) 4) + (else (error "unknown CPU word size" cpu))))) + +-- +2.7.0.rc3 +
meta/recipes-devtools/guile/guile_2.0.11.bb +1 -0
@@ -25,6 +25,7 @@ SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.xz \ file://libguile-VM-ASM_MUL-for-ARM-Add-earlyclobber.patch \ file://remove_strcase_l_funcs.patch \ file://0001-libguile-Check-for-strtol_l-during-configure.patch \ + file://0002-Recognize-nios2-as-compilation-target.patch \ " # file://debian/0001-Change-guile-to-guile-X.Y-for-info-pages.patch
Signature · 1 line
2.1.4
PATCH 5/7 nspr: Add nios2 support
In reply to Marek VasutAdd small patch to support nios2 in NSPR.
--- .../nspr/nspr/0002-Add-nios2-support.patch | 105 +++++++++++++++++++++ meta/recipes-support/nspr/nspr_4.11.bb | 1 + 2 files changed, 106 insertions(+) create mode 100644 meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch
meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch new file +105 -0
@@ -0,0 +1,105 @@ +From 95bda64fb4cf1825fea745e918cfe8202843f0ba Mon Sep 17 00:00:00 2001 +From: Marek Vasut <[email protected]> +Date: Sat, 30 Jan 2016 07:18:02 +0100 +Subject: [PATCH] Add nios2 support + +Add support for the nios2 CPU. + +Signed-off-by: Marek Vasut <[email protected]> +Upstream-Status: Submitted [ https://bugzilla.mozilla.org/show_bug.cgi?id=1244421 ] +--- + nspr/pr/include/md/_linux.cfg | 45 +++++++++++++++++++++++++++++++++++++++++++ + nspr/pr/include/md/_linux.h | 14 ++++++++++++++ + 2 files changed, 59 insertions(+) + +diff --git a/pr/include/md/_linux.cfg b/nspr/pr/include/md/_linux.cfg +index 8cbf0cb..150676b 100644 +--- a/pr/include/md/_linux.cfg ++++ b/pr/include/md/_linux.cfg +@@ -972,6 +972,51 @@ + #define PR_BYTES_PER_WORD_LOG2 2 + #define PR_BYTES_PER_DWORD_LOG2 3 + ++#elif defined(__nios2__) ++ ++#define IS_LITTLE_ENDIAN 1 ++#undef IS_BIG_ENDIAN ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 4 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 4 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 32 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 32 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 5 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 5 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 4 ++#define PR_ALIGN_OF_INT64 4 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 4 ++#define PR_ALIGN_OF_POINTER 4 ++#define PR_ALIGN_OF_WORD 4 ++ ++#define PR_BYTES_PER_WORD_LOG2 2 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ + #elif defined(__or1k__) + + #undef IS_LITTLE_ENDIAN +diff --git a/pr/include/md/_linux.h b/nspr/pr/include/md/_linux.h +index d378db5..18260be 100644 +--- a/pr/include/md/_linux.h ++++ b/pr/include/md/_linux.h +@@ -55,6 +55,8 @@ + #define _PR_SI_ARCHITECTURE "avr32" + #elif defined(__m32r__) + #define _PR_SI_ARCHITECTURE "m32r" ++#elif defined(__nios2__) ++#define _PR_SI_ARCHITECTURE "nios2" + #elif defined(__or1k__) + #define _PR_SI_ARCHITECTURE "or1k" + #else +@@ -125,6 +127,18 @@ extern PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval); + #define _MD_ATOMIC_SET _PR_x86_64_AtomicSet + #endif + ++#if defined(__nios2__) ++#if defined(__GNUC__) ++/* Use GCC built-in functions */ ++#define _PR_HAVE_ATOMIC_OPS ++#define _MD_INIT_ATOMIC() ++#define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1) ++#define _MD_ATOMIC_DECREMENT(ptr) __sync_sub_and_fetch(ptr, 1) ++#define _MD_ATOMIC_ADD(ptr, i) __sync_add_and_fetch(ptr, i) ++#define _MD_ATOMIC_SET(ptr, nv) __sync_lock_test_and_set(ptr, nv) ++#endif ++#endif ++ + #if defined(__or1k__) + #if defined(__GNUC__) + /* Use GCC built-in functions */ +-- +2.7.0.rc3 +
meta/recipes-support/nspr/nspr_4.11.bb +1 -0
@@ -9,6 +9,7 @@ SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz file://remove-rpath-from-tests.patch \ file://fix-build-on-x86_64.patch \ file://remove-srcdir-from-configure-in.patch \ + file://0002-Add-nios2-support.patch \ " SRC_URI += "file://nspr.pc.in"
Signature · 1 line
2.1.4
PATCH 6/7 liburcu: Add nios2 support
In reply to Marek VasutAdd support for the nios2 into the liburcu.
--- .../0001-Support-for-NIOS2-architecture.patch | 144 +++++++++++++++++++++ meta/recipes-support/liburcu/liburcu_0.9.1.bb | 8 +- 2 files changed, 149 insertions(+), 3 deletions(-) create mode 100644 meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch
meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch new file +144 -0
@@ -0,0 +1,144 @@ +From add566b913e1b5cd4974a2167157dc08d8245ab0 Mon Sep 17 00:00:00 2001 +From: Marek Vasut <[email protected]> +Date: Tue, 9 Feb 2016 01:52:26 +0100 +Subject: [PATCH] Support for NIOS2 architecture + +Add support for the Altera NIOS2 CPU archirecture. The atomic operations +are handled by the GCC. The memory barriers on this systems are entirely +trivial too, since the CPU does not support SMP at all. + +Signed-off-by: Marek Vasut <[email protected]> +Upstream-Status: Pending +--- + LICENSE | 1 + + README.md | 1 + + configure.ac | 1 + + urcu/arch/nios2.h | 40 ++++++++++++++++++++++++++++++++++++++++ + urcu/uatomic/nios2.h | 32 ++++++++++++++++++++++++++++++++ + 5 files changed, 75 insertions(+) + create mode 100644 urcu/arch/nios2.h + create mode 100644 urcu/uatomic/nios2.h + +diff --git a/LICENSE b/LICENSE +index 3147094..a06fdcc 100644 +--- a/LICENSE ++++ b/LICENSE +@@ -45,6 +45,7 @@ compiler.h + arch/s390.h + uatomic/alpha.h + uatomic/mips.h ++uatomic/nios2.h + uatomic/s390.h + system.h + +diff --git a/README.md b/README.md +index f6b290f..6fe9c1e 100644 +--- a/README.md ++++ b/README.md +@@ -43,6 +43,7 @@ Currently, the following architectures are supported: + - S390, S390x + - ARM 32/64 + - MIPS ++ - NIOS2 + - Alpha + - ia64 + - Sparcv9 32/64 +diff --git a/configure.ac b/configure.ac +index 39a7777..71a7d71 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -124,6 +124,7 @@ AS_CASE([$host_cpu], + [arm*], [ARCHTYPE="arm"], + [aarch64], [ARCHTYPE="aarch64"], + [mips*], [ARCHTYPE="mips"], ++ [nios2*], [ARCHTYPE="nios2"], + [tile*], [ARCHTYPE="tile"], + [hppa*], [ARCHTYPE="hppa"], + [ARCHTYPE="unknown"] +diff --git a/urcu/arch/nios2.h b/urcu/arch/nios2.h +new file mode 100644 +index 0000000..030d1bc +--- /dev/null ++++ b/urcu/arch/nios2.h +@@ -0,0 +1,40 @@ ++#ifndef _URCU_ARCH_NIOS2_H ++#define _URCU_ARCH_NIOS2_H ++ ++/* ++ * arch_mips.h: trivial definitions for the NIOS2 architecture. ++ * ++ * Copyright (c) 2016 Marek Vasut <[email protected]> ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ */ ++ ++#include <urcu/compiler.h> ++#include <urcu/config.h> ++#include <urcu/syscall-compat.h> ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#define cmm_mb() __asm__ __volatile__ ("":::"memory") ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#include <urcu/arch/generic.h> ++ ++#endif /* _URCU_ARCH_NIOS2_H */ +diff --git a/urcu/uatomic/nios2.h b/urcu/uatomic/nios2.h +new file mode 100644 +index 0000000..5b3c303 +--- /dev/null ++++ b/urcu/uatomic/nios2.h +@@ -0,0 +1,32 @@ ++#ifndef _URCU_UATOMIC_ARCH_NIOS2_H ++#define _URCU_UATOMIC_ARCH_NIOS2_H ++ ++/* ++ * Atomic exchange operations for the NIOS2 architecture. Let GCC do it. ++ * ++ * Copyright (c) 2016 Marek Vasut <[email protected]> ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a copy ++ * of this software and associated documentation files (the "Software"), to ++ * deal in the Software without restriction, including without limitation the ++ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or ++ * sell copies of the Software, and to permit persons to whom the Software is ++ * furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included in ++ * all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS ++ * IN THE SOFTWARE. ++ */ ++ ++#include <urcu/compiler.h> ++#include <urcu/system.h> ++#include <urcu/uatomic/generic.h> ++ ++#endif /* _URCU_UATOMIC_ARCH_NIOS2_H */ +-- +2.7.0 +
meta/recipes-support/liburcu/liburcu_0.9.1.bb +5 -3
@@ -3,12 +3,14 @@ HOMEPAGE = "http://lttng.org/urcu" BUGTRACKER = "http://lttng.org/project/issues" LICENSE = "LGPLv2.1+ & MIT-style" -LIC_FILES_CHKSUM = "file://LICENSE;md5=0f060c30a27922ce9c0d557a639b4fa3 \ +LIC_FILES_CHKSUM = "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \ file://urcu.h;beginline=4;endline=32;md5=4de0d68d3a997643715036d2209ae1d9 \ file://urcu/uatomic/x86.h;beginline=4;endline=21;md5=58e50bbd8a2f073bb5500e6554af0d0b" -SRC_URI = "http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2 \ - " +SRC_URI = " \ + http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2 \ + file://0001-Support-for-NIOS2-architecture.patch \ + " SRC_URI[md5sum] = "124eaeea06863271c0bdf2a0cc1d8e4b" SRC_URI[sha256sum] = "f8d278e9d95bec97c9ba954fc4c3fb584936bc0010713a8fe358b916bafd8715"
Signature · 1 line
2.1.4
Re: [PATCH 6/7] liburcu: Add nios2 support
meta/recipes-support/liburcu/liburcu_0.9.1.bb HOMEPAGE = "http://lttng.org/urcu" · line 6
Quoted 3 lines · Marek Vasut
meta/recipes-support/liburcu/liburcu_0.9.1.bb +1
-1-LIC_FILES_CHKSUM = "file://LICENSE;md5=0f060c30a27922ce9c0d557a639b4fa3 \ +LIC_FILES_CHKSUM = "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \
Why did the license checksum change?
Ross
Re: [PATCH 6/7] liburcu: Add nios2 support
Quoted 6 lines · Ross
Quoted 3 lines · Marek Vasut
-LIC_FILES_CHKSUM = "file://LICENSE;md5=0f060c30a27922ce9c0d557a639b4fa3 \ +LIC_FILES_CHKSUM = "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \
Why did the license checksum change?
Because the LICENSE file now contains one more entry for nios2, which changed the checksum of the whole file. Maybe we should trim the checksum to use only the header in the LICENSE file and not the whole file to prevent this ?
This is the change which triggered the change of the checksum:
+diff --git a/LICENSE b/LICENSE
+index 3147094..a06fdcc 100644
+--- a/LICENSE
++++ b/LICENSE
+@@ -45,6 +45,7 @@ compiler.h
+ arch/s390.h
+ uatomic/alpha.h
+ uatomic/mips.h++uatomic/nios2.h
+ uatomic/s390.h
+ system.h
+
Best regards,
Marek Vasut
Re: [PATCH 6/7] liburcu: Add nios2 support
Quoted 9 lines · Marek Vasut
Quoted 1 line
Why did the license checksum change?
Because the LICENSE file now contains one more entry for nios2, which changed
the checksum of the whole file. Maybe we should trim the checksum to use only
the header in the LICENSE file and not the whole file to prevent this ?This is the change which triggered the change of the checksum:
Oh yes, right. Thanks!
Ross
Re: [PATCH 6/7] liburcu: Add nios2 support
In reply to Marek VasutQuoted 17 lines · Marek Vasut
Quoted 6 lines · Ross
Quoted 3 lines · Marek Vasut
-LIC_FILES_CHKSUM = "file://LICENSE;md5=0f060c30a27922ce9c0d557a639b4fa3 \ +LIC_FILES_CHKSUM = "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \
Why did the license checksum change?
Because the LICENSE file now contains one more entry for nios2, which changed the checksum of the whole file. Maybe we should trim the checksum to use only the header in the LICENSE file and not the whole file to prevent this ?
This is the change which triggered the change of the checksum:
meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch line 30
Quoted 9 lines
meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch new file +9
-0+diff --git a/LICENSE b/LICENSE +index 3147094..a06fdcc 100644 +--- a/LICENSE ++++ b/LICENSE +@@ -45,6 +45,7 @@ compiler.h + arch/s390.h + uatomic/alpha.h + uatomic/mips.h ++uatomic/nios2.h
I don’t know how the LICENSE file looks like but including file names in license file is probably worth ignoring in checksums.
Quoted 11 lines
+
uatomic/s390.h
+system.h
+Best regards,
Marek Vasut
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [PATCH 6/7] liburcu: Add nios2 support
Quoted 18 lines · Khem Raj
Quoted 18 lines · Marek Vasut
Quoted 7 lines · Ross
Quoted 4 lines · Marek Vasut
-LIC_FILES_CHKSUM = "file://LICENSE;md5=0f060c30a27922ce9c0d557a639b4fa3 \
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \Why did the license checksum change?
Because the LICENSE file now contains one more entry for nios2, which changed the checksum of the whole file. Maybe we should trim the checksum to use only the header in the LICENSE file and not the whole file to prevent this ?
This is the change which triggered the change of the checksum:
Quoted 12 lines
meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch line 30
Quoted 9 lines
meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch new file +9
-0+diff --git a/LICENSE b/LICENSE +index 3147094..a06fdcc 100644 +--- a/LICENSE ++++ b/LICENSE +@@ -45,6 +45,7 @@ compiler.h + arch/s390.h + uatomic/alpha.h + uatomic/mips.h ++uatomic/nios2.hI don’t know how the LICENSE file looks like but including file names in license file is probably worth ignoring in checksums.
See below:
Userspace RCU library licensing
Mathieu Desnoyers
September 3, 2012
* LGPLv2.1
The library part is distributed under LGPLv2.1 or later. See lgpl-2.1.txt for license details. Refer to the individual file headers for details.
LGPL-compatible source code can statically use the library header using :
#define _LGPL_SOURCE
#include <urcu.h>
Dynamic-only linking with the LGPL library is used if _LGPL_SOURCE is not defined. It permits relinking with newer versions of the library, which is required by the LGPL license.
See lgpl-relicensing.txt for details.
* MIT-style license :
xchg() primitive has been rewritten from scratch starting from atomic_ops 1.2 which has a MIT-style license that is intended to allow use in both free and proprietary software:
http://www.hpl.hp.com/research/linux/atomic_ops/LICENSING.txt
http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/
This MIT-style license (BSD like) apply to:
uatomic/gcc.huatomic/unknown.huatomic/generic.huatomic/sparc64.huatomic/arm.huatomic/ppc.huatomic/x86.huatomic.h
MIT/X11 (BSD like) license apply to:
compiler.harch/s390.huatomic/alpha.huatomic/mips.huatomic/nios2.huatomic/s390.hsystem.h
* GPLv2
Library test code is distributed under the GPLv2 license. See gpl-2.0.txt for license details. See headers of individual files under tests/ for details.
* GPLv3 (or later)
The following build-related macro is under GPLv3 (or later):
m4/ax_tls.m4
Re: [PATCH 6/7] liburcu: Add nios2 support
Quoted 93 lines · On Tue, 09 Feb 2016 18:56:09 Marek Vasut wrote:
Quoted 18 lines · Khem Raj
Quoted 18 lines · Marek Vasut
Quoted 7 lines · Ross
Quoted 4 lines · Marek Vasut
-LIC_FILES_CHKSUM = "file://LICENSE;md5=0f060c30a27922ce9c0d557a639b4fa3 \
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \Why did the license checksum change?
Because the LICENSE file now contains one more entry for nios2, which changed the checksum of the whole file. Maybe we should trim the checksum to use only the header in the LICENSE file and not the whole file to prevent this ?
This is the change which triggered the change of the checksum:
Quoted 12 lines
meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch line 30
Quoted 9 lines
meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch new file +9
-0+diff --git a/LICENSE b/LICENSE +index 3147094..a06fdcc 100644 +--- a/LICENSE ++++ b/LICENSE +@@ -45,6 +45,7 @@ compiler.h + arch/s390.h + uatomic/alpha.h + uatomic/mips.h ++uatomic/nios2.hI don’t know how the LICENSE file looks like but including file names in license file is probably worth ignoring in checksums.
See below:
Userspace RCU library licensing
Mathieu Desnoyers
September 3, 2012* LGPLv2.1
The library part is distributed under LGPLv2.1 or later. See lgpl-2.1.txt for license details. Refer to the individual file headers for details.
LGPL-compatible source code can statically use the library header using :
#define
_LGPL_SOURCE
#include <urcu.h>Dynamic-only linking with the LGPL library is used if
_LGPL_SOURCEis not defined. It permits relinking with newer versions of the library, which is required by the LGPL license.See lgpl-relicensing.txt for details.
* MIT-style license :
xchg()primitive has been rewritten from scratch starting fromatomic_ops1.2 which has a MIT-style license that is intended to allow use in both free and proprietary software:
http://www.hpl.hp.com/research/linux/atomic_ops/LICENSING.txt
http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/This MIT-style license (BSD like) apply to:
uatomic/gcc.huatomic/unknown.huatomic/generic.huatomic/sparc64.huatomic/arm.huatomic/ppc.huatomic/x86.huatomic.hMIT/X11 (BSD like) license apply to:
compiler.harch/s390.huatomic/alpha.huatomic/mips.huatomic/nios2.huatomic/s390.hsystem.h* GPLv2
Library test code is distributed under the GPLv2 license. See gpl-2.0.txt for license details. See headers of individual files under tests/ for details.
Quoted 5 lines
* GPLv3 (or later)
The following build-related macro is under GPLv3 (or later):
m4/ax_tls.m4
If you only point to part of this file you are risking missing the addition of just about any license to the end of the list on a future upgrade. That doesn't sound like a good idea to me.
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Re: [PATCH 6/7] liburcu: Add nios2 support
Quoted 97 lines · Paul Eggleton
Quoted 96 lines · On Tue, 09 Feb 2016 18:56:09 Marek Vasut wrote:
Quoted 18 lines · Khem Raj
Quoted 18 lines · Marek Vasut
Quoted 7 lines · Ross
Quoted 4 lines · Marek Vasut
-LIC_FILES_CHKSUM = "file://LICENSE;md5=0f060c30a27922ce9c0d557a639b4fa3 \
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \Why did the license checksum change?
Because the LICENSE file now contains one more entry for nios2, which changed the checksum of the whole file. Maybe we should trim the checksum to use only the header in the LICENSE file and not the whole file to prevent this ?
This is the change which triggered the change of the checksum:
Quoted 12 lines
meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch line 30
Quoted 9 lines
meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch new file +9
-0+diff --git a/LICENSE b/LICENSE +index 3147094..a06fdcc 100644 +--- a/LICENSE ++++ b/LICENSE +@@ -45,6 +45,7 @@ compiler.h + arch/s390.h + uatomic/alpha.h + uatomic/mips.h ++uatomic/nios2.hI don’t know how the LICENSE file looks like but including file names in license file is probably worth ignoring in checksums.
See below:
Userspace RCU library licensing
Mathieu Desnoyers
September 3, 2012* LGPLv2.1
The library part is distributed under LGPLv2.1 or later. See lgpl-2.1.txt for license details. Refer to the individual file headers for details.
LGPL-compatible source code can statically use the library header using :
#define
_LGPL_SOURCE
#include <urcu.h>Dynamic-only linking with the LGPL library is used if
_LGPL_SOURCEis not defined. It permits relinking with newer versions of the library, which is required by the LGPL license.See lgpl-relicensing.txt for details.
* MIT-style license :
xchg()primitive has been rewritten from scratch starting fromatomic_ops1.2 which has a MIT-style license that is intended to allow use in bothfree and proprietary software:
http://www.hpl.hp.com/research/linux/atomic_ops/LICENSING.txt
http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/This MIT-style license (BSD like) apply to:
uatomic/gcc.huatomic/unknown.huatomic/generic.huatomic/sparc64.huatomic/arm.huatomic/ppc.huatomic/x86.huatomic.hMIT/X11 (BSD like) license apply to:
compiler.harch/s390.huatomic/alpha.huatomic/mips.huatomic/nios2.huatomic/s390.hsystem.h* GPLv2
Library test code is distributed under the GPLv2 license. See gpl-2.0.txt for license details. See headers of individual files under tests/ for details.
* GPLv3 (or later)
Quoted 7 lines
Quoted 3 lines
The following build-related macro is under GPLv3 (or later):
m4/ax_tls.m4
If you only point to part of this file you are risking missing the addition of just about any license to the end of the list on a future upgrade. That doesn't sound like a good idea to me.
Hm, ouch. In that case, I guess we should stick with the current situation and update the license file checksum if needed ?
PATCH 7/7 oprofile: Add nios2 support
In reply to Marek VasutAdd support for the nios2 architecture.
--- meta/recipes-kernel/oprofile/oprofile.inc | 3 ++- ...Add-rmb-definition-for-NIOS2-architecture.patch | 30 ++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch
meta/recipes-kernel/oprofile/oprofile.inc +2 -1
@@ -23,7 +23,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ file://automake-foreign.patch \ file://oprofile-cross-compile-tests.patch \ file://run-ptest \ - file://root-home-dir.patch" + file://root-home-dir.patch \ + file://0001-Add-rmb-definition-for-NIOS2-architecture.patch" SRC_URI_append_libc-musl = " file://musl.patch"
meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch new file +30 -0
@@ -0,0 +1,30 @@ +From 34b0d9b1a32fb404a30327a7ae8931c7c75583bf Mon Sep 17 00:00:00 2001 +From: Marek Vasut <[email protected]> +Date: Tue, 9 Feb 2016 02:00:29 +0100 +Subject: [PATCH] Add rmb() definition for NIOS2 architecture + +Signed-off-by: Marek Vasut <[email protected]> +Upstream-Status: Pending +--- + libperf_events/operf_utils.h | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/libperf_events/operf_utils.h b/libperf_events/operf_utils.h +index 32954cc..8270e53 100644 +--- a/libperf_events/operf_utils.h ++++ b/libperf_events/operf_utils.h +@@ -178,6 +178,11 @@ void op_release_resources(void); + #define cpu_relax() asm volatile("" ::: "memory") + #endif + ++#ifdef __nios2__ ++#define rmb() asm volatile("" ::: "memory") ++#define cpu_relax() asm volatile("" ::: "memory") ++#endif ++ + #ifdef __tile__ + #include <asm/unistd.h> + #define rmb() __insn_mf() +-- +2.7.0 +
Signature · 1 line
2.1.4
Quoted 15 lines · Marek Vasut
meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch new file +13
-0+From dd1a80c8d213eed95fe55b7ebcb07ee165dd8e4b Mon Sep 17 00:00:00 2001 +From: "Dmitry V. Levin" <[email protected]> +Date: Thu, 24 Dec 2015 15:40:55 +0000 +Subject: [PATCH] arc, metag, nios2, or1k, tile: fix build + +Fix build regression introduced by commit +34683e3926d8c2daa368afb805da422ee7043396. + +* linux/32/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap. +* linux/arc/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap_pgoff. +* linux/nios2/syscallent.h: Likewise. +* linux/or1k/syscallent.h: Likewise. +* linux/tile/syscallent1.h: Add sys_ prefix to ARCH_mmap and
sys_mmap_4koff.
meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch line 18
Quoted 5 lines
meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch new file +5
-0+* pathtrace.c (pathtrace_match): Handle SEN_ARCH_mmap. +* NEWS: Mention this build fix. + +Reported-by: Alexey Brodkin <[email protected]> +Upstream-Status: Backport
This needs your signed-off-by tag too.
Ross
Quoted 14 lines · Ross
Quoted 13 lines · Marek Vasut
meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch new file +13
-0+From dd1a80c8d213eed95fe55b7ebcb07ee165dd8e4b Mon Sep 17 00:00:00 2001 +From: "Dmitry V. Levin" <[email protected]> +Date: Thu, 24 Dec 2015 15:40:55 +0000 +Subject: [PATCH] arc, metag, nios2, or1k, tile: fix build + +Fix build regression introduced by commit +34683e3926d8c2daa368afb805da422ee7043396. + +* linux/32/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap. +* linux/arc/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap_pgoff. +* linux/nios2/syscallent.h: Likewise. +* linux/or1k/syscallent.h: Likewise. +* linux/tile/syscallent1.h: Add sys_ prefix to ARCH_mmap and
Quoted 8 lines
meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch line 18
Quoted 6 lines
sys_mmap_4koff.meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch new file +5
-0+* pathtrace.c (pathtrace_match): Handle SEN_ARCH_mmap. +* NEWS: Mention this build fix. + +Reported-by: Alexey Brodkin <[email protected]> +Upstream-Status: BackportThis needs your signed-off-by tag too.
Oops, thanks for the reminder. Let me just repost this.
Best regards,
Marek Vasut
PATCH v2 1/7 strace: Fix build for arc, metag, nios2, or1k, tile
In reply to Marek VasutUpstream strace 4.11 does not build for arc, metag, nios2, or1k, tile. Backport patch from strace git master to fix the build issue.
--- .../0001-arc-metag-nios2-or1k-tile-fix-build.patch | 117 +++++++++++++++++++++ meta/recipes-devtools/strace/strace_4.11.bb | 1 + 2 files changed, 118 insertions(+) create mode 100644 meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch
V2: Add missing SoB line to the backported patch
meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch new file +117 -0
@@ -0,0 +1,117 @@ +From dd1a80c8d213eed95fe55b7ebcb07ee165dd8e4b Mon Sep 17 00:00:00 2001 +From: "Dmitry V. Levin" <[email protected]> +Date: Thu, 24 Dec 2015 15:40:55 +0000 +Subject: [PATCH] arc, metag, nios2, or1k, tile: fix build + +Fix build regression introduced by commit +34683e3926d8c2daa368afb805da422ee7043396. + +* linux/32/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap. +* linux/arc/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap_pgoff. +* linux/nios2/syscallent.h: Likewise. +* linux/or1k/syscallent.h: Likewise. +* linux/tile/syscallent1.h: Add sys_ prefix to ARCH_mmap and sys_mmap_4koff. +* pathtrace.c (pathtrace_match): Handle SEN_ARCH_mmap. +* NEWS: Mention this build fix. + +Reported-by: Alexey Brodkin <[email protected]> +Signed-off-by: Marek Vasut <[email protected]> +Upstream-Status: Backport +--- + NEWS | 3 +++ + linux/32/syscallent.h | 6 +++--- + linux/arc/syscallent.h | 2 +- + linux/nios2/syscallent.h | 2 +- + linux/or1k/syscallent.h | 2 +- + linux/tile/syscallent1.h | 2 +- + pathtrace.c | 1 + + 7 files changed, 11 insertions(+), 7 deletions(-) + +diff --git a/NEWS b/NEWS +index fe40ca4..09263eb 100644 +--- a/NEWS ++++ b/NEWS +@@ -1,3 +1,9 @@ ++Noteworthy changes in release ?.?? (????-??-??) ++=============================================== ++ ++* Bug fixes ++ * Fixed build on arc, metag, nios2, or1k, and tile architectures. ++ + Noteworthy changes in release 4.11 (2015-12-21) + =============================================== + +diff --git a/linux/32/syscallent.h b/linux/32/syscallent.h +index 5f997e7..e6f895c 100644 +--- a/linux/32/syscallent.h ++++ b/linux/32/syscallent.h +@@ -1,5 +1,5 @@ +-#ifndef ARCH_mmap +-# define ARCH_mmap mmap ++#ifndef sys_ARCH_mmap ++# define sys_ARCH_mmap sys_mmap + #endif + [ 0] = { 2, 0, SEN(io_setup), "io_setup" }, + [ 1] = { 1, 0, SEN(io_destroy), "io_destroy" }, +@@ -276,5 +276,5 @@ + [283] = { 2, 0, SEN(membarrier), "membarrier", }, + [284] = { 3, TM, SEN(mlock2), "mlock2" }, + +-#undef ARCH_mmap ++#undef sys_ARCH_mmap + #undef ARCH_WANT_SYNC_FILE_RANGE2 +diff --git a/linux/arc/syscallent.h b/linux/arc/syscallent.h +index 5847dc4..1100008 100644 +--- a/linux/arc/syscallent.h ++++ b/linux/arc/syscallent.h +@@ -1,4 +1,4 @@ +-#define ARCH_mmap mmap_pgoff ++#define sys_ARCH_mmap sys_mmap_pgoff + #include "32/syscallent.h" + [244] = { 3, 0, SEN(printargs), "arc_cacheflush"}, + [245] = { 1, 0, SEN(printargs), "arc_settls" }, +diff --git a/linux/nios2/syscallent.h b/linux/nios2/syscallent.h +index 8a4b70e..01efe3a 100644 +--- a/linux/nios2/syscallent.h ++++ b/linux/nios2/syscallent.h +@@ -1,4 +1,4 @@ +-#define ARCH_mmap mmap_pgoff ++#define sys_ARCH_mmap sys_mmap_pgoff + #include "32/syscallent.h" + [244] = {4, 0, SEN(cacheflush), "cacheflush"}, + [245 ... 259] = { }, +diff --git a/linux/or1k/syscallent.h b/linux/or1k/syscallent.h +index ed84b3b..351fe25 100644 +--- a/linux/or1k/syscallent.h ++++ b/linux/or1k/syscallent.h +@@ -1,4 +1,4 @@ +-#define ARCH_mmap mmap_pgoff ++#define sys_ARCH_mmap sys_mmap_pgoff + #include "32/syscallent.h" + [244] = { 3, NF, SEN(or1k_atomic), "or1k_atomic" }, + [245 ... 259] = { }, +diff --git a/linux/tile/syscallent1.h b/linux/tile/syscallent1.h +index c86f059..28dbab4 100644 +--- a/linux/tile/syscallent1.h ++++ b/linux/tile/syscallent1.h +@@ -1,4 +1,4 @@ +-#define ARCH_mmap mmap_4koff ++#define sys_ARCH_mmap sys_mmap_4koff + #define ARCH_WANT_SYNC_FILE_RANGE2 1 + #include "32/syscallent.h" + [244] = { 1, 0, SEN(printargs), "cmpxchg_badaddr" }, +diff --git a/pathtrace.c b/pathtrace.c +index d530ec2..e72cdf7 100644 +--- a/pathtrace.c ++++ b/pathtrace.c +@@ -216,6 +216,7 @@ pathtrace_match(struct tcb *tcp) + case SEN_mmap: + case SEN_mmap_4koff: + case SEN_mmap_pgoff: ++ case SEN_ARCH_mmap: + /* x, x, x, x, fd */ + return fdmatch(tcp, tcp->u_arg[4]); + +-- +2.6.4 +
meta/recipes-devtools/strace/strace_4.11.bb +1 -0
@@ -8,6 +8,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \ file://disable-git-version-gen.patch \ file://more-robust-test-for-m32-mx32-compile-support.patch \ file://update-gawk-paths.patch \ + file://0001-arc-metag-nios2-or1k-tile-fix-build.patch \ file://Makefile-ptest.patch \ file://run-ptest \ "
Signature · 1 line
2.1.4