Find the answer to your Linux question:
Results 1 to 2 of 2
Hi All, I need to make a static library that will work in different environments (kernel and application). I have already done everything and I could generate the "mylib.a". The ...
  1. #1
    Just Joined!
    Join Date
    Jan 2009
    Posts
    2

    Use of CFLAGS in a library

    Hi All,

    I need to make a static library that will work in different environments (kernel and application). I have already done everything and I could generate the "mylib.a".

    The doubt is about the flags options used in gcc to compile the library.
    My first test I have not inserted any flag and I inserted the "mylib.a" in the kernel compilation. To test I made a driver that access the library functions. For my surprise it worked!

    Why didn't I need to use the same CFLAGS used in the kernel (with all optimizations) in my lib? I really thougth that the kernel compilation would warn.

    Thanks.

  2. #2
    Just Joined!
    Join Date
    Jan 2009
    Posts
    2
    So people, anyone could help?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...