This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gcov-profile/69004] Building t-engine on ARM fails during -fprofile-use stage


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69004

--- Comment #19 from PeteVine <tulipawn at gmail dot com> ---
Here's what I've been doing to arrive at that profile-use crash:

In the unpacked archive's top-level directory (see URL), edit premake4.lua to
point to your SDL2 includes (instead of /opt) and add `-fprofile-generate` to
your release CFLAGS. Followed by:

$ premake4 gmake

Now add -lgcov to the final link command in build/TEngine.mak at line 56

$ LDFLAGS=-lgcov make config=release -j4
$ ./t-engine

The welcome screen is basically enough to gather lots of profile data.
In the second step, CFLAGS in premake4.lua need changing to `-fprofile-use`,
and after deleting all object files in obj/Release, it's the same dance again:

$ premake gmake 
$ make config=release

and on my machine gcc 6.1.1 (20160721) prints:

==== Building physfs (release) ====
physfsrwops.c
physfs.c
../src/physfs/physfs.c:76:5: warning: initialization from incompatible pointer
type [-Wincompatible-pointer-types]
     &__PHYSFS_Archiver_BIND_PHYSFS,
     ^
../src/physfs/physfs.c:76:5: note: (near initialization for
‘supported_types[0]’)
../src/physfs/physfs.c: In function ‘PHYSFS_eof’:
../src/physfs/physfs.c:2292:1: error: corrupted profile info: profile data is
not flow-consistent
 }
 ^
../src/physfs/physfs.c:2292:1: error: corrupted profile info: number of
executions for edge 3-4 thought to be 1419
../src/physfs/physfs.c:2292:1: error: corrupted profile info: number of
executions for edge 3-7 thought to be -3
../src/physfs/physfs.c:2086:44: error: corrupted value profile: ic profile
counter (1420 out of 1419) inconsistent with basic-block count (1419)
     return((fh->bufpos == fh->buffill) && (fh->funcs->eof(fh->opaque)));
                                           ~^~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/physfs/physfs.c: In function ‘PHYSFS_openRead’:
../src/physfs/physfs.c:2292:1: error: corrupted profile info: profile data is
not flow-consistent
 }
 ^
../src/physfs/physfs.c:2292:1: error: corrupted profile info: number of
executions for edge 4-5 thought to be 930
../src/physfs/physfs.c:2292:1: error: corrupted profile info: number of
executions for edge 4-6 thought to be -8
../src/physfs/physfs.c: In function ‘sanitizePlatformIndependentPath’:
../src/physfs/physfs.c:2292:1: error: corrupted profile info: profile data is
not flow-consistent
../src/physfs/physfs.c:2292:1: error: corrupted profile info: number of
executions for edge 16-18 thought to be -6
../src/physfs/physfs.c:2292:1: error: corrupted profile info: number of
executions for edge 16-17 thought to be 4164

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]