Fix build indeterminism for asm compiler header.

Existing code puts a timestamp in the .lst files, e.g.:
Compilation of ".../src/fw/ssdt-misc.i" - Thu Oct 22 13:38:41 2023
This makes the build non-deterministic.
This commit is contained in:
aveselyy 2023-10-24 12:45:45 -07:00 committed by Jonathan Davies
parent a97db76b5f
commit 471de8b63a
4 changed files with 22 additions and 7 deletions

View File

@ -697,18 +697,24 @@ AslCompilerFileHeader (
break;
}
/* Compilation header with timestamp */
Aclock = time (NULL);
NewTime = ctime (&Aclock);
/* Compilation header (with timestamp) */
FlPrintFile (FileId,
"%sCompilation of \"%s\" -",
"%sCompilation of \"%s\"",
Prefix, AslGbl_Files[ASL_FILE_INPUT].Filename);
if (NewTime)
if (!AslGbl_Deterministic)
{
FlPrintFile (FileId, " %s%s\n", NewTime, Prefix);
Aclock = time (NULL);
NewTime = ctime (&Aclock);
if (NewTime)
{
FlPrintFile (FileId, " - %s%s\n", NewTime, Prefix);
}
}
else
{
FlPrintFile (FileId, "\n");
}
switch (FileId)

View File

@ -325,6 +325,7 @@ ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_ReferenceOptimizatio
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_DisplayRemarks, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_DisplayWarnings, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_DisplayOptimizations, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_Deterministic, TRUE);
ASL_EXTERN UINT8 ASL_INIT_GLOBAL (AslGbl_WarningLevel, ASL_WARNING);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_UseOriginalCompilerId, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_VerboseTemplates, FALSE);

View File

@ -185,6 +185,7 @@ Usage (
ACPI_OPTION ("-vd", "Display compiler build date and time");
ACPI_OPTION ("-vo", "Enable optimization comments");
ACPI_OPTION ("-vs", "Disable signon");
ACPI_OPTION ("-ld", "Disable deterministic output");
printf ("\nHelp:\n");
ACPI_OPTION ("-h", "This message");

View File

@ -630,6 +630,13 @@ AslDoOptions (
AcpiGbl_DmOpt_Listing = TRUE;
break;
case 'd':
/* Disable deterministic output, enabling timestamp */
AslGbl_Deterministic = FALSE;
break;
case 'i':
/* Produce preprocessor output file */