title: What is the signification of LDFLAGS
body: <p>I'm trying to compile AODV for ARM linux. I use a SabreLite as a board with kernel version 3.0.35_4.1.0. It's worth mention that i'm using openembedded to create my Linux Distribution for my board.
  The AODV source code (<a href="http://sourceforge.net/projects/aodvuu/" rel="noreferrer">http://sourceforge.net/projects/aodvuu/</a>) has a README file which give some indications on how to install it on ARM as stated a bit here.
   (<a href="http://w3.antd.nist.gov/wctg/aodv_kernel/kaodv_arm.html" rel="noreferrer">http://w3.antd.nist.gov/wctg/aodv_kernel/kaodv_arm.html</a>).</p>
  
  <p>I was able to upgrade the makefile in order to be used with post 2.6 kernel version ( as stated above, i have the 3.0.35_4.1.0 kernel version).
  So, basically, what i am trying to do is that i have to create a module (let's say file.ko) and then load it into the ARM (with insmod file.ko command).</p>
  
  <p>To do that, i am using a cross compiler which some values are stated below:</p>
  
  <ul>
  <li><p>echo $CC :
  arm-oe-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/usr/local/oecore-x86_64/sysroots/cortexa9hf-vfp-neon-oe-linux-gnueabi</p></li>
  <li><p>echo $ARCH=arm </p></li>
  <li><p>echo $CFLAGS: O2 -pipe -g -feliminate-unused-debug-types</p></li>
  <li><p>echo $LD : 
  arm-oe-linux-gnueabi-ld --sysroot=/usr/local/oecore-x86_64/sysroots/cortexa9hf-vfp-neon-oe-linux-gnueabi</p></li>
  <li><p>echo $LDFLAGS : 
  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--as-needed</p></li>
  </ul>
  
  <p>when i launch "make command", i get the following errors:</p>
  
  <p><strong>LD [M]  /home/scof/script_emulation/AODV/aodv-uu/lnx/kaodv.o</strong></p>
  
  <p><strong>arm-oe-linux-gnueabi-ld: unrecognized option '-Wl,-O1'</strong></p>
  
  <p><strong>arm-oe-linux-gnueabi-ld: use the --help option for usage information</strong></p>
  
  <p>It states that there is something wrong with the linker. This linker comes from the cross compilation tools and i normally shouldn't touch it.  </p>
  
  <p>Anyway, to get this above errors fixed,  i try to withdraw the LDFLAGS like this: 
  <strong>export LDFLAGS=''</strong>, 
  and after this, the make command works and i get the module kaodv.ko. But when i insert it into my ARM to check, it does not work. It actually freeze my terminal </p>
  
  <p>So my question is, do i have to specify the LDFLAGS when compiling ? Does withdrawing LDFLAGS can have impact on the generated kernel module. 
  Actually, i try to understand where might be the problem and the only thing that come to me is that may be i should not change manually the LDFLAGS. But if i don't change de LDFLAGS, i get the <em>unrecognized option</em> error. </p>
  
  <p>My second question related to that is, what are the possibly value of LDFLAGS 
  in ARM compilation</p>
  
  <p>Thanks !!</p>