linuxManualConfig: don't mangle --build-id

In order to have our linux builds be reproducible we patch the
`Makefile` to use `--build-id=none` as opposed to the default
`--build-id=sha1`. The way we've been doing this, however, caused the
flag to be mangled, and being set to `--build-id=none=sha1`. While bfd
seems to parse this normally, lld will loudly complain that the flag
does not exist:

```
linux>   LD      .tmp_vmlinux.kallsyms1
linux> ld.lld: error: unknown --build-id style: none=sha1
```

With this change the flag is now correctly set to `--build-id=none`.
This commit is contained in:
Bernardo Meurer 2021-07-10 13:17:52 -07:00
parent dafb3dfc48
commit 31bb7be11a
No known key found for this signature in database
GPG key ID: F4C0D53B8D14C246

View file

@ -119,7 +119,7 @@ let
# This way kernels can be bit-by-bit reproducible depending on settings
# (e.g. MODULE_SIG and SECURITY_LOCKDOWN_LSM need to be disabled).
# See also https://kernelnewbies.org/BuildId
sed -i Makefile -e 's|--build-id|--build-id=none|'
sed -i Makefile -e 's|--build-id=[^ ]*|--build-id=none|'
patchShebangs scripts/ld-version.sh
'';