You are not logged in.
Hi, I'm working on a pkgbuild for the intel NPU driver (for the sake of packaging; I don't have the hardware for testing)
the last issue I'm having is that it fail with -D_FORTIFY_SOURCE=3 while with -D_FORTIFY_SOURCE=2 build
How can I replace or change it?
Last edited by FabioLolix (2024-11-18 18:30:29)
Offline
Something along the lines of
export CFLAGS="${CFLAGS/D_FORTIFY_SOURCE=3/D_FORTIFY_SOURCE=2}"
in the PKGBUILD should work.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
That dind't work but I found a solution while casually looking into openvino pkgbuild which have the same problem
export CFLAGS="${CFLAGS/-Wp,-D_FORTIFY_SOURCE=?/}"
export CXXFLAGS="${CXXFLAGS/-Wp,-D_FORTIFY_SOURCE=?/}"
Offline
That removes it altogether, which isn't what you want.
Offline
OK, got it to work extending WorMzy suggestion to CXXFLAGS, this is mostly written in c++, didn't think about it at the first try
export CFLAGS="${CFLAGS/D_FORTIFY_SOURCE=3/D_FORTIFY_SOURCE=2}"
export CXXFLAGS="${CXXFLAGS/D_FORTIFY_SOURCE=3/D_FORTIFY_SOURCE=2}"
Edited with the last suggestion
Last edited by FabioLolix (2024-11-18 18:52:03)
Offline
You should change the instance of 'CFLAGS' to 'CXXFLAGS' in the second line, otherwise you'll lose any c++-specific flags (like '-Wp,-D_GLIBCXX_ASSERTIONS').
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline