[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Fix C compatibility issue in mini-os



The cc-option check always fails (that, it picks the second option
unconditionally) if the compiler does not support implicit conversion
from integers to pointers.  Just drop the initialization because it
seems unnecessary in this context.

Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>

Signed-off-by: Florian Weimer <fweimer@xxxxxxxxxx>

diff --git a/Config.mk b/Config.mk
index f2d1f0a..b7c9887 100644
--- a/Config.mk
+++ b/Config.mk
@@ -21,7 +21,7 @@ endef
 # of which would indicate an "unrecognized command-line option" warning/error.
 #
 # Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
-cc-option = $(shell if test -z "`echo 'void*p=1;' | \
+cc-option = $(shell if test -z "`echo 'void*p;' | \
               $(1) $(2) -c -o /dev/null -x c - 2>&1 | grep -- $(2) -`"; \
               then echo "$(2)"; else echo "$(3)"; fi ;)
 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.