Re: DDK build result different from VS result
From: Hannes (hannes_at_nospam.nospam)
Date: 01/31/05
- Next message: Calvin Guan: "Re: NDIS_PNP_WAKE_UP_MAGIC_PACKET"
- Previous message: Hannes: "Re: DDK build result different from VS result"
- In reply to: Mark Roddy: "Re: DDK build result different from VS result"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 31 Jan 2005 10:33:02 -0800
Hi Mark,
Thanks for your comments. Let me try to clarify your questions below:
"Mark Roddy" wrote:
> I'm confused. The only flags of interest with respect to
> compilation/linking of your driver are in the Sources file, not in the
> VC project file. That is th whole point of ddkbuild - to get your driver
> built using the standard settings from the ddk. So what flags are we
> talking about here?
For the past three-four years, I have developed this driver entirely using a
VS project, and I have found a number of compiler and linker settings that
have a good effect on our outcome. Now that I am starting a new VS project,
this time using a VS makefile project and ddkbuild, I have made an attempt to
translate all these settings (which have taken years to refine) into settings
that now go entirely into the sources file. No more settings in VS, it's all
in the sources file now.
>
> > Now, if I, in my own makefile comment out the call to
> >
> > !INCLUDE $(NTMAKEENV)\makefile.def
> >
> > and instead write my own makefile, like this...
> Then you are off on your own with an unsupported build process. This
> doesn't mean that your build process is wrong or faulty, it is just
> unsupported.
Ok, thanks. It's good to hear that. I was just making my own makefile to
prove that my driver *CAN* fit into 250kB. I'm still puzzled why the
supported ddk build makes it twice as big...
> > For instance, /G6 is passed, while I actually want /G7. So I end up with a
> > warning that /G7 overrides /G6. This I can take, but how about all the other
> > flags, can I not avoid all the "default" compiler flags and JUST use my own
> > flags?
> >
>
> So how exactly are you setting the optimization flags? Better yet, why
> not just leave the flags alone and use the default settings in the ddk?
These are my flags, and I wish they were the ONLY flags applied:
MSC_OPTIMIZATION=/O2 /G7 /Og
USER_C_FLAGS=/nologo /Gz /GF /FD /EHsc /MT /QI0f /TP
Performance is our highest priority with this driver, so I don't wanna take
chances on weird build flags or twice as large .sys files....at least not
without understanding what the differences are.
We are running solely on Pentium 4 and Pentium M, so I certainly don't want
to optimize using /G6 (which is Pentium 1-3 compliant) - so I don't
understand why DDK enforces /G6...?
Also the size of the output file worries me. We have a stable product that
has been running for years, at 250kB. I want to understand why the file
suddenly becomes 500kB, and I am also looking for some reasasurance that it's
not gonna affect our performance.
> Once again you seem to have conflicted goals here. You want to use the
> ddk toolset to get standard results, but you want to override all the
> settings from the toolset so that you can get non-standard results. The
> whole point of using the ddk toolset is to use standard tools with
> standard settings so that the ouput has a reasonable chance of working
> correctly, (ignoring source code defects.)
Thanks for that point. I thought using the DDK compiler was enough to be
"supported", but if it also takes only using a subset of compiler settings
and optimizations, I realize I am much more limited. It's hard to do real
benchmarking on our product, why I am trying to optimize as far as I can
based on the documentation of compiler and linker options.
> I suggest that you strip all the crap out of your sources file, and
> unless there is some real need to worry about compilation/linking size
> and or speed optimizations, accept what you get.
Thanks for all your input, it is highly appreciated.
/ Hannes.
- Next message: Calvin Guan: "Re: NDIS_PNP_WAKE_UP_MAGIC_PACKET"
- Previous message: Hannes: "Re: DDK build result different from VS result"
- In reply to: Mark Roddy: "Re: DDK build result different from VS result"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|