OnĀ Aug 15, 2014 00:25, Benjamin Block wrote: > On 08/14/2014 03:27 AM, Wei, Gang wrote:> On Aug 8, 2014 03:09, John > Marland wrote: >>> I found a problem when compiling tboot 1.8.1 on SUSE 13.1 with gcc >>> 4.8.1 - when I switched on debug i.e. export debug=y I got some >>> bizarre messages about trousers not being installed - it was indeed >>> installed and it took me a while to figure out that the real problem >>> was the definition of the CFLAGS_WARN for tboot below is a patch >>> that fixes it for me. The bug is still there in 1.8.2 ....JW --- >>> tboot-original/Config.mk 2014-05-16 03:57:00.000000000 -0400 +++ >>> tboot-1.8.1/Config.mk 2014-08-06 16:04:12.571147995 -0400 @@ >>> -43,8 +43,7 @@ >>> -Wextra -Winit-self -Wswitch-default -Wunused- >>> parameter \ -Wwrite-strings \ $(call >>> cc-option,$(CC),-Wlogical-op,) \ >>> - -Wno-missing-field-initializers \ >>> - -D_FORTIFY_SOURCE=2 >>> + -Wno-missing-field-initializers >>> >>> AS = as LD = ld @@ -80,7 +79,7 @@ ifeq ($(debug),y) >>> CFLAGS += -g -DDEBUG else >>> -CFLAGS += -O2 >>> +CFLAGS += -O2 -D_FORTIFY_SOURCE=2 >>> endif >>> >>> ifeq ($(TARGET_ARCH),x86_64) >> >> Good finding and nice fix. Already applied after adding your >> signed-off. >> > > I also stumbled over this, but more like because some distro now add > this already predefined with each compilation (as default preprocessor > definition) - I know at least gentoo, ubuntu and debian do it. With > that and -Werror you get errors like this: > >> <command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror] >> common/boot.S:1:0: note: this is the location of the previous >> definition > > You may want to consider adding a -U_FORTIFY_SOURCE before -D... > >> CFLAGS += -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 > > Or do some other trickery, if you want to avoid these errors on those > distros. >
Thanks for reporting the distro issues. Your suggestion looks good for me. I will try to make change soon. Jimmy ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ tboot-devel mailing list tboot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tboot-devel