Fail to build SDL-2.0.5, after enabling -std=c99 ...

JIA Pei <[email protected]> Fri, 3 Mar 2017 14:11:14 -0800
Newsgroups gmane.comp.lib.sdl
Message-ID <CADh8Q_XvjniHehwA9UxnuEC_i0S2RCgUteFXrrJpQJX9UeQT2g@mail.gmail.com>
--===============2693410551125397468==
Content-Type: multipart/alternative; boundary=001a113cd9ccfe27050549dad243

--001a113cd9ccfe27050549dad243
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi, all:


Working Environment: Ubuntu 16.04.2
GCC Version: 5.4.0


I successfully configured SDL-2.0.5 for further building. And I configured
"-std=3Dc99" for CMAKE_C_FLAGS, see the following:

> CMAKE_C_FLAGS                    -std=3Dc99



However, I get ERROR messages for the assembly code in file SDL_cpuinfo.c

> SDL2-2.0.5/src/cpuinfo/SDL_cpuinfo.c:250:34: error: expected =E2=80=98)=
=E2=80=99 before =E2=80=98:=E2=80=99
> token
>     asm(".byte 0x0f, 0x01, 0xd0" : "=3Da" (a) : "c" (0) : "%edx");



I'm pretty sure this ERROR message has something to do with -std=3Dc99 . I
wonder which version of C is SDL2-2.0.5 compatible with?


Cheers


--=20

Pei JIA, Ph.D.

Email: [email protected]
cell in Canada:    +1 778-863-5816
cell in China: +86 186-8244-3503

Welcome to Vision Open
http://www.visionopen.com

--001a113cd9ccfe27050549dad243
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><br></div>Hi, all:<div><br></div><div><br></div><div>=
Working Environment: Ubuntu 16.04.2</div><div>GCC Version: 5.4.0</div><div>=
<br></div><div><span style=3D"font-family:monospace"><br>I successfully con=
figured SDL-2.0.5 for further building. And I configured &quot;-std=3Dc99&q=
uot; for CMAKE_C_FLAGS, see the following:</span></div><blockquote class=3D=
"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(2=
04,204,204);padding-left:1ex"><span style=3D"font-family:monospace"><span s=
tyle=3D"color:rgb(0,0,0)">CMAKE_C_FLAGS =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0</span><span style=3D"color:rgb(255,255,255);background-color:rgb(0,0=
,0)">-std=3Dc99 </span></span></blockquote><div><span style=3D"font-family:=
monospace"><br></span></div><div><span style=3D"font-family:monospace"><br>=
However, I get ERROR messages for the assembly code in file=C2=A0</span><sp=
an style=3D"font-family:monospace"><span style=3D"font-weight:bold;color:rg=
b(0,0,0)">SDL_cpuinfo.c</span><br></span><blockquote class=3D"gmail_quote" =
style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pa=
dding-left:1ex"><span style=3D"font-family:monospace"><span style=3D"font-w=
eight:bold;color:rgb(0,0,0)">SDL2-2.0.5/src/cpuinfo/SDL_cpuinfo.c:250:34:</=
span><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"font-weight:bo=
ld;color:rgb(255,84,84)">error: </span><span style=3D"color:rgb(0,0,0)">exp=
ected =E2=80=98</span><span style=3D"font-weight:bold;color:rgb(0,0,0)">)</=
span><span style=3D"color:rgb(0,0,0)">=E2=80=99 before =E2=80=98</span><spa=
n style=3D"font-weight:bold;color:rgb(0,0,0)">:</span><span style=3D"color:=
rgb(0,0,0)">=E2=80=99 token<br>
</span></span><span style=3D"font-family:monospace"> =C2=A0=C2=A0=C2=A0=C2=
=A0asm(&quot;.byte 0x0f, 0x01, 0xd0&quot; : &quot;=3Da&quot; (a) : &quot;c&=
quot; (0) : &quot;%edx&quot;);</span></blockquote><span style=3D"font-famil=
y:monospace"><br><br>I&#39;m pretty sure this ERROR message has something t=
o do with -std=3Dc99 . I wonder which version of C is SDL2-2.0.5 compatible=
 with?</span></div><div><span style=3D"font-family:monospace"><br></span></=
div><div><span style=3D"font-family:monospace"><br></span></div><div><span =
style=3D"font-family:monospace">Cheers<br><br></span><div><br></div>-- <br>=
<div class=3D"gmail_signature"><div dir=3D"ltr"><div><br></div><div>Pei JIA=
, Ph.D.</div><div><br></div><div>Email: <a href=3D"mailto:[email protected]=
" target=3D"_blank">[email protected]</a></div><div>cell in Canada: =C2=A0 =
=C2=A0+1 778-863-5816</div><div>cell in China: +86 186-8244-3503</div><div>=
<br></div>Welcome to Vision Open<br><a href=3D"http://www.visionopen.com" t=
arget=3D"_blank">http://www.visionopen.com</a></div></div>
</div></div>

--001a113cd9ccfe27050549dad243--

--===============2693410551125397468==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
SDL mailing list
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

--===============2693410551125397468==--