Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] gstreamer1.0-libav: Fix build on mips
@ 2017-09-21 17:42 Khem Raj
  2017-09-21 17:42 ` [PATCH 2/2] go: Remove mips32r2 from march to get cgo working Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2017-09-21 17:42 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...a.c-Fix-build-by-Including-libavcodec-hev.patch | 33 ++++++++++++++++++++++
 .../gstreamer/gstreamer1.0-libav_1.12.2.bb         |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-hevcpred_msa.c-Fix-build-by-Including-libavcodec-hev.patch

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-hevcpred_msa.c-Fix-build-by-Including-libavcodec-hev.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-hevcpred_msa.c-Fix-build-by-Including-libavcodec-hev.patch
new file mode 100644
index 0000000000..afbfc84db5
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-hevcpred_msa.c-Fix-build-by-Including-libavcodec-hev.patch
@@ -0,0 +1,33 @@
+From b5226c096a0b7049874858e94a59d43e10ba3fd2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 21 Sep 2017 10:22:56 -0700
+Subject: [PATCH] hevcpred_msa.c: Fix build by Including libavcodec/hevcdec.h
+
+src/libavcodec/mips/hevcpred_msa.c:1913:32: error: unknown type name 'HEVCContext'; did you mean 'HEVCPredContext'?
+ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
+                                ^~~~~~~~~~~
+                                HEVCPredContext
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ gst-libs/ext/libav/libavcodec/mips/hevcpred_msa.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gst-libs/ext/libav/libavcodec/mips/hevcpred_msa.c b/gst-libs/ext/libav/libavcodec/mips/hevcpred_msa.c
+index 6a3b281..963c64c 100644
+--- a/gst-libs/ext/libav/libavcodec/mips/hevcpred_msa.c
++++ b/gst-libs/ext/libav/libavcodec/mips/hevcpred_msa.c
+@@ -18,7 +18,7 @@
+  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+  */
+ 
+-#include "libavcodec/hevc.h"
++#include "libavcodec/hevcdec.h"
+ #include "libavutil/mips/generic_macros_msa.h"
+ #include "hevcpred_mips.h"
+ 
+-- 
+2.14.1
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.12.2.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.12.2.bb
index 6c5f779ebf..3b5bbd1507 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.12.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.12.2.bb
@@ -13,6 +13,7 @@ SRC_URI = "http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz
            file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \
            file://mips64_cpu_detection.patch \
            file://0001-configure-check-for-armv7ve-variant.patch \
+           file://0001-hevcpred_msa.c-Fix-build-by-Including-libavcodec-hev.patch \
            "
 SRC_URI[md5sum] = "8788aecc032a287227b4bd239d1b998a"
 SRC_URI[sha256sum] = "5bb735b9bb218b652ae4071ea6f6be8eaae55e9d3233aec2f36b882a27542db3"
-- 
2.14.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] go: Remove mips32r2 from march to get cgo working
  2017-09-21 17:42 [PATCH 1/2] gstreamer1.0-libav: Fix build on mips Khem Raj
@ 2017-09-21 17:42 ` Khem Raj
  2017-09-22  6:24   ` Richard Purdie
  2017-09-22 13:32   ` Matt Madison
  0 siblings, 2 replies; 4+ messages in thread
From: Khem Raj @ 2017-09-21 17:42 UTC (permalink / raw)
  To: openembedded-core

on mips, cgo used mips32r1 and that conflicts with mips32r2
lets remove it for now and work go upstream to make it work
for golang as well

Fixes
| # runtime/cgo
| cc1: error: '-mips32r2' conflicts with the other architecture options, which specify a mips32 processor

Fixes [YOCTO #12108]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/go/go-common.inc | 4 ++++
 meta/recipes-devtools/go/go_1.9.bb     | 2 --
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/go/go-common.inc b/meta/recipes-devtools/go/go-common.inc
index ce1eb86812..41f661bc4e 100644
--- a/meta/recipes-devtools/go/go-common.inc
+++ b/meta/recipes-devtools/go/go-common.inc
@@ -20,3 +20,7 @@ B = "${S}"
 
 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
 SSTATE_SCAN_CMD = "true"
+
+TUNE_CCARGS_remove = "-march=mips32r2"
+SECURITY_CFLAGS = "${SECURITY_NOPIE_CFLAGS}"
+SECURITY_LDFLAGS = ""
diff --git a/meta/recipes-devtools/go/go_1.9.bb b/meta/recipes-devtools/go/go_1.9.bb
index 08ab793f86..c67e2cb050 100644
--- a/meta/recipes-devtools/go/go_1.9.bb
+++ b/meta/recipes-devtools/go/go_1.9.bb
@@ -1,4 +1,2 @@
 require go-${PV}.inc
 require go-target.inc
-TUNE_CCARGS_remove = "-march=mips32r2"
-SECURITY_PIE_CFLAGS_remove = "-fPIE -pie"
-- 
2.14.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] go: Remove mips32r2 from march to get cgo working
  2017-09-21 17:42 ` [PATCH 2/2] go: Remove mips32r2 from march to get cgo working Khem Raj
@ 2017-09-22  6:24   ` Richard Purdie
  2017-09-22 13:32   ` Matt Madison
  1 sibling, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2017-09-22  6:24 UTC (permalink / raw)
  To: Khem Raj, openembedded-core

On Thu, 2017-09-21 at 10:42 -0700, Khem Raj wrote:
> on mips, cgo used mips32r1 and that conflicts with mips32r2
> lets remove it for now and work go upstream to make it work
> for golang as well
> 
> Fixes
> > 
> > # runtime/cgo
> > cc1: error: '-mips32r2' conflicts with the other architecture
> > options, which specify a mips32 processor
> Fixes [YOCTO #12108]
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/recipes-devtools/go/go-common.inc | 4 ++++
>  meta/recipes-devtools/go/go_1.9.bb     | 2 --
>  2 files changed, 4 insertions(+), 2 deletions(-)

I think this causes:

https://autobuilder.yocto.io/builders/nightly-world-lsb/builds/486/steps/BuildImages/logs/stdio

| # /tmp/go-build282041009/libstd.so
| /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/work/i586-poky-linux/go-runtime/1.9-r0/go/pkg/tool/linux_amd64/link: running i586-poky-linux-gcc failed: exit status 1
| /tmp/go-link-130351246/go.o:(.data.rel.ro+0x36bfcc): undefined reference to `main.init'
| /tmp/go-link-130351246/go.o:(.data.rel.ro+0x36bfd0): undefined reference to `main.main'
| collect2: error: ld returned 1 exit status
| 
| WARNING: exit code 2 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/work/i586-poky-linux/go-runtime/1.9-r0/temp/log.do_compile.29509)
NOTE: recipe go-runtime-1.9-r0: task do_compile: Failed
ERROR: Task (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/meta/recipes-devtools/go/go-runtime_1.9.bb:do_compile) failed with exit code '1'

Cheers,

Richard


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] go: Remove mips32r2 from march to get cgo working
  2017-09-21 17:42 ` [PATCH 2/2] go: Remove mips32r2 from march to get cgo working Khem Raj
  2017-09-22  6:24   ` Richard Purdie
@ 2017-09-22 13:32   ` Matt Madison
  1 sibling, 0 replies; 4+ messages in thread
From: Matt Madison @ 2017-09-22 13:32 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core@lists.openembedded.org

On Thu, Sep 21, 2017 at 10:42 AM, Khem Raj <raj.khem@gmail.com> wrote:
> on mips, cgo used mips32r1 and that conflicts with mips32r2
> lets remove it for now and work go upstream to make it work
> for golang as well

There is already someone working on expanding MIPS support for go,
based on some mailing list discussions I've seen.  Doesn't look like
the changes have made it in yet, but looked like they could for 1.10.

>
> Fixes
> | # runtime/cgo
> | cc1: error: '-mips32r2' conflicts with the other architecture options, which specify a mips32 processor
>
> Fixes [YOCTO #12108]
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/recipes-devtools/go/go-common.inc | 4 ++++
>  meta/recipes-devtools/go/go_1.9.bb     | 2 --
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-devtools/go/go-common.inc b/meta/recipes-devtools/go/go-common.inc
> index ce1eb86812..41f661bc4e 100644
> --- a/meta/recipes-devtools/go/go-common.inc
> +++ b/meta/recipes-devtools/go/go-common.inc
> @@ -20,3 +20,7 @@ B = "${S}"
>
>  INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
>  SSTATE_SCAN_CMD = "true"
> +
> +TUNE_CCARGS_remove = "-march=mips32r2"

The rework for this should probably go into goarch.bblcass, so it
applies to go packages as well as the toolchain.  The mips checks in
goarch.bbclass need some refinement anyway, since Go only supports o32
ABI and hard-float.  I can send along a patch that should cover what's
needed.

-Matt


> +SECURITY_CFLAGS = "${SECURITY_NOPIE_CFLAGS}"
> +SECURITY_LDFLAGS = ""
> diff --git a/meta/recipes-devtools/go/go_1.9.bb b/meta/recipes-devtools/go/go_1.9.bb
> index 08ab793f86..c67e2cb050 100644
> --- a/meta/recipes-devtools/go/go_1.9.bb
> +++ b/meta/recipes-devtools/go/go_1.9.bb
> @@ -1,4 +1,2 @@
>  require go-${PV}.inc
>  require go-target.inc
> -TUNE_CCARGS_remove = "-march=mips32r2"
> -SECURITY_PIE_CFLAGS_remove = "-fPIE -pie"
>
> --
> 2.14.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-09-22 13:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-21 17:42 [PATCH 1/2] gstreamer1.0-libav: Fix build on mips Khem Raj
2017-09-21 17:42 ` [PATCH 2/2] go: Remove mips32r2 from march to get cgo working Khem Raj
2017-09-22  6:24   ` Richard Purdie
2017-09-22 13:32   ` Matt Madison

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox