Author: xry111
Date: Thu Mar  4 01:56:47 2021
New Revision: 24334

Log:
CFLAGS/CPPFLAGS cleanup

Move -I and -D into CPPFLAGS, and for others use ${CFLAGS:--O2 -g} to
prevent from building "non-optimized" binary.

Modified:
   trunk/BOOK/general/prog/clisp.xml
   trunk/BOOK/gnome/applications/evince.xml
   trunk/BOOK/multimedia/libdriv/audiofile.xml
   trunk/BOOK/multimedia/libdriv/liba52.xml
   trunk/BOOK/multimedia/libdriv/libmusicbrainz.xml
   trunk/BOOK/multimedia/videoutils/vlc.xml
   trunk/BOOK/networking/netprogs/ntp.xml
   trunk/BOOK/networking/netprogs/samba.xml
   trunk/BOOK/postlfs/filesystems/sshfs.xml
   trunk/BOOK/pst/sgml/openjade.xml
   trunk/BOOK/server/mail/dovecot.xml
   trunk/BOOK/x/dm/lightdm.xml
   trunk/BOOK/x/lib/gtkmm2.xml
   trunk/BOOK/xsoft/other/thunderbird.xml
   trunk/BOOK/xsoft/other/tigervnc.xml

Modified: trunk/BOOK/general/prog/clisp.xml
==============================================================================
--- trunk/BOOK/general/prog/clisp.xml   Wed Mar  3 18:54:53 2021        (r24333)
+++ trunk/BOOK/general/prog/clisp.xml   Thu Mar  4 01:56:47 2021        (r24334)
@@ -112,7 +112,7 @@
     </para>
 
 <screen><userinput remap="pre">case $(uname -m) in
-    i?86) export CFLAGS+=-falign-functions=4 ;;
+    i?86) export CFLAGS="${CFLAGS:--O2 -g} -falign-functions=4" ;;
 esac</userinput></screen>
 
     <para>

Modified: trunk/BOOK/gnome/applications/evince.xml
==============================================================================
--- trunk/BOOK/gnome/applications/evince.xml    Wed Mar  3 18:54:53 2021        
(r24333)
+++ trunk/BOOK/gnome/applications/evince.xml    Thu Mar  4 01:56:47 2021        
(r24334)
@@ -128,8 +128,7 @@
       This has no effect on systems without TeXLive installed.
     </para>
 
-<screen><userinput remap="pre">export CFLAGS="$CFLAGS 
-I/opt/texlive/&texlive-year;/include" &amp;&amp;
-export CXXFLAGS="$CXXFLAGS -I/opt/texlive/&texlive-year;/include" &amp;&amp;
+<screen><userinput remap="pre">export 
CPPFLAGS="-I/opt/texlive/&texlive-year;/include" &amp;&amp;
 export LDFLAGS="$LDFLAGS 
-L/opt/texlive/&texlive-year;/lib"</userinput></screen>
 
     <para>
@@ -174,11 +173,8 @@
     </para>
     -->
 
-<!-- When moving to Meson, I installed the whole texlive suite from source.
-     I was able to verify that this is no longer required. I'm assuming it was
-     one of evince-3.36.3 or texlive-2020 that fixed this.
     <para>
-      <parameter>CFLAGS="$CFLAGS ..." CXXFLAGS="$CXXFLAGS ..." 
LDFLAGS="$LDFLAGS ..."</parameter>: If
+      <parameter>CPPFLAGS="..." LDFLAGS="$LDFLAGS ..."</parameter>: If
       <application>TeXLive</application> has been installed in
       <filename class="directory">/opt/texlive-&texlive-year;</filename> the
       configure script will find <filename 
class='libraryfile'>libkpathsea.so</filename>
@@ -187,7 +183,7 @@
       <application>TeXLive</application> has not been installed does not break 
the
       build.
     </para>
--->
+
     <para>
       <parameter>-Dgtk_doc=false</parameter>: This switch disables generating
       the gtk-doc API reference documentation. If you have

Modified: trunk/BOOK/multimedia/libdriv/audiofile.xml
==============================================================================
--- trunk/BOOK/multimedia/libdriv/audiofile.xml Wed Mar  3 18:54:53 2021        
(r24333)
+++ trunk/BOOK/multimedia/libdriv/audiofile.xml Thu Mar  4 01:56:47 2021        
(r24334)
@@ -102,7 +102,7 @@
       commands:
     </para>
 
-<screen><userinput>CXXFLAGS=-std=c++98 \
+<screen><userinput>CXXFLAGS="${CXXFLAGS:--O2 -g} -std=c++98" \
 ./configure --prefix=/usr --disable-static &amp;&amp;
 
 make</userinput></screen>

Modified: trunk/BOOK/multimedia/libdriv/liba52.xml
==============================================================================
--- trunk/BOOK/multimedia/libdriv/liba52.xml    Wed Mar  3 18:54:53 2021        
(r24333)
+++ trunk/BOOK/multimedia/libdriv/liba52.xml    Thu Mar  4 01:56:47 2021        
(r24334)
@@ -93,7 +93,7 @@
             --mandir=/usr/share/man \
             --enable-shared \
             --disable-static \
-            CFLAGS="-g -O2 $([ $(uname -m) = x86_64 ] &amp;&amp; echo -fPIC)" 
&amp;&amp;
+            CFLAGS="${CFLAGS:--g -O2} $([ $(uname -m) = x86_64 ] &amp;&amp; 
echo -fPIC)" &amp;&amp;
 make</userinput></screen>
 
     <para>

Modified: trunk/BOOK/multimedia/libdriv/libmusicbrainz.xml
==============================================================================
--- trunk/BOOK/multimedia/libdriv/libmusicbrainz.xml    Wed Mar  3 18:54:53 
2021        (r24333)
+++ trunk/BOOK/multimedia/libdriv/libmusicbrainz.xml    Thu Mar  4 01:56:47 
2021        (r24334)
@@ -113,7 +113,7 @@
 
 <screen><userinput>patch -Np1 -i 
../libmusicbrainz-&libmusicbrainz-version;-missing-includes-1.patch &amp;&amp;
 
-CXXFLAGS=-std=c++98 \
+CXXFLAGS="${CXXFLAGS:--O2 -g} -std=c++98" \
 ./configure --prefix=/usr --disable-static &amp;&amp;
 make</userinput></screen>
 

Modified: trunk/BOOK/multimedia/videoutils/vlc.xml
==============================================================================
--- trunk/BOOK/multimedia/videoutils/vlc.xml    Wed Mar  3 18:54:53 2021        
(r24333)
+++ trunk/BOOK/multimedia/videoutils/vlc.xml    Thu Mar  4 01:56:47 2021        
(r24334)
@@ -230,9 +230,9 @@
     </para>
 <!--
 <screen><userinput>sed -i '/vlc_demux.h/a #define LUA_COMPAT_APIINTCASTS' 
modules/lua/vlc.h   &amp;&amp;-->
-<screen><userinput>export LUAC=/usr/bin/luac5.2                 &amp;&amp;
-export LUA_LIBS="$(pkg-config --libs lua52)" &amp;&amp;
-export CFLAGS="$(pkg-config --cflags lua52)" &amp;&amp;
+<screen><userinput>export LUAC=/usr/bin/luac5.2                   &amp;&amp;
+export LUA_LIBS="$(pkg-config --libs lua52)"   &amp;&amp;
+export CPPFLAGS="$(pkg-config --cflags lua52)" &amp;&amp;
 
 BUILDCC=gcc ./configure --prefix=/usr    \
                         --disable-opencv \

Modified: trunk/BOOK/networking/netprogs/ntp.xml
==============================================================================
--- trunk/BOOK/networking/netprogs/ntp.xml      Wed Mar  3 18:54:53 2021        
(r24333)
+++ trunk/BOOK/networking/netprogs/ntp.xml      Thu Mar  4 01:56:47 2021        
(r24334)
@@ -135,7 +135,7 @@
   Note: Check if -fcommon is still required on versions gtr 4.2.8p14
         Its a "hack" for gcc-10
 -->
-<screen><userinput>./configure CFLAGS="-O2 -g -fPIC -fcommon $CFLAGS" \
+<screen><userinput>./configure CFLAGS="${CFLAGS:--O2 -g} -fPIC -fcommon" \
             --prefix=/usr         \
             --bindir=/usr/sbin    \
             --sysconfdir=/etc     \

Modified: trunk/BOOK/networking/netprogs/samba.xml
==============================================================================
--- trunk/BOOK/networking/netprogs/samba.xml    Wed Mar  3 18:54:53 2021        
(r24333)
+++ trunk/BOOK/networking/netprogs/samba.xml    Thu Mar  4 01:56:47 2021        
(r24334)
@@ -185,7 +185,7 @@
       commands:
     </para>
 
-<screen revision="sysv"><userinput>CFLAGS="-I/usr/include/tirpc"          \
+<screen revision="sysv"><userinput>CPPFLAGS="-I/usr/include/tirpc"        \
 LDFLAGS="-ltirpc"                      \
 ./configure                            \
     --prefix=/usr                      \
@@ -199,7 +199,7 @@
     --enable-selftest                  &amp;&amp;
 make</userinput></screen>
 
-<screen revision="systemd"><userinput>CFLAGS="-I/usr/include/tirpc"          \
+<screen revision="systemd"><userinput>CPPFLAGS="-I/usr/include/tirpc"        \
 LDFLAGS="-ltirpc"                      \
 ./configure                            \
     --prefix=/usr                      \

Modified: trunk/BOOK/postlfs/filesystems/sshfs.xml
==============================================================================
--- trunk/BOOK/postlfs/filesystems/sshfs.xml    Wed Mar  3 18:54:53 2021        
(r24333)
+++ trunk/BOOK/postlfs/filesystems/sshfs.xml    Thu Mar  4 01:56:47 2021        
(r24334)
@@ -95,17 +95,6 @@
 
   <sect2 role="installation">
     <title>Installation of Sshfs</title>
-    <!--
-    <para>
-      If you are building on i686, <application>sshfs</application> needs
-      an extra CFLAGS setting to be defined. This prevents an integer
-      overflow. To do this, run the following command:
-    </para>
-
-<screen><userinput>if [ $(uname -m) = "i686" ]; then
-  export CFLAGS+="-D_FILE_OFFSET_BITS=64";
-fi</userinput></screen>
-    -->
 
     <para>
       Install <application>Sshfs</application> by running the following

Modified: trunk/BOOK/pst/sgml/openjade.xml
==============================================================================
--- trunk/BOOK/pst/sgml/openjade.xml    Wed Mar  3 18:54:53 2021        (r24333)
+++ trunk/BOOK/pst/sgml/openjade.xml    Thu Mar  4 01:56:47 2021        (r24334)
@@ -114,7 +114,7 @@
       commands:
     </para>
 
-<screen><userinput>export CXXFLAGS="$CXXFLAGS -fno-lifetime-dse"            
&amp;&amp;
+<screen><userinput>export CXXFLAGS="${CXXFLAGS:--O2 -g} -fno-lifetime-dse"     
       &amp;&amp;
 ./configure --prefix=/usr                                \
             --mandir=/usr/share/man                      \
             --enable-http                                \

Modified: trunk/BOOK/server/mail/dovecot.xml
==============================================================================
--- trunk/BOOK/server/mail/dovecot.xml  Wed Mar  3 18:54:53 2021        (r24333)
+++ trunk/BOOK/server/mail/dovecot.xml  Thu Mar  4 01:56:47 2021        (r24334)
@@ -134,7 +134,7 @@
       commands:
     </para>
 
-<screen revision="sysv"><userinput>CFLAGS+=" -I/usr/include/tirpc" \
+<screen revision="sysv"><userinput>CPPFLAGS="-I/usr/include/tirpc" \
 LDFLAGS+=" -ltirpc" \
 ./configure --prefix=/usr                          \
             --sysconfdir=/etc                      \
@@ -144,7 +144,7 @@
             --disable-static &amp;&amp;
 make</userinput></screen>
 
-<screen revision="systemd"><userinput>CFLAGS+=" -I/usr/include/tirpc" \
+<screen revision="systemd"><userinput>CPPFLAGS="-I/usr/include/tirpc" \
 LDFLAGS+=" -ltirpc" \
 ./configure --prefix=/usr                          \
             --sysconfdir=/etc                      \
@@ -173,7 +173,7 @@
     <title>Command Explanations</title>
 
     <para>
-      <command>CFLAGS+=...LDFLAGS+=...</command>: build with libtirpc
+      <command>CPPFLAGS=... LDFLAGS+=...</command>: build with libtirpc
       instead of the recently removed RPC code provided by GlibC.
     </para>
 

Modified: trunk/BOOK/x/dm/lightdm.xml
==============================================================================
--- trunk/BOOK/x/dm/lightdm.xml Wed Mar  3 18:54:53 2021        (r24333)
+++ trunk/BOOK/x/dm/lightdm.xml Thu Mar  4 01:56:47 2021        (r24334)
@@ -264,11 +264,6 @@
     </para>
 
     <para>
-      <parameter>CFLAGS=...</parameter>: those two switches ensures some
-      warnings are not treated as errors.
-    </para>
-
-    <para>
       <parameter>HAVE_EXO_CSOURCE=yes</parameter>: although
       <command>exo-csource</command> is not needed in a normal build,
       <command>configure</command> throws an error if it is not found on the

Modified: trunk/BOOK/x/lib/gtkmm2.xml
==============================================================================
--- trunk/BOOK/x/lib/gtkmm2.xml Wed Mar  3 18:54:53 2021        (r24333)
+++ trunk/BOOK/x/lib/gtkmm2.xml Thu Mar  4 01:56:47 2021        (r24334)
@@ -115,21 +115,6 @@
 <screen role="root"><userinput>make install</userinput></screen>
   </sect2>
 
-<!-- as of 2.24.5, this is no longer needed. -renodr
-  <sect2 role="commands">
-    <title>Command Explanations</title>
-
-    <para>
-      <command>CXXFLAGS="-g -O2 -std=c++11" ./configure...</command>: while
-      Gtkmm-&gtkmm2-version; has not yet been ported to the 2011 ISO C++
-      standard, all its dependencies have. <command>-std=c++11</command> has
-      to be used as an option to <command>g++</command>. We pass it into
-      <envar>CXXFLAGS</envar> together with the default options.
-    </para>
-
-  </sect2>
--->
-
   <sect2 role="content">
     <title>Contents</title>
 

Modified: trunk/BOOK/xsoft/other/thunderbird.xml
==============================================================================
--- trunk/BOOK/xsoft/other/thunderbird.xml      Wed Mar  3 18:54:53 2021        
(r24333)
+++ trunk/BOOK/xsoft/other/thunderbird.xml      Thu Mar  4 01:56:47 2021        
(r24334)
@@ -185,15 +185,6 @@
 ac_add_options --with-system-nspr
 ac_add_options --with-system-nss
 ac_add_options --with-system-icu
-<!--Not with libvpx-1.8.0 or later
-ac_add_options - -with-system-libvpx
-====
-These do not seem to be needed any more
-# Set CFLAGS and CXXFLAGS to prevent segfaults due to aggressive
-# optimizations in GCC-6:
-export CFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse 
-fno-schedule-insns2"
-export CXXFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse 
-fno-schedule-insns2"
--->
 # The elf-hack causes failed installs on some machines.
 # It is supposed to improve startup time and it shrinks libxul.so
 # by a few MB - comment this if you know your machine is not affected.

Modified: trunk/BOOK/xsoft/other/tigervnc.xml
==============================================================================
--- trunk/BOOK/xsoft/other/tigervnc.xml Wed Mar  3 18:54:53 2021        (r24333)
+++ trunk/BOOK/xsoft/other/tigervnc.xml Thu Mar  4 01:56:47 2021        (r24334)
@@ -178,7 +178,7 @@
 pushd unix/xserver &amp;&amp;
   autoreconf -fiv  &amp;&amp;
 
-  CFLAGS="$CFLAGS -I/usr/include/drm" \
+  CPPFLAGS="-I/usr/include/drm"       \
   ./configure $XORG_CONFIG            \
       --disable-xwayland    --disable-dri        --disable-dmx         \
       --disable-xorg        --disable-xnest      --disable-xvfb        \
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to