Hi,

On 10/05/2017 07:12 PM, John Paul Adrian Glaubitz wrote:
On 10/05/2017 05:55 PM, Roger Shimizu wrote:
On second thought, I would actually recommended to revert this change
for all architectures. Size isn't so much a constraint anymore these
days, you reduce the binary by about 200k. I don't think this is worth
the risk of breaking something as fundemantal as busybox.

Please exclude armel, which has size limitation on initrd of d-i [0].
Hmm, ok. Is that currently actually a concern? If I'm seeing that correctly, the "-Os" here only saved us around 200k. Does that already make a difference
on armel?

If yes, I'm also fine with something like

# On m68k, building with -Os leads to miscompiled code
ifeq (m68k,$(DEB_HOST_ARCH))
     CFLAGS := $(filter-out -Werror=format-security, ${CFLAGS})
else
     CFLAGS := $(filter-out -Werror=format-security -O2, ${CFLAGS})
endif

-Os is AFAIK supposed to be about same as -O1 + optimizations
that don't increase binary size (or -O2 minus options that
increase binary size).


Does Busybox break also with -O1?

If not, could you isolate which of the optimizations:
* -Os adds on top of -O1 cause the issue to appear, and
* -O2 adds on top of -Os make the issue again disappear
?

If Busybox shell breaks, it's likely that something else breaks too,
so it's IMHO better to isolate the cause properly.

(The specific options enabled by -O1/-Os/-O2 are listed in
gcc manual page.)


        - Eero

Reply via email to