Announcement

Collapse
No announcement yet.

Asher please read this

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Asher please read this

    Do you have any idea how to tell gcc to read in additional options from a file? Some stuff on the web indicates it should be doable by saying @file or -@file, but gcc (I've tried both 4.1 and 3.4) just doesn't recognize it.

    The closest solution I've come up with is `cat file`, but this is... suboptimal.

  • #2
    Why not just use a makefile or cat?

    I loathe gcc and I'm no expert in it, but the following should work:
    Code:
    gcc $(cat yourfile)
    Code:
    gcc `cat yourfile`
    And of course it's sub-optimal. The word essentially defines gcc.
    "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
    Ben Kenobi: "That means I'm doing something right. "

    Comment


    • #3
      I am using a makefile.

      The use case is I have a configuration tool that generates a file compiler.opt based on my build target (a variety of TI ARM processors), and I want to have a make rule a la:

      progname.out : progname.obj compiler.opt
      gcc -@compiler.opt ...

      Comment


      • #4
        I'm sort of pissed you didn't ask me or JM this. Not that I knew, but still.

        12-17-10 Mohamed Bouazizi NEVER FORGET
        Stadtluft Macht Frei
        Killing it is the new killing it
        Ultima Ratio Regum

        Comment


        • #5


          That's possibly one of the most ridiculous things I've ever seen you say.

          Comment


          • #6
            12-17-10 Mohamed Bouazizi NEVER FORGET
            Stadtluft Macht Frei
            Killing it is the new killing it
            Ultima Ratio Regum

            Comment


            • #7
              I'm pretty sure physicists are the worst programmers on Earth.

              Comment


              • #8
                I have seen worse programming on the net.

                I admit some physicists are poor programmers... despite how bad I am (and I am better than last year, but still not great), I am better than average.

                JM
                Jon Miller-
                I AM.CANADIAN
                GENERATION 35: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

                Comment


                • #9
                  Originally posted by Kuciwalker View Post
                  I am using a makefile.

                  The use case is I have a configuration tool that generates a file compiler.opt based on my build target (a variety of TI ARM processors), and I want to have a make rule a la:


                  OPTS=`cat compiler.opt`
                  progname.out : progname.obj compiler.opt
                  gcc $(OPTS) ...
                  .
                  With or without religion, you would have good people doing good things and evil people doing evil things. But for good people to do evil things, that takes religion.

                  Steven Weinberg

                  Comment


                  • #10
                    Thank you for providing the workaround I'VE ALREADY STATED I'D FOUND.

                    Comment


                    • #11
                      BC is a problem child.
                      Life is not measured by the number of breaths you take, but by the moments that take your breath away.
                      "Hating America is something best left to Mobius. He is an expert Yank hater.
                      He also hates Texans and Australians, he does diversify." ~ Braindead

                      Comment


                      • #12
                        Originally posted by Kuciwalker View Post
                        Thank you for providing the workaround I'VE ALREADY STATED I'D FOUND.
                        But have you tried data compression?
                        12-17-10 Mohamed Bouazizi NEVER FORGET
                        Stadtluft Macht Frei
                        Killing it is the new killing it
                        Ultima Ratio Regum

                        Comment


                        • #13


                          yeah, he could try to zip it
                          With or without religion, you would have good people doing good things and evil people doing evil things. But for good people to do evil things, that takes religion.

                          Steven Weinberg

                          Comment


                          • #14
                            Originally posted by KrazyHorse View Post
                            But have you tried data compression?

                            Comment


                            • #15
                              I've seen some references to a @file parameter for gcc, but if it doesn't work for you, it doesn't work.

                              The beauty of Unix programming is if it works on one system, it won't work on another.

                              "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
                              Ben Kenobi: "That means I'm doing something right. "

                              Comment

                              Working...
                              X