<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git/m4/compiler_options.m4, branch th/fix-python-test</title>
<subtitle>gitlab.freedesktop.org: NetworkManager/NetworkManager.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/'/>
<entry>
<title>build: disable "-Wunknown-pragmas" warning</title>
<updated>2019-05-29T07:42:40+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-05-28T11:08:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=a307bd6ec4c1724324d0a2fbb09ebfe46a996d13'/>
<id>a307bd6ec4c1724324d0a2fbb09ebfe46a996d13</id>
<content type='text'>
clang on CentOS 7.6 (3.4.2-9.el7) warns:

      CC       clients/tui/newt/clients_tui_newt_libnmt_newt_a-nmt-newt-button.o
    In file included from ../clients/tui/newt/nmt-newt-button.c:26:
    In file included from ../shared/nm-default.h:280:
    ../shared/nm-glib-aux/nm-macros-internal.h:1617:2: error: unknown warning group -Wstringop-truncation, ignored [-Werror,-Wunknown-pragmas]
            NM_PRAGMA_WARNING_DISABLE ("-Wstringop-truncation");
            ^
    ../shared/nm-glib-aux/nm-macros-internal.h:419:9: note: expanded from macro NM_PRAGMA_WARNING_DISABLE
            _Pragma(_NM_PRAGMA_WARNING_DO(warning))
            ^
    &lt;scratch space&gt;:109:25: note: expanded from here
     GCC diagnostic ignored "-Wstringop-truncation"
                            ^

This warning totally defeats the purpose of why we use the pragma in the
first place.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
clang on CentOS 7.6 (3.4.2-9.el7) warns:

      CC       clients/tui/newt/clients_tui_newt_libnmt_newt_a-nmt-newt-button.o
    In file included from ../clients/tui/newt/nmt-newt-button.c:26:
    In file included from ../shared/nm-default.h:280:
    ../shared/nm-glib-aux/nm-macros-internal.h:1617:2: error: unknown warning group -Wstringop-truncation, ignored [-Werror,-Wunknown-pragmas]
            NM_PRAGMA_WARNING_DISABLE ("-Wstringop-truncation");
            ^
    ../shared/nm-glib-aux/nm-macros-internal.h:419:9: note: expanded from macro NM_PRAGMA_WARNING_DISABLE
            _Pragma(_NM_PRAGMA_WARNING_DO(warning))
            ^
    &lt;scratch space&gt;:109:25: note: expanded from here
     GCC diagnostic ignored "-Wstringop-truncation"
                            ^

This warning totally defeats the purpose of why we use the pragma in the
first place.
</pre>
</div>
</content>
</entry>
<entry>
<title>build: document defaults consistently</title>
<updated>2019-04-16T13:57:20+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2019-04-15T13:35:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=ba461085a2982df41d0bdbd876560ef5b08b05ef'/>
<id>ba461085a2982df41d0bdbd876560ef5b08b05ef</id>
<content type='text'>
[default=meh] instead of (default is meh) or (default: meh).

https://github.com/NetworkManager/NetworkManager/pull/344
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[default=meh] instead of (default is meh) or (default: meh).

https://github.com/NetworkManager/NetworkManager/pull/344
</pre>
</div>
</content>
</entry>
<entry>
<title>build: re-enable "-Wmissing-braces" warning</title>
<updated>2019-02-08T19:14:50+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-02-08T11:05:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=c537e5fd2591379da6e3c2a3759fd0e1e2aaebb3'/>
<id>c537e5fd2591379da6e3c2a3759fd0e1e2aaebb3</id>
<content type='text'>
We should always get the nesting in struct initializers right.
Everyhing else is error-prone, and the warning is good.

Enable it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should always get the nesting in struct initializers right.
Everyhing else is error-prone, and the warning is good.

Enable it.
</pre>
</div>
</content>
</entry>
<entry>
<title>build: fix building with LTO</title>
<updated>2019-02-04T09:55:25+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2019-02-02T14:57:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=e6cf4213a774020cfcc27983354c81b3e92caa9e'/>
<id>e6cf4213a774020cfcc27983354c81b3e92caa9e</id>
<content type='text'>
Building with link-time optimization requires some tricks explained
in [1].

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200#c28
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Building with link-time optimization requires some tricks explained
in [1].

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200#c28
</pre>
</div>
</content>
</entry>
<entry>
<title>build: don't change CFLAGS from configure.ac</title>
<updated>2018-09-18T13:15:31+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2018-09-04T08:25:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=51776b297e04dabb24b7b645744da7100f85ff2e'/>
<id>51776b297e04dabb24b7b645744da7100f85ff2e</id>
<content type='text'>
If configure.ac automatically adds compiler flags to CFLAGS, it
becomes hard to override one of them for a specific target because
CFLAGS is added last. It is better to use AM_CFLAGS. See [1].

[1] https://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If configure.ac automatically adds compiler flags to CFLAGS, it
becomes hard to override one of them for a specific target because
CFLAGS is added last. It is better to use AM_CFLAGS. See [1].

[1] https://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html
</pre>
</div>
</content>
</entry>
<entry>
<title>build: set -Wall when probing extra warning options</title>
<updated>2018-08-07T14:58:36+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2018-07-24T10:35:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=e2071e92f03d091ae0f4d84029742ac3c173830a'/>
<id>e2071e92f03d091ae0f4d84029742ac3c173830a</id>
<content type='text'>
Some warnings depends on others: -Wformat-security won't work without
-Wformat. With -Wall we're confident enough that we have important
warnings enabled and in any case we're going to enable it anyway.

https://github.com/NetworkManager/NetworkManager/pull/175
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some warnings depends on others: -Wformat-security won't work without
-Wformat. With -Wall we're confident enough that we have important
warnings enabled and in any case we're going to enable it anyway.

https://github.com/NetworkManager/NetworkManager/pull/175
</pre>
</div>
</content>
</entry>
<entry>
<title>build: pass -std=gnu99 to compiler</title>
<updated>2018-07-17T15:46:39+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-07-12T08:23:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=b9bc20f4da12f15b8950daea177e6dda42cd6c3f'/>
<id>b9bc20f4da12f15b8950daea177e6dda42cd6c3f</id>
<content type='text'>
With --enable-more-warnings, we already used -std=gnu99, see
commit ba2b2de3adcf3e8286249523e3841858e0c2655c.

Compilation may behave differently depending on the selected
C standard that we choose. It seems wrong, with more-warnings,
to build against a C standard, while otherwise leaving it undefind.

Indeed, one might argue, that our build system should not use
such compiler specific options. At least, not without detecting
support for the compiler option during ./configure.

However:

- we already did this for --enable-more-warnings.

- we should not program against a theoretical compiler. In practice,
  only gcc and clang works to build NetworkManager. Both these compilers
  support this option, so there is no reason to not use it. If we ever
  come into the situation to support another compiler, adjusting -std=gnu99
  will be the smallest problem. Until that happens (and that's far from
  imminent), don't pretend to be portable to non-existing compilers and
  use the flag that in practice is available.

See-also: https://gcc.gnu.org/onlinedocs/gcc/Standards.html
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With --enable-more-warnings, we already used -std=gnu99, see
commit ba2b2de3adcf3e8286249523e3841858e0c2655c.

Compilation may behave differently depending on the selected
C standard that we choose. It seems wrong, with more-warnings,
to build against a C standard, while otherwise leaving it undefind.

Indeed, one might argue, that our build system should not use
such compiler specific options. At least, not without detecting
support for the compiler option during ./configure.

However:

- we already did this for --enable-more-warnings.

- we should not program against a theoretical compiler. In practice,
  only gcc and clang works to build NetworkManager. Both these compilers
  support this option, so there is no reason to not use it. If we ever
  come into the situation to support another compiler, adjusting -std=gnu99
  will be the smallest problem. Until that happens (and that's far from
  imminent), don't pretend to be portable to non-existing compilers and
  use the flag that in practice is available.

See-also: https://gcc.gnu.org/onlinedocs/gcc/Standards.html
</pre>
</div>
</content>
</entry>
<entry>
<title>m4/trivial: fix indentation</title>
<updated>2018-07-17T15:42:24+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-07-12T08:39:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=cc12413c0888c18f9b569c2776a01967e6efd1f9'/>
<id>cc12413c0888c18f9b569c2776a01967e6efd1f9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>m4: parametrize flags variable</title>
<updated>2018-02-16T15:06:59+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2018-02-16T14:49:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=0999ebdf6d795a84e2afbc13282b400fbd6fd4b5'/>
<id>0999ebdf6d795a84e2afbc13282b400fbd6fd4b5</id>
<content type='text'>
Make it possible to add compiler options to a different variable than
CFLAGS. This is useful to conditionally disable a compiler warning for a
subpart of a tree.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make it possible to add compiler options to a different variable than
CFLAGS. This is useful to conditionally disable a compiler warning for a
subpart of a tree.
</pre>
</div>
</content>
</entry>
<entry>
<title>m4/trivial: add a bug link to a compiler warning check</title>
<updated>2018-02-08T16:11:46+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2018-02-07T20:01:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=422e87ec0d08d51c406b12be70d19e725d9cca4d'/>
<id>422e87ec0d08d51c406b12be70d19e725d9cca4d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
