The GNUmakefile currently performs the following:

    IS_X86 = $(shell uname -m | $(EGREP) -c "i.86|x86|i86|amd64")
    IS_X86_64 = $(shell uname -m | $(EGREP) -c "_64|d64")

That actually tests the architecture of the host computer (where we are 
compiling), and not the target (what we are building for).

I'd like to change that to use the preprocessor:

      # Through compiler driver
      IS_X86 = $(shell $(CXX) -dm -E - < /dev/null | $(EGREP) -c 
"i.86|x86|i86|amd64")

    or:

      # Query preprocessor directly
      IS_X86 = $(shell $(CPP) -dm < /dev/null | $(EGREP) -c 
"i.86|x86|i86|amd64")

The reason I ask is I have two new architectures to test on, and neither is 
cross-compiled. One is ARM and the other is PowerPC. I can add the 
detection routines through uname (presumably), or I can ask the 
preprocessor by looking for defines like __i368__, __x86_64__ and __arm__, 
which is definitive.

I think the change is safe for most commodity gear, like Linux and the 
BSDs. But I am not sure about lesser tested system, like Solaris.

Does anyone see any problems with the change?

Jeff

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to