<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>33173</bug_id>
          
          <creation_ts>2017-02-26 05:15:32 +0300</creation_ts>
          <short_desc>препроцессору не передается -fstack-protector =&gt; .gch файлы не включаются</short_desc>
          <delta_ts>2018-07-13 04:31:56 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>gcc7</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Big Benis">big.benis</reporter>
          <assigned_to name="Nobody&apos;s working on this, feel free to take it">nobody</assigned_to>
          <cc>vseleznv</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>162131</commentid>
    <comment_count>0</comment_count>
    <who name="Big Benis">big.benis</who>
    <bug_when>2017-02-26 05:15:32 +0300</bug_when>
    <thetext>джисиси очень сильно глючит, в результате чего не проходит тест свит у сосикеша.
В частности сосикеш выполнят такой тест: компилирует заголовочный файл в .gch, удаляет оригинал, после чего скомпилированный заголовок должен в определенных случаях включаться препроцессором эз из.  А он не включается!

$ touch foo.h
$ gcc -c foo.h                                         
$ rm foo.h

$ gcc-6 -Winvalid-pch -fpch-preprocess -include foo.h -E - &lt;/dev/null
# 1 &quot;&lt;stdin&gt;&quot;                                                                              
# 1 &quot;&lt;built-in&gt;&quot;
# 1 &quot;&lt;command-line&gt;&quot;
# 31 &quot;&lt;command-line&gt;&quot;
# 1 &quot;/usr/include/stdc-predef.h&quot; 1 3 4
# 32 &quot;&lt;command-line&gt;&quot; 2
cc1: warning: ./foo.h.gch: not used because `__SSP__&apos; not defined [-Winvalid-pch]
cc1: error: one or more PCH files were found, but they were invalid
cc1: fatal error: foo.h: No such file or directory
compilation terminated.

А если передать препроцессору -fstack-protector, то включается нормально:

$ gcc-6 -fstack-protector -Winvalid-pch -fpch-preprocess -include foo.h -E - &lt;/dev/null               1
# 1 &quot;&lt;stdin&gt;&quot;
# 1 &quot;&lt;built-in&gt;&quot;
# 1 &quot;&lt;command-line&gt;&quot;
# 31 &quot;&lt;command-line&gt;&quot;
# 1 &quot;/usr/include/stdc-predef.h&quot; 1 3 4
# 32 &quot;&lt;command-line&gt;&quot; 2
#pragma GCC pch_preprocess &quot;./foo.h.gch&quot;
# 1 &quot;&lt;stdin&gt;&quot;

И действительно, разница на один этот дифайн __SSP__:

$ diff -U1 &lt;(cpp  -dM &lt;/dev/null) &lt;(cpp -fstack-protector -dM &lt;/dev/null)                                                   @@ -198,2 +198,3 @@
 #define __INT_LEAST8_MAX__ 0x7f
+#define __SSP__ 1
 #define __SIZEOF_INT128__ 16

Получается интеграция -fstack-protector в джисиси не совсем симлис.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>