# version : 0.0.3 # Cedric.Bilat@he-arc.ch ####################### # Compilateur : gcc # ####################### # Compiler name # # g++ # # Compiler Option # # Path # # -I XXX Header search path is XXX # # Warning # # -ainsi Norme # -pedantic Norme Ainsi+ # -W Print extra warning messages # -w Suppres warning messages # -Wall Combinaison of common option (warning) # -fno-implicit-templates to use template (instanciation avancée) # # Optimisation # # -O3 Optimisation # # -march=native Optimisation (detection automatique arch) # -march=pentium4 Optimisation MMX, SSE, SSE2 # -march=prescott Optimisation MMX, SSE, SSE2, SSE3 # -march=nocona Optimisation MMX, SSE, SSE2, SSE3, EMT64 # -march=core2 Optimisation MMX, SSE, SSE2, SSE3, SSSE3, EMT64, # # -march=corei7 Optimisation MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2 # -march=corei7-avx Optimisation MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AES, PCLMUL # # -march=nehalem Optimisation MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2 POPCNT (i3,i5,i7) [2008] 45nm # -march=westmere Optimisation MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, AES ,PCLMUL (i3,i5,i7) [2008] 32nm # # -march=sandybridge Optimisation MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, AVX, AES, PCLMUL (i3,i5,i7) [2011] 32nm # -march=ivybridge Optimisation MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, AVX, AES, PCLMUL, FSGSBASE, RDRND, F16C (i3,i5,i7) [2011] 22nm # # -march=haswell Optimisation MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, AVX, AVX2, AES, PCLMUL, FSGSBASE, RDRND, F16C, FMA, BMI, BMI2, MOVBE [2013] 22nm # -march=broadwell Optimisation MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, AVX, AVX2, AES, PCLMUL, FSGSBASE, RDRND, F16C, FMA, BMI, BMI2, MOVBE, RDSEED, ADCX, PREFETCHW [2014] 14nm # # -fomit-frame-pointer Optimisation # -frerun-loop-opt Optimisation # -fgcse Optimisation # # Truc # # -DXXX Passe au code la variable XXX (same as #define XXX in code) # # OpenMP # # -fopenmp Enable use of OpenMP # Compilation: # opm.h (already include in mingw64 distribution) # Link: # libgomp.lib (already include in mingw64 distribution,link with gomp) # Runtime: # libgcc_S_SJLJ-1.dll (already include in mingw64 distribution) # libgomp-1.dll (already include in mingw64 distribution) # pthreadGC2-W64.dll (doit être installé séparrement) # Truc: # Use dependencyWalker.exe to see which .dll is required) # # Linker Option # # Path # # -L XXX Library .a search path is XXX # -l XXX Library file xxx.a maybe usefull to link (search path is in -L folder). Becarefull, xXX without extension # # Target # # -shared To target a dynamice library : .so (don't forget to set extension .so to TARGET_NAME) # # Avancer # # -Wl,XXX Wl passe option XXX au linker # -D_JNI_IMPLEMENTATION Use .dll with java # -Wl,--kill-at Use .dll with java # -Wl,--unresolved-symbols=ignore-in-shared-libs # -static-libgcc -static-libstdc+ Forcer le linkage statique des .dll "système" # # Usefull # # Use .dll of Visual (cl) or Intel (icl) in g++ project # # Goal : XXX.dll -> XXX.def # pexports XXX.dll>XXX.def # # Goal : XXX.dll XXX.def -> XXX.a # dlltool --machine i386:x86-64 --dllname XXX.dll --input-def XXX.def --output-lib XXX.a # dlltool --machine i386 --dllname XXX.dll --input-def XXX.def --output-lib XXX.a # dlltool --help # # Next with your g++ project # Compil with XXX.h # Link with XXX.a # Execute with XXX.dll # # Download # dlltool.exe : Brother of g++.exe in installation folder! # pexports.exe 32 bits : By example, download mingw-utils-YYY of mingw32 (http://www.mingw.org/) # # Help # # https://gcc.gnu.org/onlinedocs/gcc/i386-and-x86-64-Options.html#i386-and-x86-64-Options # http://en.wikipedia.org/wiki/List_of_Intel_CPU_microarchitectures # http://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html#Option-Summary # http://sourceforge.net/projects/mingw-w64/ # ####################### # END # #######################