[CRIU] [PATCH 2/6] compel: cli -- Add more flags into cflags report

Cyrill Gorcunov gorcunov at gmail.com
Wed Oct 12 07:01:16 PDT 2016


On Wed, Oct 12, 2016 at 03:54:16PM +0200, Laurent Dufour wrote:
> On 28/09/2016 23:34, Cyrill Gorcunov wrote:
> > Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> > ---
> >  compel/src/main.c | 10 ++++++++--
> >  1 file changed, 8 insertions(+), 2 deletions(-)
> > 
> > diff --git a/compel/src/main.c b/compel/src/main.c
> > index ee6ccd53acdd..ca191c768363 100644
> > --- a/compel/src/main.c
> > +++ b/compel/src/main.c
> > @@ -15,8 +15,14 @@
> >  #include "version.h"
> >  #include "piegen.h"
> > 
> > -static const char compel_cflags_pie[] = "-fpie -Wa,--noexecstack -fno-stack-protector";
> > -static const char compel_cflags_nopic[] = "-fno-pic -Wa,--noexecstack -fno-stack-protector";
> > +static const char compel_cflags_pie[] =
> > +	"-fpie -Wstrict-prototypes -Wa,--noexecstack "
> > +	"-fno-stack-protector -fno-jump-tables -nostdlib "
> > +	"-fomit-frame-pointer";
> > +static const char compel_cflags_nopic[] =
> > +	"-fno-pic -Wstrict-prototypes -Wa,--noexecstack "
> > +	"-fno-stack-protector -fno-jump-tables -nostdlib "
> > +	"-fomit-frame-pointer";
> >  static const char compel_ldflags[] = "-r";
> > 
> >  piegen_opt_t opts = {
> > 
> 
> This patch is breaking build on ppc64le :
>   GEN      criu/pie/parasite-native.built-in.bin.o
>   GEN      criu/pie/parasite-native-blob.h
> parasite_native_blob: Error (compel/src/lib/handle-elf-host.c:243): No
> TOC pointer
> criu/pie/Makefile:159: recipe for target
> 'criu/pie/parasite-native-blob.h' failed
> make[2]: *** [criu/pie/parasite-native-blob.h] Error 255
> 
> I'm still investigating, but I'd appreciate some details on this patch,
> Cyrill ?

The idea is that criu during building itself calls for compel/compel-host
with --cflags argument to pass them into gcc when building pie code. Maybe
for ppc we've been using differen cflags options? You can easily check out
the difference running "make V=1" before and after the patch. This should
bring some light on what's going on.


More information about the CRIU mailing list