Skip to content

multipath-tools: fix build failures on GCC 4.8

Mauricio Faria de Oliveira dm-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2multipath-tools: fix compilation with gcc < 4.9 on dash shellMakefile.inc+1 -11 reply
2/2multipath-tools: check for C compiler option -Werror=discarded-qualifiersMakefile.inc+2 -11 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchBart Van Assche
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] multipath-tools: fix build failures on GCC 4.8

This series fixes a couple of build failures hit on GCC 4.8 (one actually due to dash/bash differences) on Ubuntu 14.04.

Also tested on Ubuntu 18.04 (GCC 7.3) for (no) regressions.

Before:

    $ make 
    cc: error: unrecognized command line option ‘-fstack-protector-strong’
    make[1]: Entering directory `/home/ubuntu/git/multipath-tools/libmpathcmd'
    building mpath_cmd.o because of mpath_cmd.c
    cc -O2 -g -pipe -Wall -Wextra -Wformat=2 -Werror=implicit-int -Werror=implicit-function-declaration -Werror=format-security -Wno-sign-compare -Wno-unused-parameter -Wno-clobbered -Werror=cast-qual -Werror=discarded-qualifiers -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -DBIN_DIR=\"/sbin\" -DLIB_STRING=\"lib64\" -DRUN_DIR=\"run\" -MMD -MP  -fPIC -c -o mpath_cmd.o mpath_cmd.c
    cc: error: unrecognized command line option ‘-fstack-protector-strong’
    make[1]: *** [mpath_cmd.o] Error 1

After Patch 1:

    $ make 
    make[1]: Entering directory `/home/ubuntu/git/multipath-tools/libmpathcmd'
    building mpath_cmd.o because of mpath_cmd.c
    cc -O2 -g -pipe -Wall -Wextra -Wformat=2 -Werror=implicit-int -Werror=implicit-function-declaration -Werror=format-security -Wno-sign-compare -Wno-unused-parameter -Wno-clobbered -Werror=cast-qual -Werror=discarded-qualifiers -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -DBIN_DIR=\"/sbin\" -DLIB_STRING=\"lib64\" -DRUN_DIR=\"run\" -MMD -MP  -fPIC -c -o mpath_cmd.o mpath_cmd.c
    cc1: error: -Werror=discarded-qualifiers: no option -Wdiscarded-qualifiers
    make[1]: *** [mpath_cmd.o] Error 1

After Patch 2:

    $ make
    make[1]: Entering directory `/home/ubuntu/git/multipath-tools/libmpathcmd'
    building mpath_cmd.o because of mpath_cmd.c
    cc -O2 -g -pipe -Wall -Wextra -Wformat=2 -Werror=implicit-int -Werror=implicit-function-declaration -Werror=format-security -Wno-sign-compare -Wno-unused-parameter -Wno-clobbered -Werror=cast-qual  -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -DBIN_DIR=\"/sbin\" -DLIB_STRING=\"lib64\" -DRUN_DIR=\"run\" -MMD -MP  -fPIC -c -o mpath_cmd.o mpath_cmd.c
    cc -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname=libmpathcmd.so.0 -o libmpathcmd.so.0 mpath_cmd.o 
    ln -sf libmpathcmd.so.0 libmpathcmd.so
    make[1]: Leaving directory `/home/ubuntu/git/multipath-tools/libmpathcmd'

Mauricio Faria de Oliveira (2):
multipath-tools: fix compilation with gcc < 4.9 on dash shell
multipath-tools: check for C compiler option
-Werror=discarded-qualifiers

 Makefile.inc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Signature · 6 lines
2.17.1

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel