[Pixman] [PATCH 1/2] configure.ac: Use '-mloongson-mmi' for Loongson MMI.

yinshiyou-hf at loongson.cn yinshiyou-hf at loongson.cn
Sat Mar 28 02:21:33 UTC 2020


From 61b0e2effd9a1c6c706d229680b74662dad22d11 Mon Sep 17 00:00:00 2001
From: Shiyou Yin <yinshiyou-hf at loongson.cn>
Date: Mon, 23 Mar 2020 14:27:31 +0800
Subject: [PATCH] configure.ac: Delete the default setting of LS_CFLAGS.

It's not recommended to use '-march=loongson2f' for MMI compilation.
This default setting will cause link error on new platform whose buildtools
are build with '-march=gs464', then MMI will be disabled.
Error message while compiler check for mmi:
"linking mips:loongson_2f module with previous mips:gs464 modules"

After deleting the default setting of LS_CFLAGS,
MMI can be enabled only when following conditions met together:
1) user have not specify --disable-loongson-mmi.
2) MMI options has been specified by MMI_CFLAGS,CC or compiler's default setting.
3) compiler supports these MMI options.
---
 configure.ac | 5 -----
 meson.build  | 1 -
 2 files changed, 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1ca3974..7032af4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -271,11 +271,6 @@ PIXMAN_CHECK_CFLAG([-xldscope=hidden], [dnl
 
 dnl ===========================================================================
 dnl Check for Loongson Multimedia Instructions
-
-if test "x$LS_CFLAGS" = "x" ; then
-    LS_CFLAGS="-march=loongson2f"
-fi
-
 have_loongson_mmi=no
 AC_MSG_CHECKING(whether to use Loongson MMI assembler)
 
diff --git a/meson.build b/meson.build
index 15d3409..673be7c 100644
--- a/meson.build
+++ b/meson.build
@@ -51,7 +51,6 @@ endforeach
 
 use_loongson_mmi = get_option('loongson-mmi')
 have_loongson_mmi = false
-loongson_mmi_flags = ['-march=loongson2f']
 if not use_loongson_mmi.disabled()
   if host_machine.cpu_family() == 'mips64' and cc.compiles('''
       #ifndef __mips_loongson_vector_rev
-- 
2.1.0

Use this patch.


> -----原始邮件-----
> 发件人: "YunQiang Su" <wzssyqa at gmail.com>
> 发送时间: 2020-03-28 08:47:07 (星期六)
> 收件人: "Shiyou Yin" <yinshiyou-hf at loongson.cn>
> 抄送: pixman <pixman at lists.freedesktop.org>
> 主题: Re: [Pixman] [PATCH 1/2] configure.ac: Use '-mloongson-mmi' for Loongson MMI.
> 
> Shiyou Yin <yinshiyou-hf at loongson.cn> 于2020年3月26日周四 下午8:57写道:
> >
> > It's recommended to use '-mloongson-mmi' for MMI.
> > ---
> >  configure.ac | 2 +-
> >  meson.build  | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/configure.ac b/configure.ac
> > index 1ca3974..fd7df47 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -273,7 +273,7 @@ dnl ===========================================================================
> >  dnl Check for Loongson Multimedia Instructions
> >
> >  if test "x$LS_CFLAGS" = "x" ; then
> > -    LS_CFLAGS="-march=loongson2f"
> > +    LS_CFLAGS="-mloongson-mmi"
> 
> It will break ALL of generic MIPS distributions.
> It will break ALL of non-loongson MIPS builds.
> 
> Please reject it.
> 
> >  fi
> >
> >  have_loongson_mmi=no
> > diff --git a/meson.build b/meson.build
> > index 15d3409..a45c969 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -51,7 +51,7 @@ endforeach
> >
> >  use_loongson_mmi = get_option('loongson-mmi')
> >  have_loongson_mmi = false
> > -loongson_mmi_flags = ['-march=loongson2f']
> > +loongson_mmi_flags = ['-mloongson-mmi']
> >  if not use_loongson_mmi.disabled()
> >    if host_machine.cpu_family() == 'mips64' and cc.compiles('''
> >        #ifndef __mips_loongson_vector_rev
> > --
> > 2.1.0
> >
> > _______________________________________________
> > Pixman mailing list
> > Pixman at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/pixman
> 
> 
> 
> -- 
> YunQiang Su
</yinshiyou-hf at loongson.cn></pixman at lists.freedesktop.org></yinshiyou-hf at loongson.cn></wzssyqa at gmail.com></yinshiyou-hf at loongson.cn>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: proposal_B_0001-configure.ac-Delete-the-default-setting-of-LS_CFLAGS.patch
Type: application/octet-stream
Size: 1778 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/pixman/attachments/20200328/78f48f48/attachment.obj>


More information about the Pixman mailing list