m68k-elf-g++: error: unrecognized command line option '-Wl'

Discussion to talk about software related topics only.
Post Reply
shockwave77598
Posts: 22
Joined: Sat May 27, 2017 10:38 am

m68k-elf-g++: error: unrecognized command line option '-Wl'

Post by shockwave77598 »

I just updated the compiler and got a new set of boards. Now using Mod54415 and Nana54415.

No matter what I do, I get this error from the linker. My code seems to compile fine (I've been using netburners for years) and even a default brand-new project with next to no code in it generates the error.

Looking around, I cannot find what the -Wl option even IS, never mind why the Configuration thought it had to be part of the linking. Can somebody tell me either what I'm doing wrong, or what the tools are doing wrong and how to fix it?
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: m68k-elf-g++: error: unrecognized command line option '-

Post by rnixon »

It is gcc linker option. A quick google search has the definition:
-Wl,option
Pass option as an option to the linker. If option contains commas, it is split into multiple options at the commas. You can use this syntax to pass an argument to the option. For example, `-Wl,-Map,output.map' passes `-Map output.map' to the linker. When using the GNU linker, you can also get the same effect with `-Wl,-Map=output.map'.

Can't be sure what the issue is, but my first guesses would be a problem with multiple installations of gcc or nb tools, path variable problems calling a different make, environment variables, things like that.
shockwave77598
Posts: 22
Joined: Sat May 27, 2017 10:38 am

Re: m68k-elf-g++: error: unrecognized command line option '-

Post by shockwave77598 »

Well, I tried putting the compiler on a virgin machine that has never had any netburner tools on it last night. Pointed it to the shared drive with the workspace -- got the same problem. So I can't see how it's multiple instances of the tools -- the laptop only had that one installation and the '-Wl" problem exists for it also.
User avatar
pbreed
Posts: 1080
Joined: Thu Apr 24, 2008 3:58 pm

Re: m68k-elf-g++: error: unrecognized command line option '-

Post by pbreed »

Are you compiling from the command line or from eclipse?

Do you have your own custom makefile?

From a command line type:

m68k-elf-g++ --version

What version is reported?

What happens if you use the tools to create a new project or one of the example projects?
shockwave77598
Posts: 22
Joined: Sat May 27, 2017 10:38 am

Re: m68k-elf-g++: error: unrecognized command line option '-

Post by shockwave77598 »

Well, I tried something. I reinstalled it with every serial number I had for all the products. Then I created new project with a different suffix, saved it, then manually copied the C and H files into the new folder in the workspace. Tada, everything worked!!

With this data and the fact that a virgin machine wouldn't work either, I can only surmiss that a setting in .PROJECT of .CPROJECT from earlier version of the compiler was causing the new version to throw up. Probably something causing two '-Wl' options to occur, since I noticed the console reporting the Linker command had two of them in the line back to back. And that can't be right.

I got it working. But I suspect that I'm going to have this problem with everything I've written to date. (And people wonder why I hate updating compilers...)
User avatar
dciliske
Posts: 623
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: m68k-elf-g++: error: unrecognized command line option '-

Post by dciliske »

This is... bizarre. Any chance you can send us the original and resolved .PROJECT and .CPROJECT files?

Basically, this is an issue we've seen reported a couple times, and experienced internally, but my experience (on the command line) has been that that particular error is triggered immediately *after* the compiler reads an argument that it doesn't understand, i.e. the GCC call was made to the wrong version of GCC.

Clearly, your instance shows that this is not always the cas.

-Dan
Dan Ciliske
Project Engineer
Netburner, Inc
shockwave77598
Posts: 22
Joined: Sat May 27, 2017 10:38 am

Re: m68k-elf-g++: error: unrecognized command line option '-

Post by shockwave77598 »

.CPROJECT GLITCHY

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="nbeclipse.toolchain.nbde.rel.532906588">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="nbeclipse.toolchain.nbde.rel.532906588" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="s19" artifactName="${ProjName}_APP" buildProperties="org.eclipse.cdt.make.core.enableAutoBuild=true" cleanCommand="rm -f" description="" errorParsers="org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.VCErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.GLDErrorParser" id="nbeclipse.toolchain.nbde.rel.532906588" name="Release" parent="nbeclipse.toolchain.nbde.rel" postannouncebuildStep="" postbuildStep="" preannouncebuildStep="" prebuildStep="">
<folderInfo id="nbeclipse.toolchain.nbde.rel.532906588." name="/" resourcePath="">
<toolChain id="nbeclipse.toolchain.nbde.rel.tc.2094802645" name="NetBurner Device" superClass="nbeclipse.toolchain.nbde.rel.tc">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="nbeclipse.toolchain.nbde.rel.tc.targetPlatform.1181131121" name="NetBurner Module" superClass="nbeclipse.toolchain.nbde.rel.tc.targetPlatform"/>
<builder buildPath="${workspace_loc:/GenOrbitSimFlight001/Release}" enableAutoBuild="true" id="nbeclipse.toolchain.nbde.rel.tc.builder.644371084" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Release ELF builder (MINGW)" superClass="nbeclipse.toolchain.nbde.rel.tc.builder"/>
<tool command="comphtml" commandLinePattern="${COMMAND} "../html" -o${OUTPUT} ${FLAGS}" id="nbeclipse.toolchain.nbde.rel.tc.html.1740300765" name="NetBurner Comphtml" superClass="nbeclipse.toolchain.nbde.rel.tc.html"/>
<tool command="lua" commandLinePattern="${COMMAND} ${FLAGS} -i "../lua" -o ${OUTPUT}" id="nbeclipse.toolchain.nbde.rel.tc.lua.945923495" name="NetBurner Complua" superClass="nbeclipse.toolchain.nbde.rel.tc.lua">
<option id="nbeclipse.toolchain.super.lua.nb.location.1063114037" name="Complua location" superClass="nbeclipse.toolchain.super.lua.nb.location" value="C:\nburn/pcbin/complua/complua.lua" valueType="string"/>
</tool>
<tool command="promgen" commandLinePattern="${COMMAND} ${FLAGS} -o ${OUTPUT}" id="nbeclipse.toolchain.nbde.rel.tc.prom.444146132" name="FPGA Promgen" superClass="nbeclipse.toolchain.nbde.rel.tc.prom"/>
<tool command="compfile" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT}" id="nbeclipse.toolchain.nbde.rel.tc.cfile.445247484" name="NetBurner Compfile" superClass="nbeclipse.toolchain.nbde.rel.tc.cfile"/>
<tool command="m68k-elf-gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="nbeclipse.toolchain.nbde.rel.tc.gcc.1840976" name="GNU C Compiler" superClass="nbeclipse.toolchain.nbde.rel.tc.gcc">
<option id="nbeclipse.toolchain.super.gcc.cpu.822859051" name="CPU" superClass="nbeclipse.toolchain.super.gcc.cpu" value="-mcpu=5206e" valueType="string"/>
<option id="nbeclipse.toolchain.super.gcc.platform.1571899409" name="Platform" superClass="nbeclipse.toolchain.super.gcc.platform" value="MOD5441X" valueType="string"/>
<option id="nbeclipse.toolchain.super.gcc.cpu_type.2105886472" name="CPU_Type" superClass="nbeclipse.toolchain.super.gcc.cpu_type" value="MCF5441X" valueType="string"/>
<option id="nbeclipse.toolchain.super.gcc.directories.includepaths.1815791280" name="Include paths (-I)" superClass="nbeclipse.toolchain.super.gcc.directories.includepaths" valueType="includePath">
<listOptionValue builtIn="false" value=""C:\nburn/include""/>
<listOptionValue builtIn="false" value=""C:\nburn/MOD5441X/include""/>
<listOptionValue builtIn="false" value=""C:\nburn/gcc-m68k/m68k-elf/include""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/GenOrbitSimFlight001}""/>
</option>
<option id="nbeclipse.toolchain.super.gcc.debugging.stackcheck.1106790334" name="Enable stack checking (-fstack-check)" superClass="nbeclipse.toolchain.super.gcc.debugging.stackcheck" value="false" valueType="boolean"/>
<option id="nbeclipse.toolchain.super.gcc.optimization.level.669388541" name="Optimization Level" superClass="nbeclipse.toolchain.super.gcc.optimization.level" value="nbeclipse.toolchain.super.gcc.optimization.level.0" valueType="enumerated"/>
<inputType id="nbeclipse.toolchain.nbde.rel.tc.gcc.input.1681079963" name="GNU C Input" superClass="nbeclipse.toolchain.nbde.rel.tc.gcc.input"/>
</tool>
<tool command="m68k-elf-g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="nbeclipse.toolchain.nbde.rel.tc.gpp.1323691645" name="GNU C++ Compiler" superClass="nbeclipse.toolchain.nbde.rel.tc.gpp">
<option id="nbeclipse.toolchain.super.gpp.cpu.7726698" name="CPU" superClass="nbeclipse.toolchain.super.gpp.cpu" value="-mcpu=5206e" valueType="string"/>
<option id="nbeclipse.toolchain.super.gpp.platform.389777699" name="Platform" superClass="nbeclipse.toolchain.super.gpp.platform" value="MOD5441X" valueType="string"/>
<option id="nbeclipse.toolchain.super.gpp.cpu_type.2010508424" name="CPU_Type" superClass="nbeclipse.toolchain.super.gpp.cpu_type" value="MCF5441X" valueType="string"/>
<option id="nbeclipse.toolchain.super.gpp.directories.includepaths.1344852589" name="Include paths (-I)" superClass="nbeclipse.toolchain.super.gpp.directories.includepaths" valueType="includePath">
<listOptionValue builtIn="false" value=""C:\nburn/include""/>
<listOptionValue builtIn="false" value=""C:\nburn/MOD5441X/include""/>
<listOptionValue builtIn="false" value=""C:\nburn/gcc-m68k/m68k-elf/include""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/GenOrbitSimFlight001}""/>
</option>
<option id="nbeclipse.toolchain.super.gpp.optimization.level.1622182822" name="Optimization Level" superClass="nbeclipse.toolchain.super.gpp.optimization.level" value="nbeclipse.toolchain.super.gpp.optimization.level.0" valueType="enumerated"/>
<inputType id="nbeclipse.toolchain.nbde.rel.tc.gpp.input.208545448" name="GNU C++ Input" superClass="nbeclipse.toolchain.nbde.rel.tc.gpp.input"/>
</tool>
<tool command="m68k-elf-as" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="nbeclipse.toolchain.nbde.rel.tc.as.827482258" name="GNU Assembler" superClass="nbeclipse.toolchain.nbde.rel.tc.as">
<option id="nbeclipse.toolchain.super.as.cpu.40678461" name="CPU" superClass="nbeclipse.toolchain.super.as.cpu" value="-mcpu=5206e" valueType="string"/>
<inputType id="nbeclipse.toolchain.nbde.rel.tc.as.input.1862725847" name="GNU Assembler Input" superClass="nbeclipse.toolchain.nbde.rel.tc.as.input"/>
</tool>
<tool command="m68k-elf-g++" commandLinePattern="${COMMAND} ${INPUTS} -Wl,-Map="${ProjName}.map" ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT}" id="nbeclipse.toolchain.nbde.rel.tc.link.1714151005" name="GNU C/C++ Linker" superClass="nbeclipse.toolchain.nbde.rel.tc.link">
<option id="nbeclipse.toolchain.super.link.mcpu.1092301627" name="CPU" superClass="nbeclipse.toolchain.super.link.mcpu" value="-mcpu=5206e" valueType="string"/>
<option id="nbeclipse.toolchain.super.link.ldflags.1834819977" name="LDFlags" superClass="nbeclipse.toolchain.super.link.ldflags" value="-Wl -Wl,-n -T"C:\nburn/MOD5441X/lib/MOD5441X.ld" -Wl,-R"C:\nburn/MOD5441X/lib/sys.ld"" valueType="string"/>
<option id="nbeclipse.toolchain.nbde.rel.tc.link.libs.libs.1064628520" name="Libraries" superClass="nbeclipse.toolchain.nbde.rel.tc.link.libs.libs" valueType="stringList">
<listOptionValue builtIn="false" value=""C:\nburn/lib/MOD5441X.a""/>
<listOptionValue builtIn="false" value=""C:\nburn/lib/NetBurner.a""/>
<listOptionValue builtIn="false" value=""C:\nburn/lib/FatFile.a""/>
<listOptionValue builtIn="false" value=""C:\nburn\lib\cryptolib.a""/>
<listOptionValue builtIn="false" value=""C:\nburn\lib\debugLibrary.a""/>
<listOptionValue builtIn="false" value=""C:\nburn\lib\Lua_Full.a""/>
<listOptionValue builtIn="false" value=""C:\nburn\lib\nb-libxively.a""/>
<listOptionValue builtIn="false" value=""C:\nburn\lib\nbwifilib.a""/>
<listOptionValue builtIn="false" value=""C:\nburn\lib\webclient.a""/>
</option>
<option id="nbeclipse.toolchain.super.link.optimization.deadstrip.318350505" name="Enable garbage collection of unused input sections (--gc-sections)" superClass="nbeclipse.toolchain.super.link.optimization.deadstrip" value="true" valueType="boolean"/>
</tool>
<tool command="m68k-elf-objcopy" commandLinePattern="${COMMAND} ${INPUTS} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT}" id="nbeclipse.toolchain.nbde.rel.tc.objcopy.600340972" name="GNU ELF Objcopy" superClass="nbeclipse.toolchain.nbde.rel.tc.objcopy"/>
<tool command="compcode" commandLinePattern="${COMMAND} ${INPUTS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${FLAGS}" id="nbeclipse.toolchain.nbde.rel.tc.compcode.2145225348" name="NetBurner Compcode" superClass="nbeclipse.toolchain.nbde.rel.tc.compcode">
<option id="nbeclipse.toolchain.super.compcode.memrange.1588021205" name="Memory range" superClass="nbeclipse.toolchain.super.compcode.memrange" value="0xC0040000 0xC2000000" valueType="string"/>
<option id="nbeclipse.toolchain.super.compcode.platform.1453437058" name="Platform" superClass="nbeclipse.toolchain.super.compcode.platform" value="MOD5441X" valueType="string"/>
</tool>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="GenOrbitSimFlight001.nbeclipse.toolchain.nbde.1086880024" name="NetBurner Device Executable" projectType="nbeclipse.toolchain.nbde"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</storageModule>
<storageModule moduleId="refreshScope" versionNumber="1">
<resource resourceType="PROJECT" workspacePath="/GenOrbitSimFlight001"/>
</storageModule>
</cproject>


************************************
.PROJECT GLITCHY

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>GenOrbitSimFlight001</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<arguments>
<dictionary>
<key>?name?</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.append_environment</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildArguments</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildCommand</key>
<value>make</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildLocation</key>
<value>${workspace_loc:/GenOrbitSimFlight001/Release}</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.contents</key>
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
<value>true</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
</projectDescription>
Post Reply