<feed xmlns='http://www.w3.org/2005/Atom'>
<title>efi-boot-shim.git/Cryptlib/OpenSSL/Makefile, branch 15.8</title>
<subtitle> (mirror of https://github.com/vyos/efi-boot-shim.git)
</subtitle>
<id>https://git.amelek.net/vyos/efi-boot-shim.git/atom?h=15.8</id>
<link rel='self' href='https://git.amelek.net/vyos/efi-boot-shim.git/atom?h=15.8'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/'/>
<updated>2023-06-21T19:04:38+00:00</updated>
<entry>
<title>Use -Wno-unused-but-set-variable for Cryptlib and OpenSSL</title>
<updated>2023-06-21T19:04:38+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2023-06-14T20:04:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=243f12589dbb5e9549d0e08760a03f3a41cd82a2'/>
<id>urn:sha1:243f12589dbb5e9549d0e08760a03f3a41cd82a2</id>
<content type='text'>
Cryptlib and OpenSSL both currently throw warnings with some compilers
using -Wunused-but-set-variable:

  clang -std=gnu11 -ggdb -ffreestanding -fmacro-prefix-map=/home/pjones/devel/github.com/shim/main/= -fno-stack-protector -fno-strict-aliasing -fpic -fshort-wchar -nostdinc -m64 -mno-mmx -mno-sse -mno-red-zone  -Os -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Werror -I/home/pjones/devel/github.com/shim/main/Cryptlib -I/home/pjones/devel/github.com/shim/main/Cryptlib/Include -I/home/pjones/devel/github.com/shim/main/gnu-efi/inc -I/home/pjones/devel/github.com/shim/main/gnu-efi/inc/x86_64 -I/home/pjones/devel/github.com/shim/main/gnu-efi/inc/protocol -isystem /home/pjones/devel/github.com/shim/main/include/system -isystem /usr/lib64/clang/16/include -DMDE_CPU_X64   -c -o Pk/CryptX509.o Pk/CryptX509.c
Pk/CryptX509.c:94:19: error: variable 'Index' set but not used [-Werror,-Wunused-but-set-variable]
    UINTN           Index;
                    ^
  clang -std=gnu11 -ggdb -ffreestanding -fmacro-prefix-map=/home/pjones/devel/github.com/shim/main/= -fno-stack-protector -fno-strict-aliasing -fpic -fshort-wchar -nostdinc -m64 -mno-mmx -mno-sse -mno-red-zone  -Os -Wall -Wextra -Wno-missing-field-initializers -Wno-empty-body -Wno-implicit-fallthrough   -Wno-unused-parameter -Werror -I/home/pjones/devel/github.com/shim/main/Cryptlib/OpenSSL -I/home/pjones/devel/github.com/shim/main/Cryptlib -I/home/pjones/devel/github.com/shim/main/Cryptlib/OpenSSL/Include/ -I/home/pjones/devel/github.com/shim/main/Cryptlib/OpenSSL/crypto -I/home/pjones/devel/github.com/shim/main/Cryptlib/Include -I/home/pjones/devel/github.com/shim/main/gnu-efi/inc -I/home/pjones/devel/github.com/shim/main/gnu-efi/inc/x86_64 -I/home/pjones/devel/github.com/shim/main/gnu-efi/inc/protocol -I/home/pjones/devel/github.com/shim/main/Cryptlib/OpenSSL/crypto/asn1 -I/home/pjones/devel/github.com/shim/main/Cryptlib/OpenSSL/crypto/evp -I/home/pjones/devel/github.com/shim/main/Cryptlib/OpenSSL/crypto/modes -I/home/pjones/devel/github.com/shim/main/Cryptlib/OpenSSL/crypto/include -isystem /home/pjones/devel/github.com/shim/main/include/system -isystem /usr/lib64/clang/16/include -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DOPENSSL_SMALL_FOOTPRINT -DPEDANTIC -DMDE_CPU_X64   -c -o crypto/asn1/t_x509.o crypto/asn1/t_x509.c
crypto/asn1/t_x509.c:504:18: error: variable 'l' set but not used [-Werror,-Wunused-but-set-variable]
      int ret = 0, l, i;
                   ^

Since we normally build with -Werror, these cause builds to fail in
these cases.  While the bad code should be addressed, it appears
generally safe, so we should solve it upstream.

This patch adds -Wno-unused-but-set-variable to the Cryptlib Makefile,
and removes the conditionalization on gcc in the OpenSSL Makefile, as
clang now has this argument, and since we don't support building with
clang for the final build, it's useful to have clang-based tools
working.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>openssl: nerf some -W flags for clang.</title>
<updated>2021-03-12T09:15:01+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2021-03-11T16:40:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=df74fff124a84428c9717a89ff00ca0931d09c52'/>
<id>urn:sha1:df74fff124a84428c9717a89ff00ca0931d09c52</id>
<content type='text'>
Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>make: use -Wextra (minus some obnoxious bits)</title>
<updated>2021-03-10T20:54:20+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2021-03-09T22:15:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=1bc4bf063adf57a17e5d6d8dc6399f03080a0566'/>
<id>urn:sha1:1bc4bf063adf57a17e5d6d8dc6399f03080a0566</id>
<content type='text'>
gcc -Wextra, has a lot of good, useful checks, a few obnoxious checks,
and a few absolutely insane checks.

This enables -Wextra, but disables -Wmissing-field-initializers, because
it is irrational nonsense that just leads to worse code.  It also
disables some specific things in the Cryptlib and Cryptlib/OpenSSL
trees:

Both:
-Wno-unused-parameter
 - there are a fair number of functions that have to conform to some API
   or another but have arguments that are unused, but haven't been
   marked with UNUSED; we don't need to see warnings about them.

Cryptlib/OpenSSL:
-Wno-empty-body
 - functions that exist merely to populate some API
-Wno-implicit-fallthrough
 - these probably should get fixed someday, but I bet upstream will do
   it and rebasing will solve it
-Wno-old-style-declaration
 - this gripes if you write "const static" instead of "static const".
   Again I expect rebasing will fix it at some point.
-Wno-unused-but-set-variable
 - self explanatory, and again, I expect a rebase to solve it someday.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>Fix stdarg to work the same everywhere.</title>
<updated>2021-03-10T20:54:20+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2021-03-09T19:40:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=9beca885c29c77bb901547321a5ce6fd3c9c8ee3'/>
<id>urn:sha1:9beca885c29c77bb901547321a5ce6fd3c9c8ee3</id>
<content type='text'>
This gets us the same working definition for VA_* va_* etc everywhere,
and it's the same definition edk2 is using.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>Restructure our includes.</title>
<updated>2021-03-10T20:54:20+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2021-03-09T16:42:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=f033a1da9f4c3acf7e3dfef906d01e348b6fcf42'/>
<id>urn:sha1:f033a1da9f4c3acf7e3dfef906d01e348b6fcf42</id>
<content type='text'>
This re-structures our includes so we can be sure everything is always
including all the system headers in a uniform, predictable way.

Temporarily it also adds a bunch of junk at all the places we use
variadic functions to specifically pick either the MS (cdecl) or ELF
ABIs.

I'm not 100% sure that's all correct (see later patch) but it's enough
to allow this to build.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>More minor makefile cleanups</title>
<updated>2021-03-09T21:52:53+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2021-03-05T23:01:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=4425a1bf8b60cc4a3a17f5ee98d0ee771447815d'/>
<id>urn:sha1:4425a1bf8b60cc4a3a17f5ee98d0ee771447815d</id>
<content type='text'>
This patch does some makefile cleanups, to fix the parts that are
actually just bad that the previous patch left in for clarity:

- removes -fno-builtin .  This flag is implied by -ffreestanding , which
  we use everywhere.
- gets rid of the two places where ARM has their own -O flags for no
  real reason.  Note that this will make those use -Os instead of -O2.
- export VERBOSE and DEBUG if they're set.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>static analysis: make our build targets work better</title>
<updated>2021-03-09T21:52:53+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2021-03-08T17:42:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=7d5df1cebdbdc3ed11cde165a752cf358878aa8a'/>
<id>urn:sha1:7d5df1cebdbdc3ed11cde165a752cf358878aa8a</id>
<content type='text'>
This improves our static analysis targets by making them work better
with our make variables, and inhibits the use of ccache while building
those.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>Re-organize a bunch of CFLAGS-related makefile bits</title>
<updated>2021-03-09T21:52:53+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2021-03-05T22:44:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=dddeaf3f7dc8d30640119e999bbfabf4ce068a68'/>
<id>urn:sha1:dddeaf3f7dc8d30640119e999bbfabf4ce068a68</id>
<content type='text'>
Some of our makefile bits are a mess, as you may have noticed, making
changes to them difficult to review.

This patch attempts to make some parts of them vaguely less of a mess,
in order to facilitate review of follow-up changes.  To so it:

- coalesces feature flags, optimizations, -W{no-,}, -W{no-}error,
  include directives, and define/undefine directives into (mostly)
  separate groups.
- exports them as appropriate so the sub-makes can use them
- Makes sure we have -Wextra -Werror everywhere, but adds -Wno-foo and
  -Wno-error=foo directives at the appropriate places to keep the net
  warnings the same.
- makes the arch defines in Cryptlib and Cryptlib/OpenSSL use the
  appropriate ones, with no attempt to make them less stupid, without
  changing the overall order.
- coalesces the various includes, with no attempt to make them less
  stupid, without changing the overall order.
- One giant glaring whitespace fix in Cryptlib/OpenSSL/Makefile

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>Use gcc -Os instead of -O0.</title>
<updated>2021-02-16T08:12:48+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2019-11-22T21:14:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=4edb31fcfc12dc0627edf8018f3a179dffe634a1'/>
<id>urn:sha1:4edb31fcfc12dc0627edf8018f3a179dffe634a1</id>
<content type='text'>
Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>Work around clang bugs for scan-build.</title>
<updated>2018-03-15T15:23:26+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2018-03-15T15:13:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=138deeff23707b2db46bbb5c90f1c08bd4b2a429'/>
<id>urn:sha1:138deeff23707b2db46bbb5c90f1c08bd4b2a429</id>
<content type='text'>
I don't think the x86 binaries clang builds will actually work unless
they just infer -maccumulate-outgoing-args from __attribute__((__ms_abi__),
but it's nice to have the analyzer working.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
</feed>
