<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>10403</bug_id>
          
          <creation_ts>2016-10-09 22:06:00 +0000</creation_ts>
          <short_desc>[PATCH] configure --cflags breaks when CFLAGS contain commas</short_desc>
          <delta_ts>2016-10-13 16:14:12 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Pseudo</product>
          <component>pseudo</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>dominik</reporter>
          <assigned_to name="Mark Hatle">mark.hatle</assigned_to>
          <cc>joshuagloe</cc>
    
    <cc>seebs</cc>
    
    <cc>yp.pseudo.watcher</cc>
    
    <cc>yp.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>67081</commentid>
    <comment_count>0</comment_count>
      <attachid>3464</attachid>
    <who name="">dominik</who>
    <bug_when>2016-10-09 22:06:00 +0000</bug_when>
    <thetext>Created attachment 3464
configure: support using comma (,) in flags passed to --cflags

Preconditions/Environment
-------------------------
pseudo-1.8.1 on Fedora rawhide

Triggering Action/Cause
-----------------------
./configure --bits=64 --cflags=&apos;-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic&apos; --enable-memory-db --enable-xattr --enable-xattrdb --libdir=/usr/lib64/pseudo --prefix=/usr --without-rpath

Expectation
-----------
No errors.

Actual Result
-------------
SQLite header for version 3014002 found in /usr.
sed: -e expression #1, char 239: unknown option to `s&apos;

Reproducibility
---------------
100%

That&apos;s because the sed expression at configure:321 uses commas as sed expression separator. The solution is to use another separator that doesn&apos;t occur in CFLAGS, like !, which is what is done for RPATH already. Proposed patch attached.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67214</commentid>
    <comment_count>1</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-10-13 14:48:57 +0000</bug_when>
    <thetext>Adding Seebs to CC.

Peter, Mark — do we prefer pseudo patches to the mailing list?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67215</commentid>
    <comment_count>2</comment_count>
    <who name="Seebs">seebs</who>
    <bug_when>2016-10-13 14:50:35 +0000</bug_when>
    <thetext>In general, yeah, but this one&apos;s probably fine. Of course the real problem is that ! can also occur in cflags. LOTS of things can occur in cflags. I think the workaround I usually use is to first run cflags through s/,/\\,/ or something. I&apos;ll poke it a bit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67226</commentid>
    <comment_count>3</comment_count>
    <who name="Seebs">seebs</who>
    <bug_when>2016-10-13 16:06:48 +0000</bug_when>
    <thetext>Added fix in upstream. One-line configure change:

+arch_flags=$(echo &quot;$arch_flags&quot; | sed -e &apos;s/,/\\,/g&apos;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67227</commentid>
    <comment_count>4</comment_count>
    <who name="Seebs">seebs</who>
    <bug_when>2016-10-13 16:14:12 +0000</bug_when>
    <thetext>Fixed in upstream. Doesn&apos;t seem to affect yocto. (Fix is only in master, but it&apos;ll be included in next bugfix/point release.)</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>3464</attachid>
            <date>2016-10-09 22:06:00 +0000</date>
            <delta_ts>2016-10-09 22:06:00 +0000</delta_ts>
            <desc>configure: support using comma (,) in flags passed to --cflags</desc>
            <filename>pseudo-comma-in-cflags.patch</filename>
            <type>text/plain</type>
            <size>506</size>
            <attacher>dominik</attacher>
            
              <data encoding="base64">ZGlmZiAtdXAgcHNldWRvLTEuOC4xL2NvbmZpZ3VyZS5vcmlnIHBzZXVkby0xLjguMS9jb25maWd1
cmUKLS0tIHBzZXVkby0xLjguMS9jb25maWd1cmUub3JpZwkyMDE2LTA3LTA4IDExOjM3OjA1LjAw
MDAwMDAwMCArMDIwMAorKysgcHNldWRvLTEuOC4xL2NvbmZpZ3VyZQkyMDE2LTEwLTA5IDIzOjQ1
OjE5LjMxODQyMzA3NCArMDIwMApAQCAtMzI3LDcgKzMyNyw3IEBAIHNlZCAtZSAnCiAgIHMsQExJ
QkAsJyIkb3B0X2xpYiInLGcKICAgcyxAU1VGRklYQCwnIiRvcHRfc3VmZml4IicsZwogICBzLEBT
UUxJVEVALCciJG9wdF9zcWxpdGUiJyxnCi0gIHMsQEFSQ0hfRkxBR1NALCciJGFyY2hfZmxhZ3Mi
JyxnCisgIHMhQEFSQ0hfRkxBR1NAISciJGFyY2hfZmxhZ3MiJyFnCiAgIHMsQERFRkFVTFRfU1FM
SVRFQCwnIiRkZWZhdWx0X3NxbGl0ZSInLGcKICAgcyxAU1FMSVRFX0xEQVJHQCwnIiRzcWxpdGVf
bGRhcmciJyxnCiAgIHMsQFNRTElURV9MSUJALCciJG9wdF9zcWxpdGVfbGliIicsZwo=
</data>

          </attachment>
      

    </bug>

</bugzilla>