RE: DDK build result different from VS result

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Hannes (hannes_at_nospam.nospam)
Date: 02/01/05


Date: Mon, 31 Jan 2005 17:19:01 -0800

Hi again,

Thanks for the tip from Mark Roddy of looking through the included
makefiles, to find out why certain compiler flags are added to my
compilations. I have now stripped my sources file down significantly, and I
am left with these few 'extras' in there:

TARGETNAME=spm
TARGETPATH=obj
TARGETTYPE=DRIVER

C_DEFINES=-DNDIS50_MINIPORT -DNDIS50 -DNDIS_MINIPORT_DRIVER -DNDIS_WDM=1
USER_C_FLAGS=/QI0f /TP
MSC_OPTIMIZATION=/O2 /Og
TARGETLIBS=$(DDK_LIB_DEST)\i386\ndis.lib
SOURCES=<list of my files>

Can I consider my build environment "supported" at this point, or do I need
to get rid of more flags?

Also, I am looking at some flags passed to the linker, and I am wondering if
these can cause problems to me?

-debug
-debugtype:cv
/functionpadmin:5

I want my build as optimized as possible, so seeing -debug in there worries
me a little. The documentation is not clear on whether this will generate a
less optimized driver?

And - what is /functionpadmin:5? "Minimum Function Padding" ? It seems
related to incremental linking, but the DDK also sends "INCREMENTAL:NO" to
the linker, so this seems contradictory.

Finally, I see
/pdbcompress
being passed to the linker - I assume this is not an optional flag? (yes,
the .pdb file indeed gets compressed on my file system).

Again, any input appreciated.

Thanks,

         / Hannes.

PS. The output spm.sys file is still 500kB, twice the size of the VS build
result of 250kB...



Relevant Pages

  • Re: Compiler bug in the DDK--be aware of it
    ... InterlockedCompareExchange to set it to 1. ... The flags set by the ddk build do trigger the problem ... be to tweak the compiler flags though I haven't bothered to isolate ...
    (microsoft.public.development.device.drivers)
  • Re: Compiler Flags problem with core2 CPU
    ... So setting optimize compiler flags is only useful for userland stuff? ... I gonna recompile kernel for my core2 CPU, so i'd like to pass some ... And gcc in FreeBSD ...
    (freebsd-questions)
  • Re: gcc -shared / -fpic
    ... Are those flags still needed? ... so I don't know if I can change the compiler flags or ... the ranlib invocation. ... Is -fpic needed on other platforms than x86? ...
    (comp.os.linux.development.apps)
  • Re: Need to add C flag when building a CPAN module
    ... > the list of C compiler flags that is ... > part of the Perl installation. ... (reverse each component and remove .invalid for email address) ...
    (comp.lang.perl.misc)
  • Re: Arm gnu directive assembler problem
    ... The names in the linker script have to match the names in the ... This is one of the ELF section stack manipulation directives. ... The optional FLAGS argument is a quoted string which may contain any ... the assembler supports another type of `.section' ...
    (comp.arch.embedded)