The macro location returns a location suitable for passing to record-definition. This is usually done via a separate defining function.
(defmacro define-wibble (x y)
`(dspec:def (define-wibble ,x)
(set-wibble-definition ',x ',y (dspec:location))))
(defun set-wibble-definition (x y loc)
(when (record-definition `(define-wibble ,x) loc)
;; defining code here
))