This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: VxWorks Patches Back from the Dead!


On 08/24/12 11:50, rbmj wrote:
On 8/22/2012 8:52 PM, Bruce Korb wrote:
However I think it might be simpler to tweak mkfixinc.sh to

  sed '/if test -s .{MACRO_LIST}/s/$/ && false/' \
     ${srcdir}/fixinc.in > ${target}

for vxworks rather than all that configury rigmarole.
That would eliminate changes to gcc/configure.ac and gcc/Makefile.in.
OK.  One question though:  Why not just have a case statement inside fixinc.in?
e.g.

case ${target_canonical} in
     *-*-vxworks*)
         # Disable the machine name fix as it breaks things
         machine_name_override='OVERRIDE'
         ;;
esac

if test -s ${MACRO_LIST} && test -z "${machine_name_override}"

There are many ways of accomplishing the same thing. I just thought of the fact that the mkfixinc.sh script constructed the result script either by spinning it from thin air or by copying a source file, so why not just edit that source file when it wasn't doing the right thing? Your solution is fine, too. You could also make the sed expression simpler:

   sed '/^if test -s .{MACRO_LIST}/s/if .*/if false/'
   sed '/^if test -s .{MACRO_LIST}/,/^fi/d'

or replace ``machine_name_override='OVERRIDE''
with ``test -f ${MACRO_LIST} && rm -f ${MACRO_LIST}''

I will approve any reasonably simple solution. :)

Thank you for doing this, by the way!

Regards, Bruce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]