Thread: gcc o3 optimization not working

  1. #1
    Registered User
    Join Date
    Jun 2020
    Posts
    2

    gcc o3 optimization not working

    My code compiled fine with -o optimization, but it gives the following errors with -o3 optimization:
    Code:
    /usr/bin/ld: bug: stdout: invalid version 2 (max 0)
    bug: error adding symbols: Bad value
    collect2: error: ld returned 1 exit status
    makefile:2: recipe for target 'all' failed
    I looked the error up and there aren't a lot of resources on it... Execution speed is crucial for my program and I would appreciate a level 3 optimization as opposed to level 1... Any ideas as to how to fix it?

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    27,839
    Just in case, let's clarify: you passed -O3 rather than -o3 as an option, right?
    Last edited by laserlight; 06-29-2020 at 05:32 PM.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Jun 2020
    Posts
    2
    NVM I did something stupid...
    I accidentally used lower case o in my makefile, as opposed to O...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Optimization
    By Richardcavell in forum C Programming
    Replies: 2
    Last Post: 04-06-2011, 08:48 AM
  2. GCC 4.2.0 SRA optimization
    By brewbuck in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 08-16-2007, 08:47 AM
  3. Optimization
    By lach in forum C Programming
    Replies: 4
    Last Post: 03-18-2006, 12:08 PM
  4. optimization
    By krithi in forum C Programming
    Replies: 9
    Last Post: 01-19-2003, 10:52 AM
  5. IDE optimization
    By Traveller in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 07-04-2002, 02:01 AM

Tags for this Thread