Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to get qmake to support assembly language?

How to get qmake to support assembly language?

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 470 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Publicnamer
    wrote on last edited by
    #1

    I'm trying to get qmake to support building some asm files. So far, no luck.

    My code looks like this:

            ASM_FILES += myfile.asm
            ASMEXTRAFLAGS = -march=armv8-a
            QMAKE_EXTRA_COMPILERS += as
            as.commands = as $$ASMEXTRAFLAGS -o ${QMAKE_FILE_BASE}.o ${QMAKE_FILE_NAME}
            as.output = ${QMAKE_FILE_BASE}.o
            as.input = $ASM_FILES
            OTHER_FILES += $$ASM_SOURCES
            QMAKE_EXTRA_TARGETS += myfile.o
    
    

    The "as" command is never run to generate myfile.o.
    Is there something I'm missing?
    Thanks.

    raven-worxR 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      I would recommend starting by following the new_moc example from the documentation more closely.

      Also, I would not use the exact same name for the compiler declaration as the command name.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • P Publicnamer

        I'm trying to get qmake to support building some asm files. So far, no luck.

        My code looks like this:

                ASM_FILES += myfile.asm
                ASMEXTRAFLAGS = -march=armv8-a
                QMAKE_EXTRA_COMPILERS += as
                as.commands = as $$ASMEXTRAFLAGS -o ${QMAKE_FILE_BASE}.o ${QMAKE_FILE_NAME}
                as.output = ${QMAKE_FILE_BASE}.o
                as.input = $ASM_FILES
                OTHER_FILES += $$ASM_SOURCES
                QMAKE_EXTRA_TARGETS += myfile.o
        
        

        The "as" command is never run to generate myfile.o.
        Is there something I'm missing?
        Thanks.

        raven-worxR Offline
        raven-worxR Offline
        raven-worx
        Moderators
        wrote on last edited by raven-worx
        #3

        @Publicnamer:
        i am not sure but i think you must write this line after you filled the as variable

        QMAKE_EXTRA_COMPILERS += as

        i think qmake isn't using references of variables

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        0
        • P Offline
          P Offline
          Publicnamer
          wrote on last edited by
          #4

          OK thanks, here's what I found works:

          	ASM_FILES += myfile.asm
          	ASMEXTRAFLAGS = -march=armv8-a
          	QMAKE_EXTRA_TARGETS += myfile.o
          	asm.output = ${QMAKE_FILE_BASE}.o
          	asm.commands = as $$ASMEXTRAFLAGS -o ${QMAKE_FILE_BASE}.o ${QMAKE_FILE_NAME}
          	asm.input = ASM_FILES
          	QMAKE_EXTRA_COMPILERS += asm
          
          
          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved