71e3b99f0af42b8fbc6024232dcf968e5cdc665a |
|
14-Aug-2015 |
Jocelyn Bohr <bohr@chromium.org> |
Allow compilation with -O2 flag, add -fPIC flag. CL:292945 introduces CFLAGS environment variable, which contains -O2 in emerge environment. This patch fixes compiler errors "warning: dereferencing type-punned pointer will break strict-aliasing rules" introduced by using -O2 flag. This flag also introduces -fPIC when compiling not for embedded. This is needed to link against libtpm2. TEST=$ sudo emerge tpm2 builds libtpm2.a with all compiler flags $ sudo emerge tpm2-simulator builds tpm2-simulator The simulator works as before with trunks (can run --startup, --clear, and partially --own --owner_password="") $ make EMBEDDED_MODE=1 ROOTDIR=1 builds libtpm2.a for embedded BUG=none Change-Id: Iacc821fb840b653af1466edfaa8e5615fd73b36e Signed-off-by: Jocelyn Bohr <bohr@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/293815 Reviewed-by: Utkarsh Sanghi <usanghi@chromium.org>
/external/tpm2/PropertyCap.c
|