Aqui usamos el flag para desactivar la protección de pila, pero este
compilador ni siquiera la soporta. ¿Cómo checkear la presencia del
protector de pila de GCC para saber cuándo usar la bandera de
desactivación del mismo?
OUTPUT #################################################
$ gmake
>>> MYTHOS BUILD STARTED AT 2011-02-28 20:17:40
>>> built on AIX
o> KERNEL OBJECT [src/kernel/main.ko]
cc1: error: unrecognized option `-fno-stack-protector'
gmake: *** [src/kernel/main.ko] Error 1
INFO ###################################################
$ gcc -v
Reading specs from /usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/specs
Configured with: ../gcc-3.3.2/configure : (reconfigured)
../gcc-3.3.2/configure --disable-nls : (reconfigured)
../gcc-3.3.2/configure --disable-nls
Thread model: aix
gcc version 3.3.2
########################################################
$ uname -a
AIX ADTAABAC01 2 5 0003D0C7D600
########################################################
$ gcc -dumpversion
3.3.2
########################################################
$ gcc -dumpmachine
powerpc-ibm-aix5.2.0.0
########################################################
$ gcc -dumpspecs
*asm:
-u %{maix64:-a64 -mppc64} %(asm_cpu)
*asm_debug:
*asm_final:
*asm_options:
%a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}
*invoke_as:
%{!S:-o %{|!pipe:%g.s} |
as %(asm_options) %{!pipe:%g.s} %A }
*cpp:
%{posix: -D_POSIX_SOURCE} %{ansi: -D_ANSI_C_SOURCE}
%{maix64: -D__64BIT__} %{mpe:
-I/usr/lpp/ppe.poe/include} %{pthread: -D_THREAD_SAFE}
*cpp_options:
%(cpp_unique_options) %1 %{m*} %{std*} %{ansi} %{W*&pedantic*} %{w}
%{f*} %{O*} %{undef}
*cpp_debug_options:
%{d*}
*cpp_unique_options:
%{C:%{!E:%eGNU C does not support -C without using -E}}
%{CC:%{!E:%eGNU C does not support -CC without using -E}} %{!Q:-quiet}
%{nostdinc*} %{C} %{CC} %{v} %{I*} %{P} %I %{MD:-MD
%{!o:%b.d}%{o*:%.d%*}} %{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}} %{M} %{MM}
%{MF*} %{MG} %{MP} %{MQ*} %{MT*} %{!E:%{!M:%{!MM:%{MD|MMD:%{o*:-MQ
%*}}}}} %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2
-D__GNUC_PATCHLEVEL__=%v3}
%{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs} %{remap}
%{g3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i %{E|M|MM:%W{o*}}
*trad_capable_cpp:
cc1 -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}
*cc1:
*cc1_options:
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are
incompatible}} %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*}
-auxbase%{c|S:%{o*:-strip %*}%{!o*: %b}}%{!c:%{!S: %b}} %{g*} %{O*}
%{W*&pedantic*} %{w} %{std*} %{ansi} %{v:-version} %{pg:-p} %{p} %{f*}
%{undef} %{Qn:-fno-ident} %{--help:--help}
%{--target-help:--target-help} %{!fsyntax-only:%{S:%W{o*}%{!o*:-o
%b.s}}} %{fsyntax-only:-o %j} %{-param*}
*cc1plus:
*link_gcc_c_sequence:
%G %L %G
*endfile:
*link:
-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro} -bnodelcsect
%{static:-bnso %(link_syscalls) } %{shared:-bM:SRE %{!e:-bnoentry}}
%{!maix64:%{!shared:%{g*: %(link_libg) }}} %{maix64:-b64}
%{mpe:-binitfini:poe_remote_main}
*lib:
%{pg:-L/lib/profiled -L/usr/lib/profiled} %{p:-L/lib/profiled
-L/usr/lib/profiled} %{!maix64:%{!shared:%{g*:-lg}}}
%{mpe:-L/usr/lpp/ppe.poe/lib -lmpi -lvtd} %{pthread:-lpthreads} -lc
*libgcc:
%{static|static-libgcc:libgcc.a%s
libgcc_eh.a%s}%{!static:%{!static-libgcc:%{!shared:%{!shared-libgcc:libgcc.a%s
libgcc_eh.a%s}%{shared-libgcc:-lgcc_s%M
libgcc.a%s}}%{shared:-lgcc_s%M}}}
*startfile:
%{!shared: %{maix64:%{pg:gcrt0_64%O%s}%{!pg:%{p:mcrt0_64%O%s}%{!p:crt0_64%O%s}}}
%{!maix64:
%{pthread:%{pg:gcrt0_r%O%s}%{!pg:%{p:mcrt0_r%O%s}%{!p:crt0_r%O%s}}}
%{!pthread:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}}}
*switches_need_spaces:
*predefines:
*cross_compile:
0
*version:
3.3.2
*multilib:
. !pthread !maix64;pthread pthread !maix64;ppc64 !pthread
maix64;pthread/ppc64 pthread maix64;
*multilib_defaults:
*multilib_extra:
*multilib_matches:
pthread pthread;maix64 maix64;
*multilib_exclusions:
*multilib_options:
pthread maix64
*linker:
collect2
*link_libgcc:
%D
*md_exec_prefix:
*md_startfile_prefix:
*md_startfile_prefix_1:
*startfile_prefix_spec:
*cpp_default:
*asm_cpu:
%{!mcpu*: %{!maix64: %{mpowerpc64: -mppc64} %{!mpower64:
%(asm_default)}}} %{mcpu=power3: -m604} %{mcpu=power4: -m604}
%{mcpu=powerpc: -mppc} %{mcpu=rs64a: -mppc} %{mcpu=603: -m603}
%{mcpu=603e: -m603} %{mcpu=604: -m604} %{mcpu=604e: -m604} %{mcpu=620:
-mppc} %{mcpu=630: -m604}
*asm_default:
-mppc
*link_syscalls:
-bI:/lib/syscalls.exp
*link_libg:
-bexport:/usr/lib/libg.exp
*link_command:
%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S: %(linker) %l %X %{o*}
%{A} %{d} %{e*} %{m} %{N} %{n} %{r} %{s} %{t} %{u*} %{x} %{z} %{Z}
%{!A:%{!nostdlib:%{!nostartfiles:%S}}} %{static:} %{L*}
%(link_libgcc) %o
%{!nostdlib:%{!nodefaultlibs:%(link_gcc_c_sequence)}}
%{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}
--
Saludos,
D4RIO