Johannes Meixner changed bug 974360
What Removed Added
Status NEW CONFIRMED
Hardware Other All
Found By --- L3
OS Other SUSE Other

Comment # 2 on bug 974360 from
I wonder what the "correct optflfags" are
and/or how they should be specified.

I tried it in 
https://build.opensuse.org/package/show/home:jsmeix:branches:Archiving/ebiso
in our usual way in ebiso.spec via
-----------------------------------------------------------------
export CFLAGS="$RPM_OPT_FLAGS"
-----------------------------------------------------------------

This way it builds but my build log contains (excerpt):
---------------------------------------------------------------------------
[   37s] + CFLAGS='-fmessage-length=0 -grecord-gcc-switches -O2
                   -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
                   -funwind-tables -fasynchronous-unwind-tables -g'
...
[   37s] gcc -g3 -m64 -std=gnu9x -Wall -Wshadow -Wcast-qual
             -Wstrict-prototypes -Wmissing-prototypes
             -I./include -MT lib/filename.o -MMD -MP
             -MF .d/lib/filename.Td -c -o lib/filename.o
             lib/filename.c
...
[   40s] I: File is compiled without RPM_OPT_FLAGS
[   40s] W: ebiso no-rpm-opt-flags <cmdline>:lib/SL.c, lib/filename.c, ...
---------------------------------------------------------------------------

In contrast Martin Pluskal's build log contains (excerpt):
-------------------------------------------------------------------------------
[  171s] gcc -fmessage-length=0 -grecord-gcc-switches -O2 -Wall
            -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
            -fasynchronous-unwind-tables -g -g -m64 -std=gnu9x -Wall
            -Wshadow -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
            -I./include -MT lib/filename.o -MMD -MP -MF .d/lib/filename.Td
            -c -o lib/filename.o lib/filename.c
[  171s] In file included from /usr/include/string.h:635:0,
[  171s]                  from ./include/globals.h:32,
[  171s]                  from ./include/filename.h:28,
[  171s]                  from lib/filename.c:28:
[  171s] In function 'strncpy',
[  171s]     inlined from 'add_duplicate_couter' at lib/filename.c:73:4,
[  171s]     inlined from 'filename_rename_duplicates' at lib/filename.c:44:13:
[  171s] /usr/include/bits/string3.h:126:10: warning: call to
         __builtin___strncpy_chk will always overflow destination buffer
[  171s]    return __builtin___strncpy_chk (__dest, __src, __len, __bos
(__dest));
[  171s]           ^
-------------------------------------------------------------------------------

It seems something is missing in the ebiso upstream Makefile
that it does not use CFLAGS (i.e. our RPM_OPT_FLAGS).


You are receiving this mail because: